lkml.org 
[lkml]   [2015]   [Aug]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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@intel.com>
>
> Caculate freq/CPU%/CORE_BUSY% in add_entry_cb, and update the value in
> he_stat.
>
> Signed-off-by: Kan Liang <kan.liang@intel.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


\
 
 \ /
  Last update: 2015-08-27 20:41    [W:0.100 / U:1.016 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site