Re: [PATCH 1/5] perf tools: Add fallback functions for cases where cpumode is insufficient

From: Arnaldo Carvalho de Melo
Date: Tue Nov 27 2018 - 07:36:48 EST


Em Mon, Nov 26, 2018 at 04:41:45PM -0300, Arnaldo Carvalho de Melo escreveu:
> Em Mon, Nov 26, 2018 at 04:02:17PM -0300, Arnaldo Carvalho de Melo escreveu:
> > Em Mon, Nov 05, 2018 at 07:53:17PM +0000, Hunter, Adrian escreveu:
> > > > From: Arnaldo Carvalho de Melo [mailto:acme@xxxxxxxxxx]
> > > > Em Mon, Nov 05, 2018 at 07:21:44PM +0000, Hunter, Adrian escreveu:
> > > > > > > +static bool machine__single_ku_as(struct machine *machine) {
> > > > > > > + return strcmp(perf_env__arch(machine->env), "sparc"); }
>
> > > > > > Can we avoid having this strcmp be done repeatedly?
>
> > > > > It is only done if there are mapping errors
>
> > > > > > Can we avoid having this strcmp be done repeatedly? I.e. just
> > > > > > make this a boolean initialized at session start, when
> > > > > > machine->env is setup, so we'd have:
>
> > > > > > machine->single_address_space
>
> > > > > > Instead of a function?
>
> > > > > Sure thing.
> >
> > Have you sent an update to this patch series addressing the concerns? I
> > think that renaming that _fb to __fallback and having this
> > machine->single_address_space is what is missing, I'll try to take a
> > stab at this now and have it in my perf/core branch soon.
>
> > But you have this already done, please send it.
>
> So, here is the patch on top of yours and at the end a patch that I'm
> inserting just before yours, please check and ack, thanks:


Argh, nevermind, just saw your V2, /me goes to read it ;-\

- Arnaldo