On 2016/7/6 18:53, Jiri Olsa wrote:
On Mon, Jul 04, 2016 at 06:20:02AM +0000, Wang Nan wrote: SNIPdiff --git a/tools/perf/util/evsel.c b/tools/perf/util/evsel.c index 0fea724..3abe519 100644 --- a/tools/perf/util/evsel.c +++ b/tools/perf/util/evsel.c @@ -1359,6 +1359,9 @@ static int __perf_evsel__open(struct perf_evsel *evsel, struct cpu_map *cpus, int pid = -1, err; enum { NO_CHANGE, SET_TO_MAX, INCREASED_MAX } set_rlimit = NO_CHANGE;+ if (perf_missing_features.write_backward && evsel->attr.write_backward)+ return -EINVAL; + if (evsel->system_wide) nthreads = 1; else @@ -1389,11 +1392,6 @@ fallback_missing_features: if (perf_missing_features.lbr_flags) evsel->attr.branch_sample_type &= ~(PERF_SAMPLE_BRANCH_NO_FLAGS | PERF_SAMPLE_BRANCH_NO_CYCLES); - if (perf_missing_features.write_backward) { - if (evsel->overwrite) - return -EINVAL; - evsel->attr.write_backward = false; - }so we don't change the attr.write_backward anymore? based on the kernel support..
We don't need fallback here. If evsel->attr.write_backward is selected and it is missing, we should fail.
we do it for other features, why not here? also changelog did not mentioned it at all ;-) thanks, jirka

