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: <20170226232801.GA15605@krava>
Date:   Mon, 27 Feb 2017 00:28:01 +0100
From:   Jiri Olsa <jolsa@...hat.com>
To:     Andi Kleen <andi@...stfloor.org>
Cc:     acme@...nel.org, jolsa@...nel.org, linux-kernel@...r.kernel.org,
        Andi Kleen <ak@...ux.intel.com>
Subject: Re: [PATCH 01/10] perf, tools, stat: Factor out callback for
 collecting event values

On Thu, Feb 23, 2017 at 04:10:12PM -0800, Andi Kleen wrote:

SNIP

> +static void aggr_cb(struct perf_evsel *counter, void *data, bool first)
> +{
> +	struct aggr_data *ad = data;
> +	int cpu, cpu2, s2;
> +
> +	for (cpu = 0; cpu < perf_evsel__nr_cpus(counter); cpu++) {
> +		struct perf_counts_values *counts;
> +
> +		cpu2 = perf_evsel__cpus(counter)->map[cpu];
> +		s2 = aggr_get_id(evsel_list->cpus, cpu2);
> +		if (s2 != ad->id)
> +			continue;
> +		if (first)
> +			ad->nr++;
> +		counts = perf_counts(counter->counts, cpu, 0);
> +		/*
> +		 * When any result is bad, make them all to give
> +		 * consistent output in interval mode.
> +		 */
> +		if (counts->ena == 0 || counts->run == 0 ||
> +		    counter->counts->scaled == -1) {
> +			ad->ena = 0;
> +			ad->run = 0;
> +			break;
> +		}

that's new, please make this a separate change

thanks,
jirka

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ