All of lore.kernel.org
 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 v1 2/2] perf header: Support hybrid CPU_PMU_CAPS
Date: Tue, 11 May 2021 09:15:26 +0800	[thread overview]
Message-ID: <249153c0-a560-aa78-97a9-039dee5be86b@linux.intel.com> (raw)
In-Reply-To: <YJkxECvg6clImtOY@krava>

Hi Jiri,

On 5/10/2021 9:11 PM, Jiri Olsa wrote:
> On Thu, May 06, 2021 at 10:43:39PM +0800, Jin, Yao wrote:
> 
> SNIP
> 
>>>> 'nr of rest pmus', we know that all pmus have been processed.
>>>>
>>>> Otherwise, we have to continue reading data file till we find something
>>>> incorrect and then finally drop the last read data.
>>>
>>> you have the size of the feature data right? I think we use
>>> it in other cases to check if there are more data
>>>
>>
>> The challenge for us is if we need to compatible with the old perf.data
>> which was generated by old perf tool.
>>
>> For the old perf.data, the layout in header is:
>>
>> nr of caps
>> caps string 1
>> caps string 2
>> ...
>> caps string N
>>
>> It doesn't carry with any other fields such as size of caps data.
>>
>> To be compatible with old perf.data, so I have to extend the layout to:
>>
>> nr of caps for pmu 1
>> caps string 1
>> caps string 2
>> ...
>> caps string N
>> name of pmu 1
>> nr of rest pmus
>>
>> nr of caps for pmu2
>> caps string 1
>> caps string 2
>> ...
>> caps string N
>> name of pmu 2
>> nr of rest pmus
>>
>> When the new perf tool detects the string such as "cpu_", it can know that
>> it's the pmu name field in new perf.data, otherwise it's the old perf.data.
> 
> what if the cap string starts with 'cpu_' ?
> 

I just assume the cap string would not have 'cpu_' string. Yes, I agree, that's not a very good 
solution.

> I think it might be better to create new feature that
> stores caps for multiple pmus in generic way
>

Yes, creating a new feature in header (such as "HYBRID_CPU_PMU_CAPS") is a better way.

>>
>> If we add new field such as "size" to the layout, I'm afraid the new perf
>> tool can not process the old perf.data correctly.
>>
>> If we don't need to support old perf.data, that makes things easy.
> 
> we need to
> 

Yes, we need to. I'm now preparing v3.

Thanks
Jin Yao

> jirka
> 

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

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-30  7:46 [PATCH v1 1/2] perf header: Support HYBRID_TOPOLOGY feature Jin Yao
2021-04-30  7:46 ` [PATCH v1 2/2] perf header: Support hybrid CPU_PMU_CAPS Jin Yao
2021-05-04 15:07   ` Jiri Olsa
2021-05-06  4:59     ` Jin, Yao
2021-05-06 13:22       ` Jiri Olsa
2021-05-06 14:43         ` Jin, Yao
2021-05-10 13:11           ` Jiri Olsa
2021-05-11  1:15             ` Jin, Yao [this message]
2021-05-03 15:18 ` [PATCH v1 1/2] perf header: Support HYBRID_TOPOLOGY feature Arnaldo Carvalho de Melo
2021-05-04  2:03   ` Jin, Yao
2021-05-04 14:54 ` Jiri Olsa
2021-05-06  2:01   ` Jin, Yao
2021-05-04 14:56 ` Jiri Olsa
2021-05-04 19:28   ` Arnaldo Carvalho de Melo
2021-05-04 19:37     ` Jiri Olsa
2021-05-05 13:49       ` Arnaldo Carvalho de Melo
2021-05-05 20:28         ` Jiri Olsa
2021-05-06  2:22           ` Jin, Yao
2021-05-06  2:17         ` 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=249153c0-a560-aa78-97a9-039dee5be86b@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.