The Hook Trace tab allows you to control which debug or trace functions are monitored by Thread Validator.
Thread Validator can collect the output from various debug and trace functions or macros, including:
•AfxTrace()
•TRACE()
•OutputDebugString()
The TRACE() macros ultimately get routed via OutputDebugString(), so to avoid duplicate output Thread Validator doesn't allow both to be collected at the same time.
Collection is enabled via the main hook option, with output available on the Analysis tab.
•Hook trace messages collect TRACE() or OutputDebugString() messages
Once hooking is enabled (not the default), choose either:
•OutputDebugString collect OutputDebugString() messages
Collect OutputDebugString call stack optionally also collect the callstack for each message
•Trace (TRACE(), AfxTrace()...) collect TRACE() messages
Collect TRACE call stack optionally also collect the callstack for each message
Thread Validator can detect stalled threads by monitoring the time a thread's context switch count is unchanged.
When the time for which a thread's context switch count is unchanged exceeds a threshold, the thread is considered stalled.
In reality, there may be many reasons why a thread may be (or appear to be) stalled. It may be due to:
•a time consuming wait operation on a handle object
•a wait on an owned critical section
•a call to Sleep() or SleepEx()
•the thread having been suspended
•the thread being in a deadlock
Once a thread has been marked as stalled, then if the context switch count starts to change the thread will be marked as non-stalled.
Stalled threads are displayed using a different colour , as defined on the Lock Colours settings dialog.
•Detect stalled threads enable thread stall detection
•Time threshold (mS) enter the threshold time (in milliseconds)
The default is 10 seconds (10000ms)
Reset All - Resets all global settings, not just those on the current page.
Reset - Resets the settings on the current page.