On Tue, Aug 25, 2015 at 05:18:07AM -0400, Kan Liang wrote:
> From: Kan Liang <kan.li...@intel.com>
> 
> Caculate freq/CPU%/CORE_BUSY% in add_entry_cb, and update the value in
> he_stat.
> 
> Signed-off-by: Kan Liang <kan.li...@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 majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to