diff options
author | Jiri Olsa <jolsa@redhat.com> | 2012-10-04 08:49:35 -0400 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2012-10-04 12:27:00 -0400 |
commit | ae359f193a80e19166efaed7d400d1476057b865 (patch) | |
tree | 0d305573b807508e442b5777ed0fb1246c610f0b /tools | |
parent | ae0c1f993411d88bf54c9e20a4249ebcc7a041f9 (diff) |
perf hists: Add struct hists pointer to struct hist_entry
Adding pointer back to the parent struct hists for struct hists_entry.
This will be useful in future for any hist_entry's data computation,
that depends on total data of its parent hists.
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-2-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')
-rw-r--r-- | tools/perf/util/hist.c | 2 | ||||
-rw-r--r-- | tools/perf/util/sort.h | 1 |
2 files changed, 3 insertions, 0 deletions
diff --git a/tools/perf/util/hist.c b/tools/perf/util/hist.c index 236bc9d98ff2..040f34c79a53 100644 --- a/tools/perf/util/hist.c +++ b/tools/perf/util/hist.c | |||
@@ -325,6 +325,7 @@ struct hist_entry *__hists__add_branch_entry(struct hists *self, | |||
325 | .parent = sym_parent, | 325 | .parent = sym_parent, |
326 | .filtered = symbol__parent_filter(sym_parent), | 326 | .filtered = symbol__parent_filter(sym_parent), |
327 | .branch_info = bi, | 327 | .branch_info = bi, |
328 | .hists = self, | ||
328 | }; | 329 | }; |
329 | 330 | ||
330 | return add_hist_entry(self, &entry, al, period); | 331 | return add_hist_entry(self, &entry, al, period); |
@@ -346,6 +347,7 @@ struct hist_entry *__hists__add_entry(struct hists *self, | |||
346 | .period = period, | 347 | .period = period, |
347 | .parent = sym_parent, | 348 | .parent = sym_parent, |
348 | .filtered = symbol__parent_filter(sym_parent), | 349 | .filtered = symbol__parent_filter(sym_parent), |
350 | .hists = self, | ||
349 | }; | 351 | }; |
350 | 352 | ||
351 | return add_hist_entry(self, &entry, al, period); | 353 | return add_hist_entry(self, &entry, al, period); |
diff --git a/tools/perf/util/sort.h b/tools/perf/util/sort.h index 12d634792de5..eb3959b8e9d9 100644 --- a/tools/perf/util/sort.h +++ b/tools/perf/util/sort.h | |||
@@ -79,6 +79,7 @@ struct hist_entry { | |||
79 | struct rb_root sorted_chain; | 79 | struct rb_root sorted_chain; |
80 | }; | 80 | }; |
81 | struct branch_info *branch_info; | 81 | struct branch_info *branch_info; |
82 | struct hists *hists; | ||
82 | struct callchain_root callchain[0]; | 83 | struct callchain_root callchain[0]; |
83 | }; | 84 | }; |
84 | 85 | ||