Re: [RFC PATCH v18 8/8] perf test: Add test for Intel TPEBS counting mode
From: Arnaldo Carvalho de Melo
Date: Tue Aug 13 2024 - 14:36:12 EST
On Tue, Aug 13, 2024 at 03:27:39PM -0300, Arnaldo Carvalho de Melo wrote:
> On Tue, Aug 13, 2024 at 10:48:21AM -0700, Ian Rogers wrote:
> > On Tue, Aug 13, 2024 at 10:18 AM Wang, Weilin <weilin.wang@xxxxxxxxx> wrote:
> > > I just checkout the code and tested it. The failure is caused by a seg fault on a
> > > perf_tool struct that is not initialized correctly. I think this is related to the patches
> > > on struct perf_tool in this branch that applied right before the tpebs patches.
>
> > > I was able to fix the seg fault by adding the perf_tool__fill_defaults() back. Since
> > > Ian updated the code to replace this function, I think I need some advice on how
> > > to use the new code to initialize perf_tool correctly here. Should I call the
> > > perf_tool__init()?
>
> > Yep. If you've added or refactored a tool struct the intent now is
> > that you call perf_tool__init then override the functions you want to
> > override. I don't mind to rebase those changes over your changes,
> > Arnaldo if you want to drop those changes.
>
> So I'm adding the patch below, which should be enough, right?
Everything is in tmp.perf-tools-next, will move to perf-tools-next at
the end of the day/early tomorrow, after the container build tests
finish.
- Arnaldo