lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20150821085500.GA23142@krava.brq.redhat.com>
Date:	Fri, 21 Aug 2015 10:55:00 +0200
From:	Jiri Olsa <jolsa@...hat.com>
To:	Kan Liang <kan.liang@...el.com>
Cc:	acme@...nel.org, a.p.zijlstra@...llo.nl, 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 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
--
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ