getting notified in user-space on interrupts
I hope this is the right place to post to. Sorry for the cross post in the Linux Kernel Forum.
I'm working on an AMD opteron running Linux 184.108.40.206
I want to preload a hardware performance counter (register) with a value to have it overflow after a number of a specific event counts. As I understand, when the counter in the register overflows, an interrupt will be generated and handled by the appropriate interrupt handler. How can my user-level application get notified whenever the interrupt occurs? I want to obtain information on the instruction that caused the overflow. Is this possible?
I think this is different than responding to signals with sigaction(). I never dealt with interrupts before, so any help is appreciated.