[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200427101052.GB1457790@krava>
Date: Mon, 27 Apr 2020 12:10:52 +0200
From: Jiri Olsa <jolsa@...hat.com>
To: Jin Yao <yao.jin@...ux.intel.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
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
Powered by blists - more mailing lists