Re: [PATCH 01/10] perf/core, x86: Add PERF_SAMPLE_LBR_TOS
From: Peter Zijlstra
Date: Tue Oct 08 2019 - 12:32:30 EST
On Tue, Oct 08, 2019 at 11:25:01AM -0400, Liang, Kan wrote:
> > The perf tool bloody sets the perf_event_attr::branch_sample_type value!
> > Of course it knows to expect the TOS field when it asks for it in the
> > first place.
> >
>
> Users may generate the perf.data on one machine, and parse the data on
> another machine.
> If the perf.data is from a new kernel with a new perf tool on one machine,
> but users have an old perf tool on another machine to parse it. The old perf
> tool doesn't know the exists of TOS field.
Feh, the tool should check for unknown input bits in attr.
Anyway, the proposed API is horrendous crap, that's just not going to
happen.