none
How does the WinCE 6.0 Performance Monitor calculate the "%Processor Time" value? RRS feed

  • Question

  • I have written a driver for an on-chip peripheral timer for an iMX27 @ 399 MHz. The driver IST uses a WaitForSingleObject() to wait on an event that is generated by the timer interrupt.  Based on OSBench results the max. time for a "SetEvent()...WaitForSingleObject()" sequence to be processed is 108 microseconds. Currently all the IST does is just waits for a WaitForSingleObject() (in an infinite loop). When the timer is configured to generate an interrupt every 1ms, the Performance Monitor (remote tool running on the host) displays a "%Processor Time"  of 0 for the IST thread for 28 secs. It then shows a triangular spike of 30-70 that lasts for 5 seconds. This output is periodic i.e. 28 secs of 0% Processor Time followed by a spike that lasts for 5 secs.
    If the timer is configured to generate an interrupt every 2ms, the Performance Monitor displays a "%Processor Time"  of 0 for the IST thread for 56 secs. It then shows a triangular spike of 30-50 that lasts for 10 seconds.
    On investigating the behaviour using Kernel Tracker, it was found that the IST never runs for more than 105 microseconds & typically running for 40 microseconds. This behaviour is as expected theoretically. The output expected from the performance monitor is the IST taking 4% Processor Time" with some spikes of 10%.
    Do I need to instrument the driver in some manner for the performance monitor to indicate the correct stats w.r.t the IST?
    • Moved by Jesse Jiang Monday, December 5, 2011 5:53 AM (From:Visual Studio Smart Device Development - Native C++ Project)
    Thursday, December 1, 2011 10:28 AM

All replies