xperf and SetThreadExecutionState() RRS feed

  • Question

  • We have a batch file that we are running to script some xperf analysis. We are trying to trace calls to SetThreadExecutionState(). Then we run the below trace and we get nothing. We have an app that we are pretty sure is calling SetThreadExecutionState() properly as it prevents the system from going to sleep. Anyone know what we are not doing right in the batch file?




    The Trace

    C:\perf>xperf -i perf.etl -a stack -symbol SetThreadExecutionState

    error: stack: no option specified



    Batch file contents:


    REM Install the stack walking variables. (lines removed for clarity)
    xperf -on -stackwalk ThreadSetPriority+ThreadSetBasePriority+PowerSetPowerAction+PowerSetPowerActionReturn+PowerPreSleep+PowerPostSleep+PowerPerfStateChange
    REM (Run the exlevel.exe app wait 30 seconds) This is the app that calls SetThreadExecutionState
    xperf -d perf.etl 

    Thursday, December 17, 2009 1:48 AM