[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20150726163210.GG24646@krava.brq.redhat.com>
Date: Sun, 26 Jul 2015 18:32:10 +0200
From: Jiri Olsa <jolsa@...hat.com>
To: kan.liang@...el.com
Cc: a.p.zijlstra@...llo.nl, acme@...nel.org, luto@...nel.org,
mingo@...hat.com, eranian@...gle.com, ak@...ux.intel.com,
mark.rutland@....com, adrian.hunter@...el.com, jolsa@...nel.org,
namhyung@...nel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH V2 1/6] perf,tools: save cpu max freq in perf header
On Fri, Jul 24, 2015 at 09:48:27AM -0400, kan.liang@...el.com wrote:
SNIP
> diff --git a/tools/perf/util/cpumap.h b/tools/perf/util/cpumap.h
> index 0af9cec..6784677 100644
> --- a/tools/perf/util/cpumap.h
> +++ b/tools/perf/util/cpumap.h
> @@ -58,6 +58,7 @@ int max_node_num;
> int *cpunode_map;
>
> int cpu__setup_cpunode_map(void);
> +unsigned int get_cpu_max_freq(void);
>
> static inline int cpu__max_node(void)
> {
> diff --git a/tools/perf/util/header.c b/tools/perf/util/header.c
> index 03ace57..287a488 100644
> --- a/tools/perf/util/header.c
> +++ b/tools/perf/util/header.c
> @@ -862,6 +862,16 @@ write_it:
> return do_write_string(fd, buffer);
> }
>
> +static int write_cpu_max_freq(int fd, struct perf_header *h __maybe_unused,
> + struct perf_evlist *evlist __maybe_unused)
> +{
> + u32 freq;
> +
> + freq = get_cpu_max_freq() / 1000;
why dont you store it as u64 ?
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