[lkml]   [2016]   [Jul]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Subject[RFC] perf: ref-cycle useless with watchdog changes

Since Andi added:

commit 2c95afc1e83d93fac3be6923465e1753c2c53b0a
Author: Andi Kleen <>
Date: Thu Jun 9 06:14:38 2016 -0700

perf/x86/intel, watchdog: Switch NMI watchdog to ref cycles on x86

$ perf stat -e ref-cycles ls
<not counted> ....

fails systematically because the ref-cycles is now used by the
watchdog and given this is a system-wide pinned event, it monopolizes
the fixed counter 2 which is the
only counter able to measure this event.

So we either redirect ref-cycles towards 0x013c
(cpu_clk_unhalted:xlck) or another event maybe from the msr PMU, such
as msr/tsc/ or we revert Andi's patch. Each of these solutions has

- 0x013c is that is counts supposedly at a fixed frequency (used to
be 100Mhz)
but this is not guaranteed and user would still need to figure
out ref frequency
of CPU to compare with core cycles

- msr/tsc/ counts in halted state. Recent paranoid default changes, make it not
supported by default. msr/tsc/ counts user/kernel, with paranoid=2,
it does not

- Revert Andi's patch, makes everything working again at the cost of
for topdown.

It is not clear to me why topdown would be so sensitive to
multiplexing compared to other metrics.

Any comment?

 \ /
  Last update: 2016-07-10 21:21    [W:0.034 / U:0.400 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site