Messages in this thread | | | Date | Fri, 16 Dec 2011 17:36:35 -0500 | From | Vince Weaver <> | Subject | Re: [RFC][PATCH 0/6] perf: x86 RDPMC and RDTSC support |
| |
On Mon, 21 Nov 2011, Peter Zijlstra wrote:
> These few patches implement x86 RDPMC support and add an extention to the self > monitoring data to also allow additional time updates using userspace TSC reads. > > There's a few loose ends, but it mostly seems to work.
I've finally had time to apply and test these patches.
Firstly, the documentation was a bit sparse (though I guess that's OK for an RFC patch). Is it possible to read multiple counters at once with this interface, i.e. using FORMAT_GROUP?
Also, am I correct that the counters are set to always counting, so you always have to do a rdpmc() before and a rdpmc() after?
I ran some benchmarks, the results can be found here: http://web.eecs.utk.edu/~vweaver1/projects/perf-events/benchmarks/rdtsc_overhead/
I used the mmap_read_self() routine from your example as the "read" performance that I measured.
If start/stop are truly unnecessary when run with your patch then the "total" results shift in your favor. Otherwise perfmon2 and perfctr still win the self-monitoring overhead race by a lot.
Vince
| |