[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <1a6a4580-598a-6774-74c1-58c04c2d3ad2@linux.intel.com>
Date: Tue, 11 May 2021 09:05:55 +0800
From: "Jin, Yao" <yao.jin@...ux.intel.com>
To: Jiri Olsa <jolsa@...hat.com>
Cc: acme@...nel.org, jolsa@...nel.org, peterz@...radead.org,
mingo@...hat.com, alexander.shishkin@...ux.intel.com,
Linux-kernel@...r.kernel.org, ak@...ux.intel.com,
kan.liang@...el.com, yao.jin@...el.com
Subject: Re: [PATCH v2 1/3] perf header: Support HYBRID_TOPOLOGY feature
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@...pl-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@...-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@...ux.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
Powered by blists - more mailing lists