Re: [PATCH V5 6/7] perf,tools: caculate and save freq/CPU%/CORE_BUSY% in he_stat
From: Jiri Olsa
Date: Thu Aug 27 2015 - 14:10:56 EST
On Tue, Aug 25, 2015 at 05:18:07AM -0400, Kan Liang wrote:
> From: Kan Liang <kan.liang@xxxxxxxxx>
>
> Caculate freq/CPU%/CORE_BUSY% in add_entry_cb, and update the value in
> he_stat.
>
> Signed-off-by: Kan Liang <kan.liang@xxxxxxxxx>
> ---
> tools/perf/builtin-report.c | 36 ++++++++++++++++++++++++++++++++++++
> tools/perf/util/sort.h | 3 +++
> 2 files changed, 39 insertions(+)
>
> diff --git a/tools/perf/builtin-report.c b/tools/perf/builtin-report.c
> index 62b285e..1bc74acd 100644
> --- a/tools/perf/builtin-report.c
> +++ b/tools/perf/builtin-report.c
> @@ -89,6 +89,38 @@ static int report__config(const char *var, const char *value, void *cb)
> return perf_default_config(var, value, cb);
> }
>
> +static void set_he_freq_perf(struct perf_session *session,
> + struct hist_entry_iter *iter)
> +{
> + struct hist_entry *he = iter->he;
> + struct perf_evsel *evsel = iter->evsel;
> + struct perf_evsel *leader = evsel;
> + struct perf_sample *sample = iter->sample;
> + struct perf_evlist *evlist = session->evlist;
> + u64 cpu_max_freq = session->header.env.cpu_attr[PERF_HEADER_CPU_MAX_FREQ];
so why not access the cpu_attr.freq ?
jirka
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/