Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1325662

[PATCH 24/29] perf tools: Add hpp_list into struct hists object

From Arnaldo Carvalho de Melo <acme@kernel.org>
Newsgroups linux.kernel
Subject [PATCH 24/29] perf tools: Add hpp_list into struct hists object
Date 2016-02-03 17:50 +0100
Message-ID <qY8MY-4sb-49@gated-at.bofh.it> (permalink)
References <qY8Dg-4ol-9@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


From: Jiri Olsa <jolsa@kernel.org>

Adding hpp_list into struct hists object.

Initializing struct hists_evsel hists object to carry global
perf_hpp_list list.

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/1453109064-1026-25-git-send-email-jolsa@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/util/hist.c | 5 +++--
 tools/perf/util/hist.h | 3 ++-
 2 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/tools/perf/util/hist.c b/tools/perf/util/hist.c
index dea475d1fab0..2b9cc9129692 100644
--- a/tools/perf/util/hist.c
+++ b/tools/perf/util/hist.c
@@ -1578,7 +1578,7 @@ int perf_hist_config(const char *var, const char *value)
 	return 0;
 }
 
-int __hists__init(struct hists *hists)
+int __hists__init(struct hists *hists, struct perf_hpp_list *hpp_list)
 {
 	memset(hists, 0, sizeof(*hists));
 	hists->entries_in_array[0] = hists->entries_in_array[1] = RB_ROOT;
@@ -1587,6 +1587,7 @@ int __hists__init(struct hists *hists)
 	hists->entries = RB_ROOT;
 	pthread_mutex_init(&hists->lock, NULL);
 	hists->socket_filter = -1;
+	hists->hpp_list = hpp_list;
 	return 0;
 }
 
@@ -1623,7 +1624,7 @@ static int hists_evsel__init(struct perf_evsel *evsel)
 {
 	struct hists *hists = evsel__hists(evsel);
 
-	__hists__init(hists);
+	__hists__init(hists, &perf_hpp_list);
 	return 0;
 }
 
diff --git a/tools/perf/util/hist.h b/tools/perf/util/hist.h
index a39c9c1159ff..b296ff5b9683 100644
--- a/tools/perf/util/hist.h
+++ b/tools/perf/util/hist.h
@@ -75,6 +75,7 @@ struct hists {
 	u64			event_stream;
 	u16			col_len[HISTC_NR_COLS];
 	int			socket_filter;
+	struct perf_hpp_list	*hpp_list;
 };
 
 struct hist_entry_iter;
@@ -186,7 +187,7 @@ static inline struct hists *evsel__hists(struct perf_evsel *evsel)
 }
 
 int hists__init(void);
-int __hists__init(struct hists *hists);
+int __hists__init(struct hists *hists, struct perf_hpp_list *hpp_list);
 
 struct rb_root *hists__get_rotate_entries_in(struct hists *hists);
 bool hists__collapse_insert_entry(struct hists *hists __maybe_unused,
-- 
2.5.0

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[GIT PULL 00/29] perf/core improvements and fixes Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-02-03 17:40 +0100
  [PATCH 25/29] perf hists: Introduce hists__for_each_format macro Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-02-03 17:40 +0100
  [PATCH 01/29] perf hists: Factor output_resort from hists__output_resort Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-02-03 17:40 +0100
  [PATCH 03/29] perf hists: Add _idx fields into struct perf_hpp_fmt Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-02-03 17:40 +0100
  [PATCH 26/29] perf hists: Introduce hists__for_each_sort_list macro Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-02-03 17:40 +0100
  [PATCH 23/29] perf hists: Add struct perf_hpp_list argument to helper functions Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-02-03 17:40 +0100
  [PATCH 27/29] perf report: Update documentation of --sort option Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-02-03 17:40 +0100
  [PATCH 20/29] perf hists: Introduce perf_hpp_list__for_each_format_safe macro Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-02-03 17:40 +0100
  [PATCH 22/29] perf hists: Introduce perf_hpp_list__for_each_sort_list_safe macro Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-02-03 17:40 +0100
  [PATCH 14/29] perf hists: Separate output fields parsing into setup_output_list function Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-02-03 17:40 +0100
  [PATCH 02/29] perf hists: Introduce perf_evsel__output_resort function Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-02-03 17:40 +0100
  [PATCH 07/29] perf hists: Make hpp setup function generic Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-02-03 17:50 +0100
  [PATCH 15/29] perf hists: Introduce struct perf_hpp_list Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-02-03 17:50 +0100
  [PATCH 17/29] perf hists: Add perf_hpp_list register helpers Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-02-03 17:50 +0100
  [PATCH 19/29] perf hists: Introduce perf_hpp_list__for_each_format macro Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-02-03 17:50 +0100
  [PATCH 13/29] perf hists: Separate sort fields parsing into setup_sort_list function Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-02-03 17:50 +0100
  [PATCH 16/29] perf hists: Introduce perf_hpp_list__init function Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-02-03 17:50 +0100
  [PATCH 24/29] perf tools: Add hpp_list into struct hists object Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-02-03 17:50 +0100
  [PATCH 12/29] perf hists: Properly release format fields Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-02-03 17:50 +0100
  [PATCH 10/29] perf hists: Allocate output sort field Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-02-03 17:50 +0100
  [PATCH 08/29] perf report: Move UI initialization ahead of sort setup Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-02-03 17:50 +0100
  [PATCH 06/29] perf hists: Add 'hpp__equal' callback function Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-02-03 17:50 +0100
  [PATCH 21/29] perf hists: Introduce perf_hpp_list__for_each_sort_list macro Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-02-03 17:50 +0100
  [PATCH 04/29] perf hists: Use struct perf_hpp_fmt::idx in perf_hpp__reset_width Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-02-03 17:50 +0100
  [PATCH 11/29] perf hists: Remove perf_hpp__column_(disable|enable) Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-02-03 17:50 +0100
  [PATCH 18/29] perf hists: Pass perf_hpp_list all the way through setup_output_list Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-02-03 18:00 +0100
  [PATCH 28/29] perf report: Update documention of --percent-limit option Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-02-03 18:00 +0100
  [PATCH 09/29] perf top: Move UI initialization ahead of sort setup Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-02-03 18:00 +0100
  [PATCH 29/29] perf hists browser: Add 'L' hotkey to change percent limit Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-02-03 18:00 +0100
  Re: [GIT PULL 00/29] perf/core improvements and fixes Ingo Molnar <mingo@kernel.org> - 2016-02-04 09:00 +0100

csiph-web