Re: [PATCH 0/7] Rewrite jevents program in python

From: Peter Zijlstra
Date: Wed May 11 2022 - 09:57:22 EST


On Wed, May 11, 2022 at 06:50:59AM -0700, Ian Rogers wrote:
> On Wed, May 11, 2022 at 12:35 AM Peter Zijlstra <peterz@xxxxxxxxxxxxx> wrote:
> >
> > On Wed, May 11, 2022 at 12:01:26AM -0700, Ian Rogers wrote:
> >
> > > The changes here switch from jevents.c to a rewrite in python called
> > > jevents.py. This means there is a build time dependency on python, but
> > > such a dependency already exists for asciidoc (used to generate perf's
> > > man pages).
> >
> > You mean just building perf (not the docs) will now require snake stuff?
> >
> > That's very tedious :/ I don't typically have snakes on my machines.
>
> Hi Peter,
>
> You're right that after these changes python is a build requirement
> for jevents. We could keep the C code around for the case that python
> isn't there, but I want to do things like remove the string
> relocations, sort the events by name so we don't linearly search, etc.
> which would be a massive chore to keep alive on the C side. An
> alternative would be to have an empty pmu-events.c file that is used
> for this case. If you wanted to keep things in C and have jevents like
> event names, you could use the empty version and link in libpfm4.

I'm not normally linking to libpfm4. All I really care about is that I
can still build a bare cli perf (not even tui). If all the snake stuff
is purely optional and it just disables some features, but I do get a
perf out at the end, then I'm all good.