mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Ravi Bangoria <ravi.bangoria@amd.com>
To: Jiri Olsa <olsajiri@gmail.com>
Cc: acme@kernel.org, irogers@google.com, peterz@infradead.org,
	rrichter@amd.com, mingo@redhat.com, mark.rutland@arm.com,
	namhyung@kernel.org, tglx@linutronix.de, bp@alien8.de,
	james.clark@arm.com, leo.yan@linaro.org,
	kan.liang@linux.intel.com, ak@linux.intel.com,
	eranian@google.com, like.xu.linux@gmail.com, x86@kernel.org,
	linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org,
	sandipan.das@amd.com, ananth.narayan@amd.com,
	kim.phillips@amd.com, santosh.shukla@amd.com,
	Ravi Bangoria <ravi.bangoria@amd.com>
Subject: Re: [PATCH v4 2/5] perf header: Parse non-cpu pmu capabilities
Date: Mon, 23 May 2022 19:14:39 +0530	[thread overview]
Message-ID: <106dbe1e-3e2f-09f3-7787-61500626a4a9@amd.com> (raw)
In-Reply-To: <YotOJL0dJmKUQnlI@krava>

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

  reply	other threads:[~2022-05-23 13:45 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-23  3:39 [PATCH v4 0/5] perf/amd: Zen4 IBS extensions support (tool changes) Ravi Bangoria
2022-05-23  3:39 ` [PATCH v4 1/5] perf record ibs: Warn about sampling period skew Ravi Bangoria
2022-05-23  3:39 ` [PATCH v4 2/5] perf header: Parse non-cpu pmu capabilities Ravi Bangoria
2022-05-23  9:04   ` Jiri Olsa
2022-05-23 13:44     ` Ravi Bangoria [this message]
2022-05-24 18:46   ` Liang, Kan
2022-05-26 15:08     ` Ravi Bangoria
2022-05-26 15:55       ` Liang, Kan
2022-05-27  2:22         ` Ravi Bangoria
2022-05-23  3:39 ` [PATCH v4 3/5] perf/x86/ibs: Add new IBS register bits into header Ravi Bangoria
2022-05-26 15:49   ` Arnaldo Carvalho de Melo
2022-05-27  2:29     ` Ravi Bangoria
2022-05-23  3:39 ` [PATCH v4 4/5] perf tool ibs: Sync amd ibs header file Ravi Bangoria
2022-05-23  3:39 ` [PATCH v4 5/5] perf script ibs: Support new IBS bits in raw trace dump Ravi Bangoria

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=106dbe1e-3e2f-09f3-7787-61500626a4a9@amd.com \
    --to=ravi.bangoria@amd.com \
    --cc=acme@kernel.org \
    --cc=ak@linux.intel.com \
    --cc=ananth.narayan@amd.com \
    --cc=bp@alien8.de \
    --cc=eranian@google.com \
    --cc=irogers@google.com \
    --cc=james.clark@arm.com \
    --cc=kan.liang@linux.intel.com \
    --cc=kim.phillips@amd.com \
    --cc=leo.yan@linaro.org \
    --cc=like.xu.linux@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=mingo@redhat.com \
    --cc=namhyung@kernel.org \
    --cc=olsajiri@gmail.com \
    --cc=peterz@infradead.org \
    --cc=rrichter@amd.com \
    --cc=sandipan.das@amd.com \
    --cc=santosh.shukla@amd.com \
    --cc=tglx@linutronix.de \
    --cc=x86@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®