diff options
| author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2012-11-12 11:20:03 -0500 |
|---|---|---|
| committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2012-11-14 14:50:47 -0500 |
| commit | 30193d78d82a68247aa628a2414dc0f76c5b8093 (patch) | |
| tree | 353f7186eb4d55ca4da7a5147a636d43cf0c44be /tools/perf | |
| parent | 61e945150fe0ec4c20b7a3663b90c7ab705a88b4 (diff) | |
perf hists: Initialize all of he->stat with zeroes
Not just nr_events and period.
Reported-by: Namhyung Kim <namhyung@gmail.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Namhyung Kim <namhyung@gmail.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/n/tip-8nodd6b4bytyf1snf96oy531@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf')
| -rw-r--r-- | tools/perf/util/hist.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/tools/perf/util/hist.c b/tools/perf/util/hist.c index 7c6e73b1b7e..cb17e2a8c6e 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, | |||
| 742 | 742 | ||
| 743 | he = hist_entry__new(pair); | 743 | he = hist_entry__new(pair); |
| 744 | if (he) { | 744 | if (he) { |
| 745 | he->stat.nr_events = 0; | 745 | memset(&he->stat, 0, sizeof(he->stat)); |
| 746 | he->stat.period = 0; | 746 | he->hists = hists; |
| 747 | he->hists = hists; | ||
| 748 | rb_link_node(&he->rb_node, parent, p); | 747 | rb_link_node(&he->rb_node, parent, p); |
| 749 | rb_insert_color(&he->rb_node, &hists->entries); | 748 | rb_insert_color(&he->rb_node, &hists->entries); |
| 750 | hists__inc_nr_entries(hists, he); | 749 | hists__inc_nr_entries(hists, he); |
