diff options
Diffstat (limited to 'tools/perf/util')
-rw-r--r-- | tools/perf/util/block-info.c | 17 | ||||
-rw-r--r-- | tools/perf/util/block-info.h | 4 | ||||
-rw-r--r-- | tools/perf/util/symbol_conf.h | 1 |
3 files changed, 22 insertions, 0 deletions
diff --git a/tools/perf/util/block-info.c b/tools/perf/util/block-info.c index 4a7bac95231e..ba891751a6ed 100644 --- a/tools/perf/util/block-info.c +++ b/tools/perf/util/block-info.c @@ -437,3 +437,20 @@ struct block_report *block_info__create_report(struct evlist *evlist, return block_reports; } + +int report__browse_block_hists(struct block_hist *bh, float min_percent, + struct evsel *evsel __maybe_unused) +{ + switch (use_browser) { + case 0: + symbol_conf.report_individual_block = true; + hists__fprintf(&bh->block_hists, true, 0, 0, min_percent, + stdout, true); + hists__delete_entries(&bh->block_hists); + return 0; + default: + return -1; + } + + return 0; +} diff --git a/tools/perf/util/block-info.h b/tools/perf/util/block-info.h index b5266588d476..8309297a6e8f 100644 --- a/tools/perf/util/block-info.h +++ b/tools/perf/util/block-info.h @@ -7,6 +7,7 @@ #include "hist.h" #include "symbol.h" #include "sort.h" +#include "ui/ui.h" struct block_info { struct symbol *sym; @@ -69,4 +70,7 @@ int block_info__process_sym(struct hist_entry *he, struct block_hist *bh, struct block_report *block_info__create_report(struct evlist *evlist, u64 total_cycles); +int report__browse_block_hists(struct block_hist *bh, float min_percent, + struct evsel *evsel); + #endif /* __PERF_BLOCK_H */ diff --git a/tools/perf/util/symbol_conf.h b/tools/perf/util/symbol_conf.h index e6880789864c..10f1ec3e0349 100644 --- a/tools/perf/util/symbol_conf.h +++ b/tools/perf/util/symbol_conf.h @@ -40,6 +40,7 @@ struct symbol_conf { raw_trace, report_hierarchy, report_block, + report_individual_block, inline_name, disable_add2line_warn; const char *vmlinux_name, |