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: <20150903120133.GF13114@krava.redhat.com>
Date:	Thu, 3 Sep 2015 14:01:33 +0200
From:	Jiri Olsa <jolsa@...hat.com>
To:	Stephane Eranian <eranian@...gle.com>
Cc:	LKML <linux-kernel@...r.kernel.org>,
	Arnaldo Carvalho de Melo <acme@...hat.com>,
	Peter Zijlstra <peterz@...radead.org>,
	"mingo@...e.hu" <mingo@...e.hu>,
	"ak@...ux.intel.com" <ak@...ux.intel.com>,
	Namhyung Kim <namhyung@...nel.org>,
	"Liang, Kan" <kan.liang@...el.com>,
	David Ahern <dsahern@...il.com>,
	Adrian Hunter <adrian.hunter@...el.com>
Subject: Re: [PATCH] perf stat: fix per-pkg event reporting bug

On Thu, Sep 03, 2015 at 04:48:52AM -0700, Stephane Eranian wrote:
> On Thu, Sep 3, 2015 at 3:01 AM, Jiri Olsa <jolsa@...hat.com> wrote:
> > On Wed, Sep 02, 2015 at 03:17:51PM +0200, Stephane Eranian wrote:
> >
> > SNIP
> >
> >> +     /*
> >> +      * we do not consider an event that has not run as a good
> >> +      * instance to mark a package as used (skip=1). Otherwise
> >> +      * we may run into a situation where the first CPU in a package
> >> +      * is not running anything, yet the second is, and this function
> >> +      * would mark the package as used after the first CPU and would
> >> +      * not read the values from the second CPU.
> >> +      */
> >> +     if (!(vals->run && vals->ena))
> >> +             return 0;
> >> +
> >>       s = cpu_map__get_socket(cpus, cpu);
> >>       if (s < 0)
> >>               return -1;
> >> @@ -235,7 +247,7 @@ process_counter_values(struct perf_stat_config *config, struct perf_evsel *evsel
> >>       static struct perf_counts_values zero;
> >>       bool skip = false;
> >>
> >> -     if (check_per_pkg(evsel, cpu, &skip)) {
> >> +     if (check_per_pkg(evsel, aggr, cpu, &skip)) {
> >
> > should we pass 'count' instead o 'aggr' ?
> >
> the reason I passed counts_values is in case this function needs to be
> called from other places which do
> not use aggr mode.

sure, but 'aggr' is being computed within process_counter_values

process_counter_values gets 'count' argument with values read
for given cpu/thread for further processing, and it seems to
me that 'count' values should be passed to check_per_pkg

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