lkml.org 
[lkml]   [2015]   [Aug]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH V4 1/7] perf,tools: introduce generic FEAT for CPU attributes
On Tue, Aug 18, 2015 at 10:16:35AM -0400, Kan Liang wrote:

SNIP

> diff --git a/tools/perf/util/header.c b/tools/perf/util/header.c
> index 179b2bd..0a06fb8 100644
> --- a/tools/perf/util/header.c
> +++ b/tools/perf/util/header.c
> @@ -862,6 +862,23 @@ write_it:
> return do_write_string(fd, buffer);
> }
>
> +#define MAX_FREQ_TAG_STR "max_freq"
> +
> +static int write_cpu_attributes(int fd, struct perf_header *h __maybe_unused,
> + struct perf_evlist *evlist __maybe_unused)
> +{
> + u64 freq;
> + int ret;
> +
> + freq = get_cpu_max_freq();
> +
> + ret = do_write_string(fd, MAX_FREQ_TAG_STR);
> + if (ret)
> + return ret;

why not store just the tag number? PERF_HEADER_CPU_MAX_FREQ

jirka


\
 
 \ /
  Last update: 2015-08-21 11:21    [W:0.978 / U:0.092 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site