[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <YjpBch/kqSn3Bmfy@kernel.org>
Date: Tue, 22 Mar 2022 18:36:50 -0300
From: Arnaldo Carvalho de Melo <acme@...nel.org>
To: kajoljain <kjain@...ux.ibm.com>
Cc: Kim Phillips <kim.phillips@....com>,
Arnaldo Carvalho de Melo <acme@...hat.com>,
linux-kernel@...r.kernel.org, linux-perf-users@...r.kernel.org,
Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
Boris Ostrovsky <boris.ostrovsky@...cle.com>,
Ian Rogers <irogers@...gle.com>,
Ingo Molnar <mingo@...hat.com>, Jiri Olsa <jolsa@...hat.com>,
Joao Martins <joao.m.martins@...cle.com>,
Konrad Rzeszutek Wilk <konrad.wilk@...cle.com>,
Mark Rutland <mark.rutland@....com>,
Michael Petlan <mpetlan@...hat.com>,
Namhyung Kim <namhyung@...nel.org>,
Peter Zijlstra <peterz@...radead.org>,
Robert Richter <robert.richter@....com>,
Stephane Eranian <eranian@...gle.com>
Subject: Re: [PATCH 1/2] perf evsel: Make evsel__env always return a valid env
Em Tue, Nov 23, 2021 at 01:56:38PM +0530, kajoljain escreveu:
>
>
> On 10/5/21 3:11 AM, Kim Phillips wrote:
> > It's possible to have an evsel and evsel->evlist populated without
> > an evsel->evlist->env, when, e.g., cmd_record is in its error path.
> >
> > Future patches will add support for evsel__open_strerror to be able
> > to customize error messaging based on perf_env__{arch,cpuid}, so
> > let's have evsel__env return &perf_env instead of NULL in that case.
> >
>
> Patch looks good to me.
>
> Reviewed-by: Kajol Jain<kjain@...ux.ibm.com>
Collecting this one now, found it thru the cracks.
- Arnaldo
> Thanks,
> Kajol Jain
>
> > Signed-off-by: Kim Phillips <kim.phillips@....com>
> > Cc: Arnaldo Carvalho de Melo <acme@...hat.com>
> > Cc: Alexander Shishkin <alexander.shishkin@...ux.intel.com>
> > Cc: Boris Ostrovsky <boris.ostrovsky@...cle.com>
> > Cc: Ian Rogers <irogers@...gle.com>
> > Cc: Ingo Molnar <mingo@...hat.com>
> > Cc: Jiri Olsa <jolsa@...hat.com>
> > Cc: Joao Martins <joao.m.martins@...cle.com>
> > Cc: Konrad Rzeszutek Wilk <konrad.wilk@...cle.com>
> > Cc: Mark Rutland <mark.rutland@....com>
> > Cc: Michael Petlan <mpetlan@...hat.com>
> > Cc: Namhyung Kim <namhyung@...nel.org>
> > Cc: Peter Zijlstra <peterz@...radead.org>
> > Cc: Robert Richter <robert.richter@....com>
> > Cc: Stephane Eranian <eranian@...gle.com>
> > ---
> > tools/perf/util/evsel.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/tools/perf/util/evsel.c b/tools/perf/util/evsel.c
> > index dbfeceb2546c..b915840690d4 100644
> > --- a/tools/perf/util/evsel.c
> > +++ b/tools/perf/util/evsel.c
> > @@ -2857,7 +2857,7 @@ int evsel__open_strerror(struct evsel *evsel, struct target *target,
> >
> > struct perf_env *evsel__env(struct evsel *evsel)
> > {
> > - if (evsel && evsel->evlist)
> > + if (evsel && evsel->evlist && evsel->evlist->env)
> > return evsel->evlist->env;
> > return &perf_env;
> > }
> >
--
- Arnaldo
Powered by blists - more mailing lists