RE: [PATCH V7 00/17] perf, x86: Haswell LBR call stack support

From: Liang, Kan
Date: Wed Nov 05 2014 - 12:04:38 EST




> On Wed, Nov 05, 2014 at 04:22:09PM +0000, Liang, Kan wrote:
> >
> > >>
> > >
> > > So if I take all except 11,13,16,17 but instead do something like
> > > the below, everything will work just fine, right?
> > >
> > > Or am I missing something?
> > >
> >
> > Yes, it should work. Then LBR callstack will rely on user to enable it.
> > But user never get the LBR callstack data if it's available.
> > I'm not sure why you do that?
>
> Uhm what? If you request PERF_SAMPLE_BRANCH_CALL_STACK the user
> will get the data through the regular PERF_SAMPLE_BRANCH_STACK
> output of PERF_RECORD_SAMPLE, right?

OK, I think I should understand your meaning.
>From the kernel side, we provide a 3rd callchain option to user.
The kernel only tries to enable LBR and prepare the data if possible.
The kernel doesn't guarantee the data must come from hardware LBR,
even user choose LBR callchain option.

It's user tool's responsibility to filter the request, choose the data source
and reconstruct the data. It's not the scope of this kernel patch. That
should depend on the implementation of another user tool patchset.

What do you think?

Thanks,
Kan
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/