aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <[email protected]>2012-11-12 13:20:03 -0300
committerArnaldo Carvalho de Melo <[email protected]>2012-11-14 16:50:47 -0300
commit30193d78d82a68247aa628a2414dc0f76c5b8093 (patch)
tree353f7186eb4d55ca4da7a5147a636d43cf0c44be
parent61e945150fe0ec4c20b7a3663b90c7ab705a88b4 (diff)
perf hists: Initialize all of he->stat with zeroes
Not just nr_events and period. Reported-by: Namhyung Kim <[email protected]> Cc: David Ahern <[email protected]> Cc: Frederic Weisbecker <[email protected]> Cc: Jiri Olsa <[email protected]> Cc: Mike Galbraith <[email protected]> Cc: Namhyung Kim <[email protected]> Cc: Paul Mackerras <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Stephane Eranian <[email protected]> Link: http://lkml.kernel.org/n/[email protected] Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
-rw-r--r--tools/perf/util/hist.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/tools/perf/util/hist.c b/tools/perf/util/hist.c
index 7c6e73b1b7ea..cb17e2a8c6ed 100644
--- a/tools/perf/util/hist.c
+++ b/tools/perf/util/hist.c
@@ -742,9 +742,8 @@ static struct hist_entry *hists__add_dummy_entry(struct hists *hists,
he = hist_entry__new(pair);
if (he) {
- he->stat.nr_events = 0;
- he->stat.period = 0;
- he->hists = hists;
+ memset(&he->stat, 0, sizeof(he->stat));
+ he->hists = hists;
rb_link_node(&he->rb_node, parent, p);
rb_insert_color(&he->rb_node, &hists->entries);
hists__inc_nr_entries(hists, he);