Re: [RFC PATCH v2] perf evsel: Fallback to task-clock when not system wide

From: Namhyung Kim
Date: Mon Dec 04 2023 - 17:55:26 EST


On Mon, Dec 4, 2023 at 8:02 AM Ian Rogers <irogers@xxxxxxxxxx> wrote:
>
> On Mon, Nov 20, 2023 at 4:04 PM Ian Rogers <irogers@xxxxxxxxxx> wrote:
> >
> > When the cycles event isn't available evsel will fallback to the
> > cpu-clock software event. task-clock is similar to cpu-clock but only
> > runs when the process is running. Falling back to cpu-clock when not
> > system wide leads to confusion, by falling back to task-clock it is
> > hoped the confusion is less.
> >
> > Pass the target to determine if task-clock is more appropriate. Update
> > a nearby comment and debug string for the change.
> >
> > ---
> > v2. Use target__has_cpu as suggested by Namhyung.
> > https://lpc.events/event/17/contributions/1556/
> >
> > Signed-off-by: Ian Rogers <irogers@xxxxxxxxxx>

Acked-by: Namhyung Kim <namhyung@xxxxxxxxxx>

Thanks,
Namhyung