evsel.h 565 B

123456789101112131415161718192021222324
  1. #ifndef __PERF_EVSEL_H
  2. #define __PERF_EVSEL_H 1
  3. #include <linux/list.h>
  4. #include <linux/perf_event.h>
  5. #include "types.h"
  6. #include "xyarray.h"
  7. struct perf_evsel {
  8. struct list_head node;
  9. struct perf_event_attr attr;
  10. char *filter;
  11. struct xyarray *fd;
  12. int idx;
  13. void *priv;
  14. };
  15. struct perf_evsel *perf_evsel__new(u32 type, u64 config, int idx);
  16. void perf_evsel__delete(struct perf_evsel *evsel);
  17. int perf_evsel__alloc_fd(struct perf_evsel *evsel, int ncpus, int nthreads);
  18. void perf_evsel__free_fd(struct perf_evsel *evsel);
  19. #endif /* __PERF_EVSEL_H */