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-next>] [day] [month] [year] [list]
Date:	Tue, 11 Aug 2009 17:41:03 +0200
From:	stephane eranian <eranian@...glemail.com>
To:	Ingo Molnar <mingo@...e.hu>
Cc:	LKML <linux-kernel@...r.kernel.org>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Thomas Gleixner <tglx@...utronix.de>,
	Robert Richter <robert.richter@....com>,
	Peter Zijlstra <a.p.zijlstra@...llo.nl>,
	Paul Mackerras <paulus@...ba.org>,
	Andi Kleen <andi@...stfloor.org>,
	Maynard Johnson <mpjohn@...ibm.com>,
	Carl Love <cel@...ibm.com>,
	Corey J Ashford <cjashfor@...ibm.com>,
	Philip Mucci <mucci@...s.utk.edu>,
	Dan Terpstra <terpstra@...s.utk.edu>,
	perfmon2-devel <perfmon2-devel@...ts.sourceforge.net>
Subject: perf_counters issue with PERF_SAMPLE_GROUP

Hi,

It seems to me there is a problem with the group counter values
when you use PERF_SAMPLE_GROUP. The counts are bogus
for all events.

Test case is pretty simple:
    - single group, 2 events
    - sampling on PERF_COUNT_HW_CYCLES
    - other event is PERF_COUNT_HW_CYCLES
    - leader has SAMPLE_IP|SAMPLE_GROUP
    - no inheritance
    - single thread
    - using sampling in one shot mode with PERF_COUNTER_IOC_REFRESH
    - all events but leader start with disabled = 0 (i.e., enabled)
    - sampling period is 240000000 (cycles)

Notification 1: ip=0x401300  39100608 PERF_COUNT_HW_CPU_CYCLES (12)
Notification 2: ip=0x401300  17991616 PERF_COUNT_HW_CPU_CYCLES (12)
Notification 3: ip=0x401300  17981248 PERF_COUNT_HW_CPU_CYCLES (12)
Notification 4: ip=0x401300  9409478912 PERF_COUNT_HW_CPU_CYCLES (12)

I would expect the value for the 2nd event to be close to 240000000.
But instead,
it is going up and down. The IP, nr and id (12) fields are correct, so
the parsing of
the buffer is correct. This is with the latest from Linus's 2.6.31-rc5.


Related to PERF_SAMPLE_GROUP, I believe there is some information missing.
You need to provide the TIMING information because in the case of SAMPLE_GROUP
you'd like to be able to scale the values of the counters you are
collecting. And you
need the timing at the moment, the sample was recorded not later.
--
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