Windows System Software -- Consulting, Training, Development -- Unique Expertise, Guaranteed Results

Home NTDEV
Before Posting...
Please check out the Community Guidelines in the Announcements and Administration Category.

More Info on Driver Writing and Debugging


The free OSR Learning Library has more than 50 articles on a wide variety of topics about writing and debugging device drivers and Minifilters. From introductory level to advanced. All the articles have been recently reviewed and updated, and are written using the clear and definitive style you've come to expect from OSR over the years.


Check out The OSR Learning Library at: https://www.osr.com/osr-learning-library/


problems about use WPT to record ISR/DPCs

halouworlshalouworls Member Posts: 26
edited June 10 in NTDEV

Recently , I use WPT to diagnose system performance, but i have a problem about WPT:
I use WPR to record for 15 seconds, then stop and open the result etl file with windows performance analyzer, in "DPC and ISR usage by module,stack" view, the Count of function halpTimerClockInterrupt is "2", what i know is in normal situations, it should be 15s * 64= 960 ( because timer resolution is 15.625ms).

Does any one seen this before? Thanks!

etl file:
https://1drv.ms/u/s!Ah6elijz1yPSg14jE7T_RtZzOS4T?e=CgZst2

Comments

  • MBond2MBond2 Member Posts: 144

    is there a question here?

  • halouworlshalouworls Member Posts: 26

    @MBond2 said:
    is there a question here?

    the function called halpTimerClockInterrupt is timer interrupt handler, on x86 platform(windows), the timer resolution is 15.625ms, so the "count" of this function in 1 second should be 64, and I recorded for 15 seconds, so the total count shoule be 15*64=960, but not 2.

  • Tim_RobertsTim_Roberts Member - All Emails Posts: 13,494

    You need to understand what you're measuring. It doesn't record every function that's ever executed, of course. That would be impossible. That tool is an IP sampler. It uses special CPU features to periodically capture the value of the program counter -- snapshots every once in a while. halpTimerClockInterrupt is a very quick routine, so you don't catch it running very often.

    Tim Roberts, [email protected]
    Providenza & Boekelheide, Inc.

  • halouworlshalouworls Member Posts: 26

    @Tim_Roberts said:
    You need to understand what you're measuring. It doesn't record every function that's ever executed, of course. That would be impossible. That tool is an IP sampler. It uses special CPU features to periodically capture the value of the program counter -- snapshots every once in a while. halpTimerClockInterrupt is a very quick routine, so you don't catch it running very often.

    Thanks.I agree with you.

  • MBond2MBond2 Member Posts: 144

    It would not be impossible to develop a tool that measured exact call counts. But such a tool would have such a significant effect on the performance of the code being measured as to make it nearly useless as a performance measuring tool

  • Scott_Noone_(OSR)Scott_Noone_(OSR) Administrator Posts: 3,302

    Sorry to be late to the party, but one other point of clarification...

    Indeed the OP only sees two instances of the timer due to sampling. However, WPT also has the ability to consume ETW trace points and thus show every single ISR/DPC invocation in the system. This is the difference between looking at the "CPU Usage (Sampled) DPC and ISR" (sampling) and "DPC/ISR Timeline" (ETW).

    You'll note however that even under the ETW data you don't see every clock interrupt. This is just due to the fact that Windows doesn't log an ETW event for every clock tick (there's a magic "don't log this ISR" undocumented flag when connecting an interrupt).

    -scott
    OSR

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Upcoming OSR Seminars
OSR has suspended in-person seminars due to the Covid-19 outbreak. But, don't miss your training! Attend via the internet instead!
Kernel Debugging 30 Mar 2020 OSR Seminar Space
Developing Minifilters 15 Jun 2020 LIVE ONLINE
Writing WDF Drivers 22 June 2020 LIVE ONLINE
Internals & Software Drivers 28 Sept 2020 Dulles, VA