diff options
Diffstat (limited to 'util-linux/readprofile.c')
-rw-r--r-- | util-linux/readprofile.c | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/util-linux/readprofile.c b/util-linux/readprofile.c index 345b676ba..31abb6bb2 100644 --- a/util-linux/readprofile.c +++ b/util-linux/readprofile.c | |||
@@ -31,6 +31,16 @@ | |||
31 | * Taken from util-linux and adapted for busybox by | 31 | * Taken from util-linux and adapted for busybox by |
32 | * Paul Mundt <lethal@linux-sh.org>. | 32 | * Paul Mundt <lethal@linux-sh.org>. |
33 | */ | 33 | */ |
34 | //config:config READPROFILE | ||
35 | //config: bool "readprofile" | ||
36 | //config: default y | ||
37 | //config: #select PLATFORM_LINUX | ||
38 | //config: help | ||
39 | //config: This allows you to parse /proc/profile for basic profiling. | ||
40 | |||
41 | //applet:IF_READPROFILE(APPLET(readprofile, BB_DIR_USR_SBIN, BB_SUID_DROP)) | ||
42 | |||
43 | //kbuild:lib-$(CONFIG_READPROFILE) += readprofile.o | ||
34 | 44 | ||
35 | //usage:#define readprofile_trivial_usage | 45 | //usage:#define readprofile_trivial_usage |
36 | //usage: "[OPTIONS]" | 46 | //usage: "[OPTIONS]" |
@@ -164,7 +174,7 @@ int readprofile_main(int argc UNUSED_PARAM, char **argv) | |||
164 | bb_error_msg_and_die("%s(%i): wrong map line", | 174 | bb_error_msg_and_die("%s(%i): wrong map line", |
165 | mapFile, maplineno); | 175 | mapFile, maplineno); |
166 | 176 | ||
167 | if (!strcmp(fn_name, "_stext")) /* only elf works like this */ { | 177 | if (strcmp(fn_name, "_stext") == 0) /* only elf works like this */ { |
168 | add0 = fn_add; | 178 | add0 = fn_add; |
169 | break; | 179 | break; |
170 | } | 180 | } |
@@ -214,8 +224,9 @@ int readprofile_main(int argc UNUSED_PARAM, char **argv) | |||
214 | if (optBins) { | 224 | if (optBins) { |
215 | if (optVerbose || this > 0) | 225 | if (optVerbose || this > 0) |
216 | printf(" total\t\t\t\t%u\n", this); | 226 | printf(" total\t\t\t\t%u\n", this); |
217 | } else if ((this || optAll) | 227 | } else |
218 | && (fn_len = next_add-fn_add) != 0 | 228 | if ((this || optAll) |
229 | && (fn_len = next_add-fn_add) != 0 | ||
219 | ) { | 230 | ) { |
220 | if (optVerbose) | 231 | if (optVerbose) |
221 | printf("%016llx %-40s %6u %8.4f\n", fn_add, | 232 | printf("%016llx %-40s %6u %8.4f\n", fn_add, |