Re: [RFC 4/5] x86, perf: implements lwp-perf-integration (rc1)

Ingo Molnar
2011-12-21T12:03:01Z

* Vince Weaver <vweaver1@eecs.utk.edu> wrote:

> > But as we told you previously, you could use RDPMC under
> > perf as well, last i checked PeterZ posted experimental
> > patches for that. Peter, what's the status of that?
>
> yes. If you checked the benchmark results I showed, you'd
> have seen that I run tests against that patchset too, and it's
> really only marginally better that the current perf_event
> stuff. I might have written the benchmark poorly, [...]

It is significantly faster for the self-monitoring case - which
is a pretty niche usecase btw.

Have a look at how the 'perf test' self-test utilizes RDPMC in
these commits in tip:perf/fast:

08aa0d1f376e: perf tools: Add x86 RDPMC, RDTSC test
e3f3541c19c8: perf: Extend the mmap control page with time (TSC) fields
0c9d42ed4cee: perf, x86: Provide means for disabling userspace RDPMC
fe4a330885ae: perf, x86: Implement user-space RDPMC support, to allow fast, user-space access to self-monitoring counters
365a4038486b: perf: Fix mmap_page::offset computation
35edc2a5095e: perf, arch: Rework perf_event_index()
9a0f05cb3688: perf: Update the mmap control page on mmap()

You can find these commits in today's -tip. Overhead should be
somewhere around 50 cycles per call (i suspect it could
optimized more), which is a fraction of what a syscall is
costing.

> [...] but that's mainly because as-posted the documentation
> for how to use that patchset is a bit unclear.

In your world there's always someone else to blame.

The thing is, *you* are interested in this niche feature, PeterZ
not so much.

You made a false claim that perf cannot use RDPMC and PeterZ has
proven you wrong once again. Your almost non-stop whining and
the constant misrepresentations you make are not very
productive.

Thanks,

Ingo