mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 11:41:38 -04:00
perf hists: Move he->stat.nr_events initialization to a template
Since it is set to 1 for a new hist entry, no need to set to separately. Move it to a template entry. Signed-off-by: Namhyung Kim <[email protected]> Cc: Arun Sharma <[email protected]> Cc: Frederic Weisbecker <[email protected]> Cc: Ingo Molnar <[email protected]> Cc: Jiri Olsa <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Stephane Eranian <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
This commit is contained in:
parent
b24c28f794
commit
c4b35351ef
1 changed files with 3 additions and 1 deletions
|
|
@ -223,7 +223,7 @@ static struct hist_entry *hist_entry__new(struct hist_entry *template)
|
|||
|
||||
if (he != NULL) {
|
||||
*he = *template;
|
||||
he->stat.nr_events = 1;
|
||||
|
||||
if (he->ms.map)
|
||||
he->ms.map->referenced = true;
|
||||
if (symbol_conf.use_callchain)
|
||||
|
|
@ -323,6 +323,7 @@ struct hist_entry *__hists__add_branch_entry(struct hists *self,
|
|||
.level = al->level,
|
||||
.stat = {
|
||||
.period = period,
|
||||
.nr_events = 1,
|
||||
},
|
||||
.parent = sym_parent,
|
||||
.filtered = symbol__parent_filter(sym_parent),
|
||||
|
|
@ -348,6 +349,7 @@ struct hist_entry *__hists__add_entry(struct hists *self,
|
|||
.level = al->level,
|
||||
.stat = {
|
||||
.period = period,
|
||||
.nr_events = 1,
|
||||
},
|
||||
.parent = sym_parent,
|
||||
.filtered = symbol__parent_filter(sym_parent),
|
||||
|
|
|
|||
Loading…
Reference in a new issue