Intel performance monitoring program under Linux
Posted: Wed Jul 06, 2011 9:34 am
Hi all,
I am a newbie to Osdev forum. I'm not sure if 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 to analyze applications running on an Intel CPU. The operating system is Fedora 13 with kernel 2.6.33. 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 write the values to this file during execution), and the samplings are implemented by inserting a task into the delayed work queue (queue_delayed_work_on). 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 every 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.
Thanks
I am a newbie to Osdev forum. I'm not sure if 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 to analyze applications running on an Intel CPU. The operating system is Fedora 13 with kernel 2.6.33. 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 write the values to this file during execution), and the samplings are implemented by inserting a task into the delayed work queue (queue_delayed_work_on). 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 every 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.
Thanks