Jaa


Recording for Heap Analysis

Windows Performance Recorder (WPR) enables heap analysis for all processes on the system.

To enable heap tracing for a desktop app

(Using WPRUI.exe)

  1. From the More options dropdown menu, select the Heap usage profile.

  2. Add a registry entry for the process by running the following command from an elevated command prompt window, replacing <process_name> with the name of the process to be traced:

    reg add "HKLM\Software\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\<process_name>" /v TracingFlags /t REG_DWORD /d 1 /f

(Using Wpr.exe)

  1. Enable Heap tracking by setting the IFEO registry wpr.exe -HeapTracingConfig <process_name> enable

  2. Start the tracing session: wpr.exe -start Heap [-filemode]

  3. test the scenario.

  4. Stop the tracing session: wpr.exe -stop <file_name>

  5. Disable Heap tracking wpr.exe -HeapTracingConfig <process_name> disable

To enable heap tracing for a Microsoft Store app

  1. From the More options dropdown menu, select the Heap usage profile.

  2. If you want to trace a packaged application that is hosted in a process (such as WWAHost.exe), add a registry entry for the process by running the following command from an elevated command prompt window, replacing <process_name>, <package full name>, and <package-relative app ID> with your app information:

    reg add "HKLM\Software\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\<process_name>\<package full name>!<package-relative app ID>" /v TracingFlags /t REG_DWORD /d 1 /f

    Note   This combination (package full name + app ID) is not an app user model ID (package family name + app ID). The IFEO processing routines use the full name so that they can apply different behavior to different versions of a single package/app.

WPR Common Scenarios

Image File Execution Options