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:   Fri, 3 Mar 2017 15:16:11 -0800
From:   Andi Kleen <andi@...stfloor.org>
To:     Jiri Olsa <jolsa@...hat.com>
Cc:     Andi Kleen <andi@...stfloor.org>, 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 Fri, Mar 03, 2017 at 11:33:03AM +0100, Jiri Olsa wrote:
> On Tue, Feb 28, 2017 at 10:49:15PM -0800, Andi Kleen wrote:
> 
> SNIP
> 
> > +static void collect_data(struct perf_evsel *counter,
> > +			    void (*cb)(struct perf_evsel *counter, void *data,
> > +				       bool first),
> > +			    void *data)
> > +{
> > +	cb(counter, data, true);
> > +}
> > +
> > +struct aggr_data {
> > +	u64 ena, run, val;
> > +	int id;
> > +	int nr;
> > +	int cpu;
> > +};
> > +
> > +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);
> 
> that does not match the removed code.. why?
>                 s2 = aggr_get_id(perf_evsel__cpus(counter), cpu);

I added it at some point during debugging. I think it's
actually a nop here, but technically it's correct (we're
always supposed to remap)

I can remove it, but it's really a small code cleanup.

-Andi

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ