Skip to content

Commit

Permalink
perf hists: Add struct hists pointer to struct hist_entry
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Jiri Olsa authored and Arnaldo Carvalho de Melo committed Oct 4, 2012
1 parent ae0c1f9 commit ae359f1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tools/perf/util/hist.c
Original file line number Diff line number Diff line change
Expand Up @@ -325,6 +325,7 @@ struct hist_entry *__hists__add_branch_entry(struct hists *self,
.parent = sym_parent,
.filtered = symbol__parent_filter(sym_parent),
.branch_info = bi,
.hists = self,
};

return add_hist_entry(self, &entry, al, period);
Expand All @@ -346,6 +347,7 @@ struct hist_entry *__hists__add_entry(struct hists *self,
.period = period,
.parent = sym_parent,
.filtered = symbol__parent_filter(sym_parent),
.hists = self,
};

return add_hist_entry(self, &entry, al, period);
Expand Down
1 change: 1 addition & 0 deletions tools/perf/util/sort.h
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ struct hist_entry {
struct rb_root sorted_chain;
};
struct branch_info *branch_info;
struct hists *hists;
struct callchain_root callchain[0];
};

Expand Down

0 comments on commit ae359f1

Please sign in to comment.