Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1214765

Re: [PATCH V5 6/7] perf,tools: caculate and save freq/CPU%/CORE_BUSY% in he_stat

From Jiri Olsa <jolsa@redhat.com>
Newsgroups linux.kernel
Subject Re: [PATCH V5 6/7] perf,tools: caculate and save freq/CPU%/CORE_BUSY% in he_stat
Date 2015-08-27 20:20 +0200
Message-ID <q29Wi-3Qj-13@gated-at.bofh.it> (permalink)
References <q1pqq-3Do-5@gated-at.bofh.it> <q1pqq-3Do-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

[PATCH V5 6/7] perf,tools: caculate and save freq/CPU%/CORE_BUSY% in he_stat Kan Liang <kan.liang@intel.com> - 2015-08-25 18:40 +0200
  Re: [PATCH V5 6/7] perf,tools: caculate and save  freq/CPU%/CORE_BUSY% in he_stat Jiri Olsa <jolsa@redhat.com> - 2015-08-27 20:20 +0200

csiph-web