Re: [patch 0/3] [Announcement] Performance Counters for Linux

Andi Kleen
2008-12-05T12:39:39Z

Ingo Molnar <mingo@elte.hu> writes:

> Note that more notification record types is actually where latest
> hardware is going: for example in Nehalem there's a PEBS notification
> record type that has cachemiss latency included in the record. I.e. we
> can get profiles with _cachemiss latency_ included (as measured from
> issuing the instruction to completion).

One problem is that you have to find out the correct RIP for that PEBS
cache miss you have to disassemble from the last basic block because
the IP in PEBS points to the next instruction.

If such a thing is ever implemented it should be in user space
I think.

Also in general some of the more useful PEBS information requires
disassembling unfortunately. For example if you want a address
histogram you get the register contents, but you have to interpret the
code to compute the EA. While the kernel has a x86 interpreter now for
this I suspect doing it in kernel space would be quite complicated
and at least I would consider doing it in user space cleaner too.

Given these are more obscure features, but not being able to fit
them easily into your model from the start isn't a very promising sign
for the long term extensibility of the design.

-Andi

--
ak@linux.intel.com