Messages in this thread | | | Date | Wed, 1 Sep 2021 11:57:58 +0200 | From | Peter Zijlstra <> | Subject | Re: libperf: lack of interface |
| |
On Wed, Sep 01, 2021 at 09:45:10AM +0000, nakamura.shun@fujitsu.com wrote: > Hello. > > I'm trying to change rdpmc test in perf_event_tests[1] to use libperf, but libperf doesn't have enough interfaces. > Does anyone plan to implement any of these libperf features? > > - Interfaces that can run ioctl (PERF_EVENT_IOC_RESET) from userland > - Interfaces that can run fcntl (SIGIO) from userland > > [1] https://github.com/deater/perf_event_tests/tree/master/tests/rdpmc
While IOC_RESET has it's uses, it really shouldn't be used in combination with RDPMC, it destroys the whole 'dont do syscalls'/performance thing.
The typical RDPMC usage is:
/* setup counter on self */
...
start = RDPMC /* your code */ end = RDPMC delta = end - start;
...
Nowhere do we need a reset...
| |