Software Tuning, Performance Optimization & Platform Monitoring
Discussion regarding monitoring and software tuning methodologies, Performance Monitoring Unit (PMU) of Intel microprocessors, and platform updating.

Registering a handler for a PMI

Maor_H_
Beginner
892 Views

Hi!

This is the first thread i've published here.

I want to get an interrupt whenever a Performance Counter Monitor is overflowed on windows. i've set everything, and even checked that everything works (meaning, the PMC is counting my event, and an interrupt is being raised - i know this since i've checked that the 16-th bit is on in the relevent LVT).

The problem is, i don't know how to register the handler. i'm using HalSetSystemInformation, with the first parameter as HalProfileSourceInterruptHandler. i tried 2 things to send as the handler.

1. Sending my handler's address directly to the function - it results in a BSOD saying INTERRUPT_EXCEPTION_NOT_HANDLED. (do i need to do anything special in my handler? does the function has to be of a specific signature? do i have to register this interrupt handler?)

2. Tried to create an MCA_DRIVER_INFO object to send, as stated by MSDN about HalSetSystemInformation, but the only function being called is the exception callback. does it make any sense?

I've searched the internet for days, and found nothing, not even decadent code samples.

would appreciate any help!

thanks!

0 Kudos
0 Replies
Reply