diff options
author | Jiri Olsa <jolsa@kernel.org> | 2016-06-14 14:19:20 -0400 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2016-06-15 09:50:04 -0400 |
commit | da1b0407c866e7a8679cd3b64b35d83825c58a14 (patch) | |
tree | b61bfc866505fb302348f9c39c2a14e3bfa93727 /tools/perf/ui/stdio/hist.c | |
parent | 053721736011ee52e83b8e8794d922d1c511a4d3 (diff) |
perf hists: Replace perf_evsel arg perf_hpp_fmt's width callback
Replacing perf_evsel arg perf_hpp_fmt's width callback with hists
object.
This will be helpful in future for non evsel related hist browsers.
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-11-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 | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tools/perf/ui/stdio/hist.c b/tools/perf/ui/stdio/hist.c index d0534fac46ae..f04a63112079 100644 --- a/tools/perf/ui/stdio/hist.c +++ b/tools/perf/ui/stdio/hist.c | |||
@@ -590,7 +590,7 @@ static int print_hierarchy_header(struct hists *hists, struct perf_hpp *hpp, | |||
590 | fprintf(fp, "%s", sep ?: ".."); | 590 | fprintf(fp, "%s", sep ?: ".."); |
591 | first_col = false; | 591 | first_col = false; |
592 | 592 | ||
593 | width = fmt->width(fmt, hpp, hists_to_evsel(hists)); | 593 | width = fmt->width(fmt, hpp, hists); |
594 | fprintf(fp, "%.*s", width, dots); | 594 | fprintf(fp, "%.*s", width, dots); |
595 | } | 595 | } |
596 | 596 | ||
@@ -607,7 +607,7 @@ static int print_hierarchy_header(struct hists *hists, struct perf_hpp *hpp, | |||
607 | width++; /* for '+' sign between column header */ | 607 | width++; /* for '+' sign between column header */ |
608 | first_col = false; | 608 | first_col = false; |
609 | 609 | ||
610 | width += fmt->width(fmt, hpp, hists_to_evsel(hists)); | 610 | width += fmt->width(fmt, hpp, hists); |
611 | } | 611 | } |
612 | 612 | ||
613 | if (width > header_width) | 613 | if (width > header_width) |
@@ -682,7 +682,7 @@ hists__fprintf_standard_headers(struct hists *hists, | |||
682 | else | 682 | else |
683 | first = false; | 683 | first = false; |
684 | 684 | ||
685 | width = fmt->width(fmt, hpp, hists_to_evsel(hists)); | 685 | width = fmt->width(fmt, hpp, hists); |
686 | for (i = 0; i < width; i++) | 686 | for (i = 0; i < width; i++) |
687 | fprintf(fp, "."); | 687 | fprintf(fp, "."); |
688 | } | 688 | } |