aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/ui/gtk/browser.c
diff options
context:
space:
mode:
authorJiri Olsa <jolsa@redhat.com>2012-10-04 08:49:40 -0400
committerArnaldo Carvalho de Melo <acme@redhat.com>2012-10-04 12:31:30 -0400
commitb5ff71c3bab10a7a4b321b5de072ac5bd73ef9a4 (patch)
tree592b9041b8ad7257272f6e902bddcb747ce77410 /tools/perf/ui/gtk/browser.c
parent1d77822ea6245e89149872405a3844e0778a004a (diff)
perf diff: Removing the total_period argument from output code
The total_period is available in struct hists data via the 'struct hist_entry::hists' pointer. There's no need to carry it through the output code path. Removing 'struct perf_hpp::total_period' pointer, because it's no longer needed. Signed-off-by: Jiri Olsa <jolsa@redhat.com> Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com> Cc: Frederic Weisbecker <fweisbec@gmail.com> Cc: Ingo Molnar <mingo@kernel.org> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Paul Mackerras <paulus@samba.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Stephane Eranian <eranian@google.com> Link: http://lkml.kernel.org/r/1349354994-17853-7-git-send-email-namhyung@kernel.org Signed-off-by: Namhyung Kim <namhyung@kernel.org> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/ui/gtk/browser.c')
-rw-r--r--tools/perf/ui/gtk/browser.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/perf/ui/gtk/browser.c b/tools/perf/ui/gtk/browser.c
index 2bc08f6af714..3cbb1d622ed2 100644
--- a/tools/perf/ui/gtk/browser.c
+++ b/tools/perf/ui/gtk/browser.c
@@ -49,7 +49,8 @@ static const char *perf_gtk__get_percent_color(double percent)
49static int perf_gtk__hpp_color_ ## _name(struct perf_hpp *hpp, \ 49static int perf_gtk__hpp_color_ ## _name(struct perf_hpp *hpp, \
50 struct hist_entry *he) \ 50 struct hist_entry *he) \
51{ \ 51{ \
52 double percent = 100.0 * he->_field / hpp->total_period; \ 52 struct hists *hists = he->hists; \
53 double percent = 100.0 * he->_field / hists->stats.total_period; \
53 const char *markup; \ 54 const char *markup; \
54 int ret = 0; \ 55 int ret = 0; \
55 \ 56 \
@@ -102,7 +103,6 @@ static void perf_gtk__show_hists(GtkWidget *window, struct hists *hists)
102 struct perf_hpp hpp = { 103 struct perf_hpp hpp = {
103 .buf = s, 104 .buf = s,
104 .size = sizeof(s), 105 .size = sizeof(s),
105 .total_period = hists->stats.total_period,
106 }; 106 };
107 107
108 nr_cols = 0; 108 nr_cols = 0;