questions about performance monitoring counters

questions about performance monitoring counters

Hi all, I am a newbie to Intel forum. I hope this is the correct subforum to post this thread; if not, please forward it to the correct place. I am working on a project using hardware performance monitoring counters. In my current implementation, the counter values are read through a file under /proc (thus I need to create a proc_entry before the sampling and read the values to this file during execution), and the samplings are implemented by inserting a task into the delayed work queue. By doing this, I am able to read the performance counter values at fixed time intervals, say, once a second. However, I want to read the counters in another way. Namely, rather than collect those counters every second, I would like to read them after one million instructions are executed. That is, read the counter values when 1M, 2M, 3M....instructions are executed. I have no clue on this change. Can anyone give me a hint on this? Any suggestions will be appreciated. By the way, I am using Fedora 13 with kernel 2.6.33.Thanks

5 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

nobody can help me? If I post in the wrong subforum, could anyone tell me the correct place to give this question?Thanks

It is possible to program processor PMU to generate interrupt after certain amount of events (instructions retired in your case) occured. But you'll need to write a driver for this. May be there are more easy ways to do what you need but I'm not aware of them.

Thanks for your reply, Dmitry. Programming PMU to generate interrupt is a good suggestion. I'll have a try on that.

You are right that this forum is not about profilers writing but about one concrete profiler.
I doubt that we have such a forum but you are welcome to browse ISN.
Linux OS grows its PMU-based profiling capabilities too so it is possible to find an answer on some Linux forum.

In addition to Dmitry's reply I can add the following:
Intel VDK and SEP DK (next VDK generation) and distrinuted under GPL2 license.
You could tryreuse it instead of writing your own driver since it is really not that easy.

Leave a Comment

Please sign in to add a comment. Not a member? Join today