mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Jin, Yao" <yao.jin@linux.intel.com>
To: Jiri Olsa <jolsa@redhat.com>
Cc: acme@kernel.org, jolsa@kernel.org, peterz@infradead.org,
	mingo@redhat.com, alexander.shishkin@linux.intel.com,
	Linux-kernel@vger.kernel.org, ak@linux.intel.com,
	kan.liang@intel.com, yao.jin@intel.com
Subject: Re: [PATCH v2 1/3] perf header: Support HYBRID_TOPOLOGY feature
Date: Tue, 11 May 2021 09:05:55 +0800	[thread overview]
Message-ID: <1a6a4580-598a-6774-74c1-58c04c2d3ad2@linux.intel.com> (raw)
In-Reply-To: <YJkxF8bycH8+w+N+@krava>

Hi Jiri,

On 5/10/2021 9:11 PM, Jiri Olsa wrote:
> On Fri, May 07, 2021 at 11:52:28AM +0800, Jin Yao wrote:
>> It would be useful to let user know the hybrid topology.
>> Adding HYBRID_TOPOLOGY feature in header to indicate the
>> core cpus and the atom cpus.
>>
>> With this patch,
>>
>> For the perf.data generated on hybrid platform,
>> reports the hybrid cpu list.
>>
>>    root@otcpl-adl-s-2:~# perf report --header-only -I
>>    ...
>>    # hybrid cpu system:
>>    # cpu_core cpu list : 0-15
>>    # cpu_atom cpu list : 16-23
>>
>> For the perf.data generated on non-hybrid platform,
>> reports the message that HYBRID_TOPOLOGY is missing.
>>
>>    root@kbl-ppc:~# perf report --header-only -I
>>    ...
>>    # missing features: TRACING_DATA BRANCH_STACK GROUP_DESC AUXTRACE STAT CLOCKID DIR_FORMAT COMPRESSED CLOCK_DATA HYBRID_TOPOLOGY
>>
>> Signed-off-by: Jin Yao <yao.jin@linux.intel.com>
>> ---
>>   .../Documentation/perf.data-file-format.txt   | 14 +++
>>   tools/perf/util/cputopo.c                     | 80 +++++++++++++++++
>>   tools/perf/util/cputopo.h                     | 13 +++
>>   tools/perf/util/env.c                         |  6 ++
>>   tools/perf/util/env.h                         |  7 ++
>>   tools/perf/util/header.c                      | 87 +++++++++++++++++++
>>   tools/perf/util/header.h                      |  1 +
>>   tools/perf/util/pmu-hybrid.h                  | 11 +++
>>   8 files changed, 219 insertions(+)
>>
>> diff --git a/tools/perf/Documentation/perf.data-file-format.txt b/tools/perf/Documentation/perf.data-file-format.txt
>> index 9ee96640744e..d9d82ca8aeb7 100644
>> --- a/tools/perf/Documentation/perf.data-file-format.txt
>> +++ b/tools/perf/Documentation/perf.data-file-format.txt
>> @@ -402,6 +402,20 @@ struct {
>>   	u64 clockid_time_ns;
>>   };
>>   
>> +	HEADER_HYBRID_TOPOLOGY = 30,
>> +
>> +Indicate the hybrid CPUs. The format of data is as below.
>> +
>> +struct {
>> +	char *pmu_name;
>> +	char *cpus;
>> +};
> 
> this is missing the nr count, should be like:
> 
> struct {
> 	u32 nr;
> 	struct {
> 	     char *pmu_name;
> 	     char *cpus;
> 	} [nr]
> }
> 
> jirka
> 

Yes, we should say the format of data is:

struct {
	u32 nr;
	struct {
		char *pmu_name;
		char *cpus;
	} [nr]
}

I will update 'perf.data-file-format.txt' in v3.

Thanks
Jin Yao

  reply	other threads:[~2021-05-11  1:06 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-07  3:52 [PATCH v2 0/3] perf header: Support HYBRID_TOPOLOGY and hybrid CPU_PMU_CAPS Jin Yao
2021-05-07  3:52 ` [PATCH v2 1/3] perf header: Support HYBRID_TOPOLOGY feature Jin Yao
2021-05-10 13:11   ` Jiri Olsa
2021-05-11  1:05     ` Jin, Yao [this message]
2021-05-07  3:52 ` [PATCH v2 2/3] perf header: Write hybrid CPU_PMU_CAPS Jin Yao
2021-05-07  3:52 ` [PATCH v2 3/3] perf header: Process " Jin Yao

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=1a6a4580-598a-6774-74c1-58c04c2d3ad2@linux.intel.com \
    --to=yao.jin@linux.intel.com \
    --cc=Linux-kernel@vger.kernel.org \
    --cc=acme@kernel.org \
    --cc=ak@linux.intel.com \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=jolsa@kernel.org \
    --cc=jolsa@redhat.com \
    --cc=kan.liang@intel.com \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.org \
    --cc=yao.jin@intel.com \
    /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®