diff options
Diffstat (limited to 'tools/perf/util/evsel.c')
-rw-r--r-- | tools/perf/util/evsel.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tools/perf/util/evsel.c b/tools/perf/util/evsel.c index b38eaa34b28e..ee68d6944e61 100644 --- a/tools/perf/util/evsel.c +++ b/tools/perf/util/evsel.c | |||
@@ -34,6 +34,16 @@ int __perf_evsel__sample_size(u64 sample_type) | |||
34 | return size; | 34 | return size; |
35 | } | 35 | } |
36 | 36 | ||
37 | static void hists__init(struct hists *hists) | ||
38 | { | ||
39 | memset(hists, 0, sizeof(*hists)); | ||
40 | hists->entries_in_array[0] = hists->entries_in_array[1] = RB_ROOT; | ||
41 | hists->entries_in = &hists->entries_in_array[0]; | ||
42 | hists->entries_collapsed = RB_ROOT; | ||
43 | hists->entries = RB_ROOT; | ||
44 | pthread_mutex_init(&hists->lock, NULL); | ||
45 | } | ||
46 | |||
37 | void perf_evsel__init(struct perf_evsel *evsel, | 47 | void perf_evsel__init(struct perf_evsel *evsel, |
38 | struct perf_event_attr *attr, int idx) | 48 | struct perf_event_attr *attr, int idx) |
39 | { | 49 | { |