linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: ratbert.chuang@gmail.com (Po-Yu Chuang)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH RFC] util-linux: readprofile: don't stop parsing at __init_end
Date: Fri,  8 Apr 2011 17:35:53 +0800	[thread overview]
Message-ID: <1302255353-1622-1-git-send-email-ratbert.chuang@gmail.com> (raw)

From: Po-Yu Chuang <ratbert@faraday-tech.com>

Some architectures like ARM place __init_end before .text section.
If any function in .init section is hit while profiling, readprofile
stops at __init_end.  That means if we enable profiling at boot time,
the profiler probably hits init functions and readprofile does not
work well unless we reset profiling buffer with -r option.

Signed-off-by: Po-Yu Chuang <ratbert@faraday-tech.com>
---
 sys-utils/readprofile.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/sys-utils/readprofile.c b/sys-utils/readprofile.c
index 91ff329..174f9aa 100644
--- a/sys-utils/readprofile.c
+++ b/sys-utils/readprofile.c
@@ -323,8 +323,10 @@ main(int argc, char **argv) {
 			done = 1;
 		else {
 			/* ignore any LEADING (before a '[tT]' symbol is found)
-			   Absolute symbols */
-			if ((*mode == 'A' || *mode == '?') && total == 0)
+			   Absolute symbols and __init_end because some
+			   architectures place it before .text section */
+			if ((*mode == 'A' || *mode == '?')
+			    && (total == 0 || !strcmp(next_name, "__init_end")))
 				continue;
 			if (*mode != 'T' && *mode != 't' &&
 			    *mode != 'W' && *mode != 'w')
-- 
1.6.3.3

             reply	other threads:[~2011-04-08  9:35 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-08  9:35 Po-Yu Chuang [this message]
2011-04-12 10:11 ` [PATCH RFC] util-linux: readprofile: don't stop parsing at __init_end Karel Zak

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1302255353-1622-1-git-send-email-ratbert.chuang@gmail.com \
    --to=ratbert.chuang@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).