diff options
author | Olof Johansson <olof@lixom.net> | 2011-12-13 19:35:03 -0800 |
---|---|---|
committer | Olof Johansson <olof@lixom.net> | 2011-12-13 19:35:03 -0800 |
commit | 2da994e687f7991cc76e3270c423bf6500b9424a (patch) | |
tree | 437d685035c2a39395f14c233831422ed636c016 /tools/perf/util/evsel.c | |
parent | 00e929808a1cb410f45a620c0fc79d8d0a2506b1 (diff) | |
parent | db33f4de9952af112b0d4f2436ce931ae632aba0 (diff) |
Merge branch 'orion/devel' into next/devel
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 e42626422587..d7915d4e77cb 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) 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) { |