On Tue, 8 Jul 2014, Martin Ichilevici de Oliveira wrote: > 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?
Not really sure by what you mean by "real-time", but you can theoretically set up the perf_event mmap buffer with a low threshold, and have it configured to send a signal to your program whenever an event comes in. In theory you can get the PEBS-like info out that way. It's going to have fairly high overhead though, especially if you set the sample rate high. It's even worse if you are trying to get full info on *every* event. That's probably not possible with any even that happens more than a few times a second. Vince -- 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