From: Peter Zijlstra <peterz@infradead.org>
To: "nakamura.shun@fujitsu.com" <nakamura.shun@fujitsu.com>
Cc: "mingo@redhat.com" <mingo@redhat.com>,
"acme@kernel.org" <acme@kernel.org>,
"mark.rutland@arm.com" <mark.rutland@arm.com>,
"alexander.shishkin@linux.intel.com"
<alexander.shishkin@linux.intel.com>,
"jolsa@redhat.com" <jolsa@redhat.com>,
"namhyung@kernel.org" <namhyung@kernel.org>,
Rob Herring <robh@kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linux-perf-users@vger.kernel.org"
<linux-perf-users@vger.kernel.org>
Subject: Re: libperf: lack of interface
Date: Wed, 1 Sep 2021 11:57:58 +0200 [thread overview]
Message-ID: <YS9OpunoSHpNPA3/@hirez.programming.kicks-ass.net> (raw)
In-Reply-To: <OSBPR01MB460016842A4310264B1CC5A0F7CD9@OSBPR01MB4600.jpnprd01.prod.outlook.com>
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...
next prev parent reply other threads:[~2021-09-01 9:59 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-01 9:45 libperf: lack of interface nakamura.shun
2021-09-01 9:57 ` Peter Zijlstra [this message]
2021-09-01 13:36 ` Arnaldo Carvalho de Melo
2021-09-02 8:41 ` Jiri Olsa
2021-09-21 9:46 ` nakamura.shun
2021-10-18 8:57 ` nakamura.shun
2021-10-20 12:20 ` Jiri Olsa
2021-10-22 6:17 ` nakamura.shun
2021-12-03 9:00 ` nakamura.shun
2021-12-07 5:49 ` nakamura.shun
2021-12-07 17:04 ` Jiri Olsa
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=YS9OpunoSHpNPA3/@hirez.programming.kicks-ass.net \
--to=peterz@infradead.org \
--cc=acme@kernel.org \
--cc=alexander.shishkin@linux.intel.com \
--cc=jolsa@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-perf-users@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=mingo@redhat.com \
--cc=nakamura.shun@fujitsu.com \
--cc=namhyung@kernel.org \
--cc=robh@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox