[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20150827181045.GD25932@krava.redhat.com>
Date: Thu, 27 Aug 2015 20:10:46 +0200
From: Jiri Olsa <jolsa@...hat.com>
To: Kan Liang <kan.liang@...el.com>
Cc: acme@...nel.org, jolsa@...nel.org, a.p.zijlstra@...llo.nl,
luto@...nel.org, mingo@...hat.com, eranian@...gle.com,
ak@...ux.intel.com, mark.rutland@....com, adrian.hunter@...el.com,
namhyung@...nel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH V5 6/7] perf,tools: caculate and save
freq/CPU%/CORE_BUSY% in he_stat
On Tue, Aug 25, 2015 at 05:18:07AM -0400, Kan Liang wrote:
> From: Kan Liang <kan.liang@...el.com>
>
> Caculate freq/CPU%/CORE_BUSY% in add_entry_cb, and update the value in
> he_stat.
>
> Signed-off-by: Kan Liang <kan.liang@...el.com>
> ---
> 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@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists