diff options
Diffstat (limited to 'Documentation/perf_counter/builtin-top.c')
-rw-r--r-- | Documentation/perf_counter/builtin-top.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/Documentation/perf_counter/builtin-top.c b/Documentation/perf_counter/builtin-top.c index 7c907e25d82b..3f7778ba00bc 100644 --- a/Documentation/perf_counter/builtin-top.c +++ b/Documentation/perf_counter/builtin-top.c | |||
@@ -64,9 +64,10 @@ static int default_interval = 100000; | |||
64 | static int event_count[MAX_COUNTERS]; | 64 | static int event_count[MAX_COUNTERS]; |
65 | static int fd[MAX_NR_CPUS][MAX_COUNTERS]; | 65 | static int fd[MAX_NR_CPUS][MAX_COUNTERS]; |
66 | 66 | ||
67 | static __u64 count_filter = 100; | 67 | static __u64 count_filter = 5; |
68 | static int print_entries = 15; | ||
68 | 69 | ||
69 | static int target_pid = -1; | 70 | static int target_pid = -1; |
70 | static int profile_cpu = -1; | 71 | static int profile_cpu = -1; |
71 | static int nr_cpus = 0; | 72 | static int nr_cpus = 0; |
72 | static unsigned int realtime_prio = 0; | 73 | static unsigned int realtime_prio = 0; |
@@ -254,7 +255,7 @@ static void print_sym_table(void) | |||
254 | struct symbol *sym = (struct symbol *)(syme + 1); | 255 | struct symbol *sym = (struct symbol *)(syme + 1); |
255 | float pcnt; | 256 | float pcnt; |
256 | 257 | ||
257 | if (++printed > 18 || syme->snap_count < count_filter) | 258 | if (++printed > print_entries || syme->snap_count < count_filter) |
258 | continue; | 259 | continue; |
259 | 260 | ||
260 | pcnt = 100.0 - (100.0 * ((sum_kevents - syme->snap_count) / | 261 | pcnt = 100.0 - (100.0 * ((sum_kevents - syme->snap_count) / |
@@ -650,7 +651,7 @@ static const struct option options[] = { | |||
650 | "number of seconds to delay between refreshes"), | 651 | "number of seconds to delay between refreshes"), |
651 | OPT_BOOLEAN('D', "dump-symtab", &dump_symtab, | 652 | OPT_BOOLEAN('D', "dump-symtab", &dump_symtab, |
652 | "dump the symbol table used for profiling"), | 653 | "dump the symbol table used for profiling"), |
653 | OPT_INTEGER('f', "--count-filter", &count_filter, | 654 | OPT_INTEGER('f', "count-filter", &count_filter, |
654 | "only display functions with more events than this"), | 655 | "only display functions with more events than this"), |
655 | OPT_BOOLEAN('g', "group", &group, | 656 | OPT_BOOLEAN('g', "group", &group, |
656 | "put the counters into a counter group"), | 657 | "put the counters into a counter group"), |
@@ -662,8 +663,10 @@ static const struct option options[] = { | |||
662 | "track mmap events"), | 663 | "track mmap events"), |
663 | OPT_BOOLEAN('U', "use-munmap", &use_munmap, | 664 | OPT_BOOLEAN('U', "use-munmap", &use_munmap, |
664 | "track munmap events"), | 665 | "track munmap events"), |
665 | OPT_INTEGER('F', "--freq", &freq, | 666 | OPT_INTEGER('F', "freq", &freq, |
666 | "profile at this frequency"), | 667 | "profile at this frequency"), |
668 | OPT_INTEGER('E', "entries", &print_entries, | ||
669 | "display this many functions"), | ||
667 | OPT_END() | 670 | OPT_END() |
668 | }; | 671 | }; |
669 | 672 | ||