On Mon, Aug 29, 2016 at 02:30:46AM +0530, Madhavan Srinivasan wrote:
It's a perennial request from hardware folks to be able toHow much and what is that? Can't we try and get interfaces sorted?
see the raw values of the pmu registers. Partly it's so that
they can verify perf is doing what they want, and some
of it is that they're interested in some of the more obscure
info that isn't plumbed out through other perf interfaces.
Over the years internally have used various hack to getNot really liking that. It assumes too much and doesn't seem to cover
the requested data out but this is an attempt to use a
somewhat standard mechanism (using PERF_SAMPLE_REGS_INTR).
about half the perf use-cases.
It assumes the machine state can be captured by registers (this is false
for things like Intel DS/PT, which have state in memory), it might
assume <= 64 registers but I didn't look that closely, this too might
become somewhat restrictive.
Worse, it doesn't work for !sampling workloads, of which you also very
much want to verify programming etc.
This would also be helpful for those of us working on the perfOn x86 we can trace the MSR writes. No need to add debug printk()s.
hardware backends, to be able to verify that we're programming
things correctly, without resorting to debug printks etc.
We could (and I have on occasion) added tracepoints (well trace_printk)
to the Intel DS memory stores to see what was written there.
Tracing is much more flexible for debugging this stuff.
Can't you do something along those lines?