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, 26 May 2011 23:31:44 -0700
From:	Corey Ashford <cjashfor@...ux.vnet.ibm.com>
To:	David Ahern <dsahern@...il.com>
CC:	Ingo Molnar <mingo@...e.hu>,
	Arnaldo Carvalho de Melo <acme@...stprotocols.net>,
	LKML <linux-kernel@...r.kernel.org>
Subject: Re: perf: h/w counters not counted and no error/info reported to
 user

On 05/26/2011 03:10 PM, David Ahern wrote:
>
> By default (tip-perf-core) perf-stat enables a number of H/W counters:
>
> perf stat  -- sleep 1
>
> Performance counter stats for 'sleep 1':
>
>       1.346889 task-clock
>              1 context-switches
>              0 CPU-migrations
>            157 page-faults
> <not counted>  cycles
> <not counted>  stalled-cycles-frontend
> <not counted>  stalled-cycles-backend
>        493,740 instructions
>        137,062 branches
>          6,773 branch-misses
>
> In this case 3 of them are not counted and perf does not tell me why.
> I'm guessing that my processor (Core2 Duo T9550) does not support the
> stalled cycles counters. Should perf not emit a message telling me that?
>
> However, cycles is supported by the processor:
>
> perf stat -e cycles -- sleep 1
>
> Performance counter stats for 'sleep 1':
>
>           1,091,102 cycles

I suspect that what's happening is that "sleep 1" is not a very good 
test case, because it's sleeping most of the time.  The result is that 
some of the events don't have time enough to get counted because not 
enough system ticks occur while the "sleep 1" is running to get all of 
the events to be scheduled onto the PMU.

Try a simple problem which spins, or otherwise chews up cycles, for a 
second or so instead of sleeps.  I think you will get more events counted.

- Corey
--
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