summaryrefslogtreecommitdiffstats
path: root/sys-utils/readprofile.c
diff options
context:
space:
mode:
authorPo-Yu Chuang2011-04-08 11:35:53 +0200
committerKarel Zak2011-04-12 12:10:54 +0200
commit236faa7eafb0a6728527ef3f327dabcaf2066b83 (patch)
treea78fd6b396c723ce08645f8f98020b44278539bd /sys-utils/readprofile.c
parentwall: support --timeout switch (vol 2.) (diff)
downloadkernel-qcow2-util-linux-236faa7eafb0a6728527ef3f327dabcaf2066b83.tar.gz
kernel-qcow2-util-linux-236faa7eafb0a6728527ef3f327dabcaf2066b83.tar.xz
kernel-qcow2-util-linux-236faa7eafb0a6728527ef3f327dabcaf2066b83.zip
readprofile: don't stop parsing at __init_end
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>
Diffstat (limited to 'sys-utils/readprofile.c')
-rw-r--r--sys-utils/readprofile.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/sys-utils/readprofile.c b/sys-utils/readprofile.c
index 91ff32951..174f9aa0d 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')