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] [thread-next>] [day] [month] [year] [list]
Message-ID: <ed39010f-fcdd-4046-b081-2e3e0eb1a346@arm.com>
Date: Mon, 22 Jul 2024 15:34:04 +0100
From: Leo Yan <leo.yan@....com>
To: Adrian Hunter <adrian.hunter@...el.com>,
 Arnaldo Carvalho de Melo <acme@...nel.org>,
 Namhyung Kim <namhyung@...nel.org>, Ian Rogers <irogers@...gle.com>,
 James Clark <james.clark@...aro.org>,
 Suzuki K Poulose <suzuki.poulose@....com>, Mike Leach
 <mike.leach@...aro.org>, John Garry <john.g.garry@...cle.com>,
 Will Deacon <will@...nel.org>, Jiri Olsa <jolsa@...nel.org>,
 Mark Rutland <mark.rutland@....com>, coresight@...ts.linaro.org,
 linux-arm-kernel@...ts.infradead.org, linux-perf-users@...r.kernel.org,
 linux-kernel@...r.kernel.org
Subject: Re: [PATCH v1 1/6] perf pmu: Directly use evsel's PMU pointer

Hi Adrian,

On 7/22/24 11:40, Adrian Hunter wrote:

[...]

> On 21/07/24 23:21, Leo Yan wrote:
>> Rather than iterating the whole PMU list for finding the associated PMU
>> device for an evsel, this commit optimizes to directly use evsel's 'pmu'
>> pointer for accessing PMU device.
>>
>> Signed-off-by: Leo Yan <leo.yan@....com>
>> ---
>>   tools/perf/util/pmu.c | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/tools/perf/util/pmu.c b/tools/perf/util/pmu.c
>> index 986166bc7c78..798cd5a2ebc4 100644
>> --- a/tools/perf/util/pmu.c
>> +++ b/tools/perf/util/pmu.c
>> @@ -1199,7 +1199,7 @@ void perf_pmu__warn_invalid_formats(struct perf_pmu *pmu)
>>
>>   bool evsel__is_aux_event(const struct evsel *evsel)
>>   {
>> -     struct perf_pmu *pmu = evsel__find_pmu(evsel);
>> +     struct perf_pmu *pmu = evsel->pmu;
> 
> Assumes event parser has populated evsel->pmu for auxtrace events.
> Could use a comment to that effect.

Sure, will add a comment for this.

Thanks,
Leo

>>
>>        return pmu && pmu->auxtrace;
>>   }
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ