diff options
Diffstat (limited to 'tools/perf/util/evlist.c')
-rw-r--r-- | tools/perf/util/evlist.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/tools/perf/util/evlist.c b/tools/perf/util/evlist.c index fa1837088ca8..3f16e08a5c8d 100644 --- a/tools/perf/util/evlist.c +++ b/tools/perf/util/evlist.c | |||
@@ -111,8 +111,11 @@ int perf_evlist__add_default(struct perf_evlist *evlist) | |||
111 | .type = PERF_TYPE_HARDWARE, | 111 | .type = PERF_TYPE_HARDWARE, |
112 | .config = PERF_COUNT_HW_CPU_CYCLES, | 112 | .config = PERF_COUNT_HW_CPU_CYCLES, |
113 | }; | 113 | }; |
114 | struct perf_evsel *evsel = perf_evsel__new(&attr, 0); | 114 | struct perf_evsel *evsel; |
115 | |||
116 | event_attr_init(&attr); | ||
115 | 117 | ||
118 | evsel = perf_evsel__new(&attr, 0); | ||
116 | if (evsel == NULL) | 119 | if (evsel == NULL) |
117 | goto error; | 120 | goto error; |
118 | 121 | ||