24 siginfo_t *info __maybe_unused,
25 void *ucontext __maybe_unused)
46 const char *argv[] = {
"true", NULL };
56 pr_debug(
"perf_evlist__new_default\n");
68 if (!cpus || !threads) {
70 pr_debug(
"Not enough memory to create thread/cpu maps\n");
82 pr_debug(
"Couldn't run the workload!\n");
83 goto out_delete_evlist;
89 evsel->
attr.sample_freq = 1000000;
91 evsel->
attr.sample_freq = 1;
93 evsel->
attr.inherit = 0;
94 evsel->
attr.watermark = 0;
95 evsel->
attr.wakeup_events = 1;
96 evsel->
attr.exclude_kernel = 1;
100 pr_debug(
"Couldn't open the evlist: %s\n",
101 str_error_r(-err, sbuf,
sizeof(sbuf)));
102 goto out_delete_evlist;
106 pr_debug(
"failed to mmap events: %d (%s)\n", errno,
107 str_error_r(errno, sbuf,
sizeof(sbuf)));
108 goto out_delete_evlist;
114 md = &evlist->
mmap[0];
119 if (event->
header.type == PERF_RECORD_EXIT)
void perf_evlist__set_maps(struct perf_evlist *evlist, struct cpu_map *cpus, struct thread_map *threads)
int perf_evlist__prepare_workload(struct perf_evlist *evlist, struct target *target, const char *argv[], bool pipe_output, void(*exec_error)(int signo, siginfo_t *info, void *ucontext))
void perf_mmap__consume(struct perf_mmap *map)
struct cpu_map * cpu_map__dummy_new(void)
struct perf_evlist * perf_evlist__new_default(void)
void perf_evlist__delete(struct perf_evlist *evlist)
int perf_evlist__start_workload(struct perf_evlist *evlist)
struct thread_map * thread_map__new_by_tid(pid_t tid)
void cpu_map__put(struct cpu_map *map)
int perf_mmap__read_init(struct perf_mmap *map)
int perf_evlist__poll(struct perf_evlist *evlist, int timeout)
#define pr_debug(fmt,...)
int perf_evlist__open(struct perf_evlist *evlist)
static void workload_exec_failed_signal(int signo __maybe_unused, siginfo_t *info __maybe_unused, void *ucontext __maybe_unused)
int test__task_exit(struct test *test __maybe_unused, int subtest __maybe_unused)
static void sig_handler(int sig __maybe_unused)
int perf_evlist__mmap(struct perf_evlist *evlist, unsigned int pages)
static struct thread_data threads[THREADS]
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 thread_map__put(struct thread_map *map)
struct perf_event_attr attr