You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/build-insights/tutorials/vcperf-and-wpa.md
+24-13Lines changed: 24 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -25,33 +25,39 @@ A version of WPA that supports C++ Build Insights is currently only available in
25
25
26
26
NOTE: Windows 8 or above is required for installing the Windows Performance Analyzer.
27
27
28
-
1. Browse to the Windows ADK Insider Preview [download page](https://www.microsoft.com/en-us/software-download/windowsinsiderpreviewADK).
28
+
1. Browse to the Windows ADK [download page](https://docs.microsoft.com/windows-hardware/get-started/adk-install).
29
29
30
-
1. Download the Windows ADK Insider Preview. It's a disk image.
31
-
32
-
1. Open the disk image and run the *adksetup.exe* installer.
30
+
1. Download and install the latest version of the Windows ADK.
33
31
34
32
1. When prompted for the features that you want to install, select the **Windows Performance Toolkit**. You may select other features if you wish, but they're not required to install WPA.
35
33
36
34

37
35
38
-
### <aname="configuration-steps"></a> To configure Build Insights
39
-
40
-
1. Launch WPA.
36
+
### <aname="configuration-steps"></a> To configure WPA
1. Copy the `perf_msvcbuildinsights.dll` file into your WPA installation directory.
45
+
1. In Visual Studio 2019 version 16.6 and above, this file is located here: `C:\Program Files (x86)\Microsoft Visual Studio\2019\{Edition}\VC\Tools\MSVC\{Version}\bin\Host{Architecture}\{Architecture}`.
46
+
1. In the C++ Build Insights NuGet package, this file is located here: `wpa\{Architecture}`.
47
+
1. In the paths above, replace the variables surrounded by curly brackets as follows:
48
+
1.`{Edition}` is your Visual Studio 2019 edition such as Community, Professional or Enterprise.
49
+
1.`{Version}` is your MSVC version. Choose the highest one available.
50
+
1.`{Architecture}`: choose `x64` if you have a 64-bit version of Windows. Otherwise, choose `x86`.
51
+
1. The WPA installation directory is typically: `C:\Program Files (x86)\Windows Kits\10\Windows Performance Toolkit`.
1. In your WPA installation directory, open the `perfcore.ini` file and add an entry for `perf_msvcbuildinsights.dll`.
49
54
50
55
## Step 2: Trace your build with vcperf.exe
51
56
52
57
To view C++ Build Insights data, first collect it into a trace file by following these steps:
53
58
54
-
1. Open a native tools or cross tools developer command prompt for Visual Studio 2019 in administrator mode. (Right-click the Start menu item and choose **More** > **Run as administrator**.)
59
+
1. Open an **x64** or **x86 Native Tools Command Prompt for VS 2019** in administrator mode. (Right-click the Start menu item and choose **More** > **Run as administrator**.)
60
+
1. Choose **x64** if you have a 64-bit version of Windows. Otherwise, choose **x86**.
55
61
56
62
1. In the command prompt window, enter this command:
57
63
@@ -83,13 +89,18 @@ Here's what a typical *vcperf.exe* command sequence looks like in a developer co
83
89
84
90
-*vcperf.exe* collects information about all MSVC tools running on your system. As a result, you don't have to start your build from the same command prompt you used to collect the trace. You can build your project from either a different command prompt, or even in Visual Studio.
85
91
92
+
### vcperf.exe is open source
93
+
94
+
If you wish to build and run your own version of *vcperf.exe*, feel free to clone it from the [vcperf GitHub repository](https://github.com/microsoft/vcperf).
95
+
86
96
## Step 3: View your trace in Windows Performance Analyzer
87
97
88
98
Launch WPA and open the trace you just collected. WPA should recognize it as a C++ Build Insights trace, and the following views should appear in the Graph Explorer panel on the left:
89
99
90
100
- Build Explorer
91
101
- Files
92
-
- Function
102
+
- Functions
103
+
- Template Instantiations
93
104
94
105
If you can't see these views, double-check that WPA is configured correctly, as described in [Step 1](#configuration-steps). You can view your build data by dragging the views into the empty Analysis window on the right, as shown here:
0 commit comments