lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <ZHj9Vq6K6Oq9caZL@kernel.org>
Date:   Thu, 1 Jun 2023 17:19:34 -0300
From:   Arnaldo Carvalho de Melo <acme@...nel.org>
To:     Namhyung Kim <namhyung@...nel.org>
Cc:     Ian Rogers <irogers@...gle.com>,
        Peter Zijlstra <peterz@...radead.org>,
        Ingo Molnar <mingo@...hat.com>,
        Mark Rutland <mark.rutland@....com>,
        Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
        Jiri Olsa <jolsa@...nel.org>,
        Adrian Hunter <adrian.hunter@...el.com>,
        Kan Liang <kan.liang@...ux.intel.com>,
        Rob Herring <robh@...nel.org>,
        Zhengjun Xing <zhengjun.xing@...ux.intel.com>,
        James Clark <james.clark@....com>,
        Suzuki Poulouse <suzuki.poulose@....com>,
        linux-perf-users@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v1 1/2] perf pmu: Only warn about unsupported configs once

Em Thu, Jun 01, 2023 at 01:04:30PM -0700, Namhyung Kim escreveu:
> On Wed, May 31, 2023 at 7:36 PM Ian Rogers <irogers@...gle.com> wrote:
> >
> > Avoid scanning format list for each event parsed.
> 
> Maybe it's better to change the subject that it's about format..
> Other than that,

Ok, I can fix that, applying.
 
> Acked-by: Namhyung Kim <namhyung@...nel.org>
> 
> Thanks,
> Namhyung
> 
> 
> >
> > Signed-off-by: Ian Rogers <irogers@...gle.com>
> > ---
> >  tools/perf/util/pmu.c | 5 +++++
> >  tools/perf/util/pmu.h | 5 +++++
> >  2 files changed, 10 insertions(+)
> >
> > diff --git a/tools/perf/util/pmu.c b/tools/perf/util/pmu.c
> > index 0520aa9fe991..204ce3f02e63 100644
> > --- a/tools/perf/util/pmu.c
> > +++ b/tools/perf/util/pmu.c
> > @@ -934,6 +934,11 @@ void perf_pmu__warn_invalid_formats(struct perf_pmu *pmu)
> >  {
> >         struct perf_pmu_format *format;
> >
> > +       if (pmu->formats_checked)
> > +               return;
> > +
> > +       pmu->formats_checked = true;
> > +
> >         /* fake pmu doesn't have format list */
> >         if (pmu == &perf_pmu__fake)
> >                 return;
> > diff --git a/tools/perf/util/pmu.h b/tools/perf/util/pmu.h
> > index 287f593b15c7..7a1535dc1f12 100644
> > --- a/tools/perf/util/pmu.h
> > +++ b/tools/perf/util/pmu.h
> > @@ -76,6 +76,11 @@ struct perf_pmu {
> >          * specific code.
> >          */
> >         bool auxtrace;
> > +       /**
> > +        * @formats_checked: Only check PMU's formats are valid for
> > +        * perf_event_attr once.
> > +        */
> > +       bool formats_checked;
> >         /**
> >          * @max_precise: Number of levels of :ppp precision supported by the
> >          * PMU, read from
> > --
> > 2.41.0.rc0.172.g3f132b7071-goog
> >

-- 

- Arnaldo

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ