diff options
author | Jiri Olsa <jolsa@kernel.org> | 2016-06-14 14:19:18 -0400 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2016-06-15 09:48:02 -0400 |
commit | d05e3aaeea56d7cd23976cb1fa626faf1a8bfbed (patch) | |
tree | cf3e9bd1525fe0c41503e1a1af47f4215a10e83e /tools/perf/ui/stdio/hist.c | |
parent | 8f1d1b4452ce71a231d1a22e6357285fb773c551 (diff) |
perf stdio: Add use_callchain parameter to hists__fprintf
It will be convenient in following patches to display hists entries
without callchains even if they are defined.
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Cc: David Ahern <dsahern@gmail.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/1465928361-2442-9-git-send-email-jolsa@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/ui/stdio/hist.c')
-rw-r--r-- | tools/perf/ui/stdio/hist.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/tools/perf/ui/stdio/hist.c b/tools/perf/ui/stdio/hist.c index 150c4de33b22..9a972cb00458 100644 --- a/tools/perf/ui/stdio/hist.c +++ b/tools/perf/ui/stdio/hist.c | |||
@@ -492,7 +492,8 @@ out: | |||
492 | } | 492 | } |
493 | 493 | ||
494 | static int hist_entry__fprintf(struct hist_entry *he, size_t size, | 494 | static int hist_entry__fprintf(struct hist_entry *he, size_t size, |
495 | char *bf, size_t bfsz, FILE *fp) | 495 | char *bf, size_t bfsz, FILE *fp, |
496 | bool use_callchain) | ||
496 | { | 497 | { |
497 | int ret; | 498 | int ret; |
498 | struct perf_hpp hpp = { | 499 | struct perf_hpp hpp = { |
@@ -512,7 +513,7 @@ static int hist_entry__fprintf(struct hist_entry *he, size_t size, | |||
512 | 513 | ||
513 | ret = fprintf(fp, "%s\n", bf); | 514 | ret = fprintf(fp, "%s\n", bf); |
514 | 515 | ||
515 | if (symbol_conf.use_callchain) | 516 | if (use_callchain) |
516 | ret += hist_entry_callchain__fprintf(he, total_period, 0, fp); | 517 | ret += hist_entry_callchain__fprintf(he, total_period, 0, fp); |
517 | 518 | ||
518 | return ret; | 519 | return ret; |
@@ -709,7 +710,8 @@ static int hists__fprintf_headers(struct hists *hists, FILE *fp) | |||
709 | } | 710 | } |
710 | 711 | ||
711 | size_t hists__fprintf(struct hists *hists, bool show_header, int max_rows, | 712 | size_t hists__fprintf(struct hists *hists, bool show_header, int max_rows, |
712 | int max_cols, float min_pcnt, FILE *fp) | 713 | int max_cols, float min_pcnt, FILE *fp, |
714 | bool use_callchain) | ||
713 | { | 715 | { |
714 | struct perf_hpp_fmt *fmt; | 716 | struct perf_hpp_fmt *fmt; |
715 | struct rb_node *nd; | 717 | struct rb_node *nd; |
@@ -755,7 +757,7 @@ size_t hists__fprintf(struct hists *hists, bool show_header, int max_rows, | |||
755 | if (percent < min_pcnt) | 757 | if (percent < min_pcnt) |
756 | continue; | 758 | continue; |
757 | 759 | ||
758 | ret += hist_entry__fprintf(h, max_cols, line, linesz, fp); | 760 | ret += hist_entry__fprintf(h, max_cols, line, linesz, fp, use_callchain); |
759 | 761 | ||
760 | if (max_rows && ++nr_rows >= max_rows) | 762 | if (max_rows && ++nr_rows >= max_rows) |
761 | break; | 763 | break; |