Re: [PATCH v13 1/8] perf tools: Drop redundant evsel->overwrite indicator

From: Jiri Olsa
Date: Wed Jul 06 2016 - 06:53:41 EST


On Mon, Jul 04, 2016 at 06:20:02AM +0000, Wang Nan wrote:

SNIP

> diff --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 do it for other features, why not here? also changelog
did not mentioned it at all ;-)

thanks,
jirka