[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YS9OpunoSHpNPA3/@hirez.programming.kicks-ass.net>
Date: Wed, 1 Sep 2021 11:57:58 +0200
From: Peter Zijlstra <peterz@...radead.org>
To: "nakamura.shun@...itsu.com" <nakamura.shun@...itsu.com>
Cc: "mingo@...hat.com" <mingo@...hat.com>,
"acme@...nel.org" <acme@...nel.org>,
"mark.rutland@....com" <mark.rutland@....com>,
"alexander.shishkin@...ux.intel.com"
<alexander.shishkin@...ux.intel.com>,
"jolsa@...hat.com" <jolsa@...hat.com>,
"namhyung@...nel.org" <namhyung@...nel.org>,
Rob Herring <robh@...nel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"linux-perf-users@...r.kernel.org" <linux-perf-users@...r.kernel.org>
Subject: Re: libperf: lack of interface
On Wed, Sep 01, 2021 at 09:45:10AM +0000, nakamura.shun@...itsu.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...
Powered by blists - more mailing lists