[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <3ecf60b3-1304-4a33-1bec-52eb580c0a00@linux.intel.com>
Date: Tue, 28 Apr 2020 16:12:04 +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 v3 2/7] perf util: Create streams for managing top N
hottest callchains
Hi Jiri,
On 4/27/2020 6:10 PM, Jiri Olsa wrote:
> On Mon, Apr 20, 2020 at 09:04:46AM +0800, Jin Yao wrote:
>> We think the stream is a callchain which is aggregated by the LBR
>> records from samples. By browsing the stream, we can understand
>> the code flow.
>>
>> The struct callchain_node represents one callchain and we use the
>> callchain_node->hit to measure the hot level of this callchain.
>> Higher is hotter.
>>
>> Since in perf data file, there may be many callchains so we just
>> need to focus on the top N hottest callchains. N is a user defined
>> parameter or just a predefined default value.
>>
>> This patch saves the top N hottest callchains in 'struct stream_node'
>> type array, which is defined in a per event 'struct callchain_streams'.
>>
>> So now we can get the per-event top N hottest callchains.
>>
>> v2:
>> ---
>> Use zfree in free_evsel_streams().
>>
>> Signed-off-by: Jin Yao <yao.jin@...ux.intel.com>
>> ---
>> tools/perf/util/callchain.c | 122 ++++++++++++++++++++++++++++++++++++
>> tools/perf/util/callchain.h | 16 +++++
>> 2 files changed, 138 insertions(+)
>
> SNIP
>
> could this and all the other related code moved to separated object
> like streams.c or such.. I think also the stuff from patch 1 could
> go there, as it's specific only to this streams code
>
> jirka
>
That's fine. I will move the related codes to a new streams.c/streams.h.
Thanks
Jin Yao
Powered by blists - more mailing lists