2 #include <linux/types.h> 13 #define CHECK__(x) { \ 15 pr_debug(#x " failed!\n"); \ 20 #define CHECK_NOT_NULL__(x) { \ 21 while ((x) == NULL) { \ 22 pr_debug(#x " failed!\n"); \ 34 for (i = 0; i < evlist->
nr_mmaps; i++) {
35 md = &evlist->
mmap[i];
39 if (event->
header.type == PERF_RECORD_COMM &&
40 (pid_t)event->
comm.
pid == getpid() &&
41 (pid_t)event->
comm.
tid == getpid() &&
62 .user_freq = UINT_MAX,
63 .user_interval = ULLONG_MAX,
94 evsel->
attr.disabled = 1;
95 evsel->
attr.enable_on_exec = 0;
98 pr_debug(
"Unable to open dummy and cycles event\n");
112 comm =
"Test COMM 1";
119 pr_debug(
"First time, failed to find tracking event.\n");
134 comm =
"Test COMM 2";
141 pr_debug(
"Seconf time, failed to find tracking event.\n");
void perf_evlist__set_maps(struct perf_evlist *evlist, struct cpu_map *cpus, struct thread_map *threads)
void perf_mmap__consume(struct perf_mmap *map)
void perf_evlist__enable(struct perf_evlist *evlist)
void perf_evlist__delete(struct perf_evlist *evlist)
int perf_evsel__disable(struct perf_evsel *evsel)
static int find_comm(struct perf_evlist *evlist, const char *comm)
int parse_events(struct perf_evlist *evlist, const char *str, struct parse_events_error *err)
void cpu_map__put(struct cpu_map *map)
int perf_mmap__read_init(struct perf_mmap *map)
#define pr_debug(fmt,...)
int perf_evlist__open(struct perf_evlist *evlist)
int test__keep_tracking(struct test *test __maybe_unused, int subtest __maybe_unused)
#define CHECK_NOT_NULL__(x)
void perf_evlist__config(struct perf_evlist *evlist, struct record_opts *opts, struct callchain_param *callchain)
int perf_evlist__mmap(struct perf_evlist *evlist, unsigned int pages)
void perf_mmap__read_done(struct perf_mmap *map)
struct perf_event_header header
static struct perf_evsel * perf_evlist__first(struct perf_evlist *evlist)
union perf_event * perf_mmap__read_event(struct perf_mmap *map)
void perf_evlist__disable(struct perf_evlist *evlist)
void thread_map__put(struct thread_map *map)
static struct perf_evsel * perf_evlist__last(struct perf_evlist *evlist)
struct thread_map * thread_map__new(pid_t pid, pid_t tid, uid_t uid)
struct cpu_map * cpu_map__new(const char *cpu_list)
struct perf_evlist * perf_evlist__new(void)
struct perf_event_attr attr