]> git.openfabrics.org - ~shefty/rdma-dev.git/blobdiff - tools/perf/util/evsel.c
Merge branch 'perf/urgent' into perf/core
[~shefty/rdma-dev.git] / tools / perf / util / evsel.c
index b38eaa34b28e2fe8b9ffef125f6bab915b35ce3e..ee68d6944e61883ca62660b1071e30ff3e4ddd06 100644 (file)
@@ -34,6 +34,16 @@ int __perf_evsel__sample_size(u64 sample_type)
        return size;
 }
 
+static void hists__init(struct hists *hists)
+{
+       memset(hists, 0, sizeof(*hists));
+       hists->entries_in_array[0] = hists->entries_in_array[1] = RB_ROOT;
+       hists->entries_in = &hists->entries_in_array[0];
+       hists->entries_collapsed = RB_ROOT;
+       hists->entries = RB_ROOT;
+       pthread_mutex_init(&hists->lock, NULL);
+}
+
 void perf_evsel__init(struct perf_evsel *evsel,
                      struct perf_event_attr *attr, int idx)
 {