From b5ff71c3bab10a7a4b321b5de072ac5bd73ef9a4 Mon Sep 17 00:00:00 2001 From: Jiri Olsa Date: Thu, 4 Oct 2012 21:49:40 +0900 Subject: 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 Cc: Corey Ashford Cc: Frederic Weisbecker Cc: Ingo Molnar Cc: Namhyung Kim Cc: Paul Mackerras Cc: Peter Zijlstra Cc: Stephane Eranian Link: http://lkml.kernel.org/r/1349354994-17853-7-git-send-email-namhyung@kernel.org Signed-off-by: Namhyung Kim Signed-off-by: Arnaldo Carvalho de Melo --- tools/perf/ui/gtk/browser.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tools/perf/ui/gtk/browser.c') 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) static int perf_gtk__hpp_color_ ## _name(struct perf_hpp *hpp, \ struct hist_entry *he) \ { \ - double percent = 100.0 * he->_field / hpp->total_period; \ + struct hists *hists = he->hists; \ + double percent = 100.0 * he->_field / hists->stats.total_period; \ const char *markup; \ int ret = 0; \ \ @@ -102,7 +103,6 @@ static void perf_gtk__show_hists(GtkWidget *window, struct hists *hists) struct perf_hpp hpp = { .buf = s, .size = sizeof(s), - .total_period = hists->stats.total_period, }; nr_cols = 0; -- cgit v1.2.3