* [PATCH RFC] util-linux: readprofile: don't stop parsing at __init_end
@ 2011-04-08 9:35 Po-Yu Chuang
2011-04-12 10:11 ` Karel Zak
0 siblings, 1 reply; 2+ messages in thread
From: Po-Yu Chuang @ 2011-04-08 9:35 UTC (permalink / raw)
To: linux-arm-kernel
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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [PATCH RFC] util-linux: readprofile: don't stop parsing at __init_end
2011-04-08 9:35 [PATCH RFC] util-linux: readprofile: don't stop parsing at __init_end Po-Yu Chuang
@ 2011-04-12 10:11 ` Karel Zak
0 siblings, 0 replies; 2+ messages in thread
From: Karel Zak @ 2011-04-12 10:11 UTC (permalink / raw)
To: linux-arm-kernel
On Fri, Apr 08, 2011 at 05:35:53PM +0800, Po-Yu Chuang wrote:
> 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(-)
Applied, thanks.
Karel
--
Karel Zak <kzak@redhat.com>
http://karelzak.blogspot.com
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-04-12 10:11 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-04-08 9:35 [PATCH RFC] util-linux: readprofile: don't stop parsing at __init_end Po-Yu Chuang
2011-04-12 10:11 ` Karel Zak
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).