mrolle

How does the PMC driver find the interrupted IC on Windows?

Discussion created by mrolle on Jun 4, 2009
Latest reply on Jun 5, 2009 by mrolle
Want help in writing my own driver

This is for Windows (XP or later).

I am writing my own drivers to collect performance events.

I have succeeded in programming the IBS registers and catching the interrupts and saving the information.

I want to do similar things with the PMCs.  But what I can't find out how to do is find the instruction address where the running thread was interrupted.

I can get the HANDLE for the interrupted thread.  But I have found no documented kernel support functions that will give me, say, the context record for the running thread.

Could somebody tell me how the CA's driver does this?

Or does somebody know in general how it can be done?

(Looking at OProfile for linux would not be any help on Windows, unless it actually uses hardware registers only.  I'll look it up, and if I find anything useful for Windows, I'll post that information here.)

Outcomes