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]
Date:   Mon, 23 May 2022 19:14:39 +0530
From:   Ravi Bangoria <ravi.bangoria@....com>
To:     Jiri Olsa <olsajiri@...il.com>
Cc:     acme@...nel.org, irogers@...gle.com, peterz@...radead.org,
        rrichter@....com, mingo@...hat.com, mark.rutland@....com,
        namhyung@...nel.org, tglx@...utronix.de, bp@...en8.de,
        james.clark@....com, leo.yan@...aro.org, kan.liang@...ux.intel.com,
        ak@...ux.intel.com, eranian@...gle.com, like.xu.linux@...il.com,
        x86@...nel.org, linux-perf-users@...r.kernel.org,
        linux-kernel@...r.kernel.org, sandipan.das@....com,
        ananth.narayan@....com, kim.phillips@....com,
        santosh.shukla@....com, Ravi Bangoria <ravi.bangoria@....com>
Subject: Re: [PATCH v4 2/5] perf header: Parse non-cpu pmu capabilities

On 23-May-22 2:34 PM, Jiri Olsa wrote:
> On Mon, May 23, 2022 at 09:09:42AM +0530, Ravi Bangoria wrote:
> 
> SNIP
> 
>> diff --git a/tools/perf/util/header.c b/tools/perf/util/header.c
>> index a27132e5a5ef..b4505dbb9f4a 100644
>> --- a/tools/perf/util/header.c
>> +++ b/tools/perf/util/header.c
>> @@ -1580,6 +1580,67 @@ static int write_hybrid_cpu_pmu_caps(struct feat_fd *ff,
>>  	return 0;
>>  }
>>  
>> +/*
>> + * File format:
>> + *
>> + * struct {
>> + *	u32 nr_pmus;
>> + *	struct {
>> + *		char pmu_name[];
>> + *		u32 nr_caps;
>> + *		struct {
>> + *			char name[];
>> + *			char value[];
>> + *		} [nr_caps];
>> + *	} [nr_pmus];
>> + * };
>> + */
>> +static int write_pmu_caps(struct feat_fd *ff, struct evlist *evlist __maybe_unused)
>> +{
>> +	struct perf_pmu_caps *caps = NULL;
>> +	struct perf_pmu *pmu = NULL;
>> +	u32 nr_pmus = 0;
>> +	int ret;
>> +
>> +	while ((pmu = perf_pmu__scan(pmu))) {
>> +		if (!pmu->name || !strncmp(pmu->name, "cpu", 3) ||
> 
> should we check for the hybrid names as well?
> there's a helper perf_pmu__is_hybrid,
> aybe you can use that

Yup. Will include those.

Thanks,
Ravi

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ