Re: [PATCH 09/17] perf tools: Detect avalibility of write_backward

From: Arnaldo Carvalho de Melo
Date: Fri May 20 2016 - 11:39:12 EST


Em Fri, May 20, 2016 at 11:31:44PM +0800, Wangnan (F) escreveu:
>
>
> On 2016/5/13 21:08, Arnaldo Carvalho de Melo wrote:
> > Em Fri, May 13, 2016 at 07:56:06AM +0000, Wang Nan escreveu:
> > > Detect avalibility of write_backward and save the result into
> > > record_opts. With write_backward the start pointer of a ring
> > > buffer mapped read only can be found reliably.
> > We have perf_missing_features for that, please try to use it.
>
> I'll try it, but write_backward can't fallback, if kernel doesn't
> support it, I think we'd better throw an error earlier. Using
> perf_missing_features we get error during opening the event, so if we want
> to fail earlier we still need API probing.

Conceptually 'perf_missing_features' shouldn't be strictly tied to
fallbacking, its just a way to mark what perf features are missing in
the current kernel, that info may be used for fallbacking, or for any
other purpose.

- Arnaldo