diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2010-08-05 18:28:27 -0400 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2010-08-05 18:38:02 -0400 |
commit | 80d50cae1b9cc958171c36fffc7357a5abad808c (patch) | |
tree | 9f6efd6564295a6aeffb88b4bbe7636c6bf59509 /tools/perf/builtin-report.c | |
parent | fb89941ea761f53201959cc217a2c73f6fe13855 (diff) |
perf ui: Add search by name/addr to the map__browser
Only in verbose mode so as not to bloat struct symbol too much.
The key used is '/', just like in vi, less, etc.
More work is needed to allocate space on the symbol in a more clear way.
This experiment shows how to do it for the hist_browser, in the main
window.
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Srikar Dronamraju <srikar@linux.vnet.ibm.com>
Cc: Stephane Eranian <eranian@google.com>
LKML-Reference: <new-submission>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/builtin-report.c')
-rw-r--r-- | tools/perf/builtin-report.c | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/tools/perf/builtin-report.c b/tools/perf/builtin-report.c index 2f4b92925b26..4a7a74362451 100644 --- a/tools/perf/builtin-report.c +++ b/tools/perf/builtin-report.c | |||
@@ -478,8 +478,24 @@ int cmd_report(int argc, const char **argv, const char *prefix __used) | |||
478 | * so don't allocate extra space that won't be used in the stdio | 478 | * so don't allocate extra space that won't be used in the stdio |
479 | * implementation. | 479 | * implementation. |
480 | */ | 480 | */ |
481 | if (use_browser > 0) | 481 | if (use_browser > 0) { |
482 | symbol_conf.priv_size = sizeof(struct sym_priv); | 482 | symbol_conf.priv_size = sizeof(struct sym_priv); |
483 | /* | ||
484 | * For searching by name on the "Browse map details". | ||
485 | * providing it only in verbose mode not to bloat too | ||
486 | * much struct symbol. | ||
487 | */ | ||
488 | if (verbose) { | ||
489 | /* | ||
490 | * XXX: Need to provide a less kludgy way to ask for | ||
491 | * more space per symbol, the u32 is for the index on | ||
492 | * the ui browser. | ||
493 | * See symbol__browser_index. | ||
494 | */ | ||
495 | symbol_conf.priv_size += sizeof(u32); | ||
496 | symbol_conf.sort_by_name = true; | ||
497 | } | ||
498 | } | ||
483 | 499 | ||
484 | if (symbol__init() < 0) | 500 | if (symbol__init() < 0) |
485 | return -1; | 501 | return -1; |