Message ID | 5775CD34.6030107@huawei.com |
---|---|
State | New |
Headers | show |
diff --git a/tools/perf/util/evsel.c b/tools/perf/util/evsel.c index 1d8f2bb..3e91c63 100644 --- a/tools/perf/util/evsel.c +++ b/tools/perf/util/evsel.c @@ -1418,6 +1418,9 @@ retry_open: pr_debug2("sys_perf_event_open: pid %d cpu %d group_fd %d flags %#lx\n", pid, cpus->map[cpu], group_fd, flags); + if (evsel->attr.write_backward) + FD(evsel, cpu, thread) = -EINVAL; + else FD(evsel, cpu, thread) = sys_perf_event_open(&evsel->attr,