diff options
Diffstat (limited to 'tools/lib/perf/evsel.c')
-rw-r--r-- | tools/lib/perf/evsel.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/tools/lib/perf/evsel.c b/tools/lib/perf/evsel.c index bd8c2f19ef74..dccdc3456b23 100644 --- a/tools/lib/perf/evsel.c +++ b/tools/lib/perf/evsel.c @@ -18,10 +18,12 @@ #include <sys/ioctl.h> #include <sys/mman.h> -void perf_evsel__init(struct perf_evsel *evsel, struct perf_event_attr *attr) +void perf_evsel__init(struct perf_evsel *evsel, struct perf_event_attr *attr, + int idx) { INIT_LIST_HEAD(&evsel->node); evsel->attr = *attr; + evsel->idx = idx; } struct perf_evsel *perf_evsel__new(struct perf_event_attr *attr) @@ -29,7 +31,7 @@ struct perf_evsel *perf_evsel__new(struct perf_event_attr *attr) struct perf_evsel *evsel = zalloc(sizeof(*evsel)); if (evsel != NULL) - perf_evsel__init(evsel, attr); + perf_evsel__init(evsel, attr, 0); return evsel; } |