6539ec912c7068f83a449ee3203baa2fe1e049c3
4 struct perf_evsel
*perf_evsel__new(u32 type
, u64 config
, int idx
)
6 struct perf_evsel
*evsel
= zalloc(sizeof(*evsel
));
10 evsel
->attr
.type
= type
;
11 evsel
->attr
.config
= config
;
12 INIT_LIST_HEAD(&evsel
->node
);
18 int perf_evsel__alloc_fd(struct perf_evsel
*evsel
, int ncpus
, int nthreads
)
20 evsel
->fd
= xyarray__new(ncpus
, nthreads
, sizeof(int));
21 return evsel
->fd
!= NULL
? 0 : -ENOMEM
;
24 void perf_evsel__free_fd(struct perf_evsel
*evsel
)
26 xyarray__delete(evsel
->fd
);
30 void perf_evsel__delete(struct perf_evsel
*evsel
)
32 assert(list_empty(&evsel
->node
));
33 xyarray__delete(evsel
->fd
);
This page took 0.030644 seconds and 4 git commands to generate.