Skip to content

Instantly share code, notes, and snippets.

@AArnott
Last active March 15, 2021 14:00
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save AArnott/f9e0114da7c6a6c1387c1ee60af4fdd5 to your computer and use it in GitHub Desktop.
Save AArnott/f9e0114da7c6a6c1387c1ee60af4fdd5 to your computer and use it in GitHub Desktop.
Steps to collect an ETL trace
  1. Download the PerfView tool (for free) from https://github.com/Microsoft/perfview/blob/master/documentation/Downloading.md
  2. Once you have it open, you can see "Collect" in the menu bar at the top. Click on "Collect" and then "Run". Note this may re-launch PerfView in an elevated process, in which case you may need repeat this step in the elevated window.
  3. The "Collecting ETW Data while running a command" dialog will pop up. In the Command section, put in the full path for Visual Studio. It'll look like this: "C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\devenv.exe" Don't forget to add in the quotation marks!
  4. Change the Current Dir field to a directory where the ETL trace files should be created.
  5. Below the "Current Dir" section, you can see "Thread Time." Please make sure it's checked.
  6. Ensure the "Zip" checkbox is checked.
  7. Expand "Advanced Options". Ensure the "No V3.X NGEN Symbols" checkbox is checked.
  8. Click "Run Command"
  9. This will start an instance of Visual Studio. Run to the point where you get a hang, and kill or close Visual Studio after you've gotten to the problem state. Note that any trace you collect should ideally be 30 seconds or less in duration, and no larger than a few minutes. The trace file can grow quite large very quickly, so keeping the duration short keeps the file workably small.
  10. When you close Visual Studio, the PerfView tool will log and create a zip file for you. This may take a bit of time.
  11. After it's done, you'll see that the bottom-right corner of the PerfView tool dialog has stopped blinking blue, and reads "Ready"
  12. If you look on the left side, you will see that a file "PerfViewData.etl.zip" has been created, above the different directories. If you click on it, you'll see the path to where it's stored appear above the "Filter" section.
  13. Send us the zip file!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment