* Signal on PMU event?
@ 2014-04-20 18:45 Luke Gorrie
2014-04-21 14:29 ` Christopher Covington
0 siblings, 1 reply; 3+ messages in thread
From: Luke Gorrie @ 2014-04-20 18:45 UTC (permalink / raw)
To: linux-perf-users
Howdy!
Is it possible for a self-profiling program to receive a signal (e.g.
SIGPROF) driven by a chosen PMU event (e.g. cache-misses, etc)?
I'm using a SIGITIMER-driven profiler (LuaJIT's one) and it would be
wonderfully convenient to be able to switch the event source while
keeping the signal-driven flow.
Cheers,
-Luke (a big perf tools fan)
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Signal on PMU event?
2014-04-20 18:45 Signal on PMU event? Luke Gorrie
@ 2014-04-21 14:29 ` Christopher Covington
2014-04-21 14:41 ` Luke Gorrie
0 siblings, 1 reply; 3+ messages in thread
From: Christopher Covington @ 2014-04-21 14:29 UTC (permalink / raw)
To: Luke Gorrie; +Cc: linux-perf-users
Hi Luke,
On 04/20/2014 02:45 PM, Luke Gorrie wrote:
> Howdy!
>
> Is it possible for a self-profiling program to receive a signal (e.g.
> SIGPROF) driven by a chosen PMU event (e.g. cache-misses, etc)?
>
> I'm using a SIGITIMER-driven profiler (LuaJIT's one) and it would be
> wonderfully convenient to be able to switch the event source while
> keeping the signal-driven flow.
It is possible to receive a SIGIO after a specified number of events. You have
to be careful to set the sample_period, watermark, and wakeup_events or
wakeup_watermark attributes and set the asynchronous flag on the resulting
file descriptor (always setting the owner may be required as well) for it to
work. You can find an example in perf_event_tests [1].
1.
https://github.com/deater/perf_event_tests/blob/master/tests/overflow/wakeup_events_overflow.c
Regards,
Christopher
--
Employee of Qualcomm Innovation Center, Inc.
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
hosted by the Linux Foundation.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Signal on PMU event?
2014-04-21 14:29 ` Christopher Covington
@ 2014-04-21 14:41 ` Luke Gorrie
0 siblings, 0 replies; 3+ messages in thread
From: Luke Gorrie @ 2014-04-21 14:41 UTC (permalink / raw)
To: Christopher Covington; +Cc: linux-perf-users
On 21 April 2014 16:29, Christopher Covington <cov@codeaurora.org> wrote:
>
> It is possible to receive a SIGIO after a specified number of events.
That's awesome. Thanks!
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-04-21 14:41 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-04-20 18:45 Signal on PMU event? Luke Gorrie
2014-04-21 14:29 ` Christopher Covington
2014-04-21 14:41 ` Luke Gorrie
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).