On Tue, Jul 08, 2014 at 11:42:42AM -0300, Martin Ichilevici de Oliveira wrote:
> Hello,
> 
> I'm learning the perf_events programming interface and I'm not sure if
> what I'm trying to do is possible. I could only find the perf_event_open
> documentation, but unfortunately that's not enough for my needs, as it
> only counts the number of events that happened.
> 
> I'm looking for a way to determine which instruction caused some events:
> something similar to what perf annotate does, but in an online fashion. 
> Ideally, I'd like to have some kind of handler that gets called whenever
> a perf event occurs. Is that even possible? If not, is there any way I 
> could get this information in a real-time way?

hi,
you could use perf_event_create_kernel_counter interface,
check the lockup watchdog in kernel/watchdog.c

jirka
--
To unsubscribe from this list: send the line "unsubscribe linux-perf-users" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to