Skip to content

Commit

Permalink
Mention DISK_IO omission when circular buffer tracing
Browse files Browse the repository at this point in the history
On some machines DISK_IO tracing leads to massive event loss when doing
circular buffer tracing. This is presumably a Windows bug. UIforETW has
worked around this for a while by disabling DISK_IO when doing circular
buffer tracing, but this can cause confusion, so this adds an
informative message. This resolves issue #145.
  • Loading branch information
randomascii committed Sep 21, 2020
1 parent 4f365a0 commit e5c4345
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions UIforETW/UIforETWDlg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1021,16 +1021,18 @@ void CUIforETWDlg::OnBnClickedStarttracing()
child.GetOutput();
}

// According to "xperf -providers k" the Latency kernel group is equivalent to:
// PROC_THREAD+LOADER+DISK_IO+HARD_FAULTS+DPC+INTERRUPT+CSWITCH+PROFILE
// On some machines (Google workstations) the DISK_IO provider causes (presumed
// to be spurious) lost event reports when doing circular buffer recording. So,
// omit DISK_IO when doing circular buffer recording.
// Doing so also improves the performance of saving circular buffer traces
// to disk.
std::wstring latency = L" Latency";
if (tracingMode_ == kTracingToMemory)
if (tracingMode_ == kTracingToMemory) {
// According to "xperf -providers k" the Latency kernel group is equivalent to:
// PROC_THREAD+LOADER+DISK_IO+HARD_FAULTS+DPC+INTERRUPT+CSWITCH+PROFILE
// On some machines (Google workstations) the DISK_IO provider causes (presumed
// to be spurious) lost event reports when doing circular buffer recording. So,
// omit DISK_IO when doing circular buffer recording.
// Doing so also improves the performance of saving circular buffer traces
// to disk.
outputPrintf(L"DISK_IO provider is omitted when using circular-buffer tracing. If DISK_IO is needed then manually add it in Settings-> Extra kernel flags.\n");
latency = L" PROC_THREAD+LOADER+HARD_FAULTS+DPC+INTERRUPT+CSWITCH+PROFILE";
}
std::wstring kernelProviders = latency + L"+POWER+DISPATCHER+DISK_IO_INIT+FILE_IO+FILE_IO_INIT+VIRT_ALLOC+MEMINFO";
bool cswitch_and_profile = true;
if (tracingMode_ == kHeapTracingToFile)
Expand Down

0 comments on commit e5c4345

Please sign in to comment.