locked
How to get CPU clock cycles used by process in kernel mode only? RRS feed

  • Question

  • Hello,

    As the title suggests I'm interested in obtaining CPU clock cycles used by a process in kernel mode only. I know there is an API called "QueryProcessCycleTime" which returns the CPU clock cycles used by the threads of the process. But this value includes cycles spent in both user mode and kernel mode. How can I obtain cycles spent in kernel mode only? Do I need to get this using Performance counters? If yes, which one I should use?

    Thanks in advance for your answers.


    Nikhil Chudekar

    Monday, February 24, 2014 12:26 PM

Answers

  • Hi,

    In Performance Monitor,  a counter callled %Privilege Time under Processor and Process  record the amount of time a processor and each process busy with Kernel mode operations, is it what you want?

    Regards


    Yolanda Zhu
    TechNet Community Support

    • Marked as answer by Roger Lu Thursday, March 6, 2014 5:37 AM
    Wednesday, February 26, 2014 9:53 AM