views:

463

answers:

3

Is there any tool which displays at runtime, Page Faults delta on a per thread basis? Basically I have an application that is causing lots of page faults and I want to nail down the thread which is causing the maximum.

A: 

I really doubt you could nail down page faults to threads a process page faults not a thread. Surely though its going to be the busiest thread in terms of either CPU or may be Context switches that you would want to look at.

I use process explorer for this sort of diagnosis. Open the properties on your application and select the threads tab.

AnthonyWJones
The fault itself occurs in a very specific context, actually. Perhaps Windows doesn't keep track of how many page faults occur in each individual thread, but that doesn't change the fact that those page faults did occur in specific threads.
SamB
A: 

Use PerfMon tool to monitor counters.

lsalamon
Can you tell me the counters to add? I dont see any Per thread counter which will show the page faults.
Canopus
I do not believe there is a counter for page-fault by thread, only for the process. Thread Counter per process maybe help you.
lsalamon
A: 

Use Xperf. It aggregates ETW events & lets you drill down to find out which process/thread/function is responsible for most cpu/memalloc/diskops/faults etc.