Skip to content

Commit

Permalink
Record POWER provider by default in lab traces
Browse files Browse the repository at this point in the history
The POWER provider is needed because CPU frequency can have a huge
effect on power usage - if the CPU frequency goes higher then CPU
usage may be lower while power usage is higher. The POWER provider
records CPU frequency and CPU power-state changes.
  • Loading branch information
randomascii committed Apr 14, 2017
1 parent 6cc4926 commit 3ef4a88
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions LabScripts/GeneralTracing/set_vars.bat
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,9 @@ rem PROC_THREAD+LOADER are required in order to know what binaries are loaded
rem and what threads are running.
rem CSWITCH records context switch data so that precise CPU usage and context
rem switch counts can be recorded. So, these three flags are our minimum set
rem of kernel providers.
set KernelProviders=PROC_THREAD+LOADER+CSWITCH
rem of kernel providers. I then add in +POWER so that we can see CPU frequency
rem and power-state changes.
set KernelProviders=PROC_THREAD+LOADER+CSWITCH+POWER

rem These user providers record GPU usage, window-in-focus, eventemitter events
rem (if emitted), and process working-set samples.
Expand Down
2 changes: 1 addition & 1 deletion LabScripts/GeneralTracing/start_tracing.bat
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ rem which we optionally enable for lab tracing.
rem This extra information will distort timings. This is particularly true
rem of the CSwitch and ReadyThread stackwalk flags.
set KernelProviders=%KernelProviders%+CSWITCH+DISK_IO+HARD_FAULTS+DPC+INTERRUPT+PROFILE
set KernelProviders=%KernelProviders%+POWER+DISPATCHER+DISK_IO_INIT+FILE_IO+FILE_IO_INIT+VIRT_ALLOC+MEMINFO
set KernelProviders=%KernelProviders%+DISPATCHER+DISK_IO_INIT+FILE_IO+FILE_IO_INIT+VIRT_ALLOC+MEMINFO
set StackWalkFlags=Profile+CSwitch+ReadyThread
xperf.exe -start %logger% -on %KernelProviders% -stackwalk %StackWalkFlags% -buffersize 1024 -minbuffers 160 -maxbuffers 160 -f "%kernelfile%" -start %SessionName% -on %UserProviders% -f "%userfile%
:skipdetailed
Expand Down

0 comments on commit 3ef4a88

Please sign in to comment.