return 0;
}
-static int start_perf_record(int control_fd[], int ack_fd[],
- const char *cpumap_buf)
+static int evsel__tpebs_start_perf_record(struct evsel *evsel, int control_fd[], int ack_fd[])
{
const char **record_argv;
int ret;
char buf[32];
+ char cpumap_buf[50];
+
+ cpu_map__snprint(evsel->evlist->core.user_requested_cpus, cpumap_buf,
+ sizeof(cpumap_buf));
scnprintf(buf, sizeof(buf), "--control=fd:%d,%d", control_fd[0], ack_fd[1]);
return ret;
if (tpebs_event_size > 0) {
- struct evlist *evsel_list = evsel->evlist;
- char cpumap_buf[50];
struct pollfd pollfd = { .events = POLLIN, };
int control_fd[2], ack_fd[2], len;
char ack_buf[8];
goto out;
}
- cpu_map__snprint(evsel_list->core.user_requested_cpus, cpumap_buf,
- sizeof(cpumap_buf));
-
- ret = start_perf_record(control_fd, ack_fd, cpumap_buf);
+ ret = evsel__tpebs_start_perf_record(evsel, control_fd, ack_fd);
if (ret)
goto out;