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]
Date:	Thu, 20 Aug 2015 11:39:58 +0200
From:	Jiri Olsa <jolsa@...hat.com>
To:	kan.liang@...el.com
Cc:	acme@...nel.org, a.p.zijlstra@...llo.nl, mingo@...hat.com,
	jolsa@...nel.org, namhyung@...nel.org, ak@...ux.intel.com,
	eranian@...gle.com, linux-kernel@...r.kernel.org
Subject: Re: [PATCH RFC 05/10] perf,tools: Enable statistic read for perf
 record

On Tue, Aug 18, 2015 at 05:25:41AM -0400, kan.liang@...el.com wrote:

SNIP

>  	evlist__for_each(evlist, pos) {
> +
> +		if (pos->stat_read) {
> +			if (!target__has_cpu(&opts->target)) {
> +				pos->stat_read = 0;
> +				ui__warning("Statistics read only available "
> +					    "on system-wide/CPU mode. "
> +					    "Remove :N modifier for event %s\n",
> +					    pos->name);
> +				goto out;
> +			}
> +			/* Don't do stat read for Group leader */
> +			if ((pos->leader == pos) && (pos->leader->nr_members > 1))
> +				pos->stat_read = 0;
> +			else {
> +				if (first == pos) {
> +					pos->stat_read = 0;
> +					ui__warning("The first event cannot "
> +						    "be stat read event\n");
> +					goto out;
> +				}
> +				attr = &pos->attr;
> +				attr->read_format = PERF_FORMAT_TOTAL_TIME_ENABLED |
> +						    PERF_FORMAT_TOTAL_TIME_RUNNING;
> +				attr->sample_freq   = 0;
> +				attr->sample_period = 0;
> +				attr->sample_type = 0;
> +				pos->sample_size = 0;
> +			}
> +		}

seems like this should go under perf_evsel__config

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