Skip to content

Fix git push error for protected CLA branch #1683

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 62 commits into from
Nov 4, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
62 commits
Select commit Hold shift + click to select a range
f6c0eb2
updates to cmakesettings reference
Oct 11, 2019
1c3ee3d
additional edits
Oct 14, 2019
c4c96c7
proofing pass
Oct 14, 2019
7356645
updated for x-plat guidance
Oct 23, 2019
5c55c7a
typo
Oct 23, 2019
caee84b
updates to porting guide
Oct 23, 2019
8299611
fixed links and some other text
Oct 23, 2019
13f3a50
fixed note about open source code
Oct 24, 2019
e0d57f0
fixed date
Oct 24, 2019
10457ca
fixed monikers and version-specific wording
Oct 24, 2019
25dfb36
new topic for IDE support for porting plus other tweaks
Oct 25, 2019
5574601
intermediate checkin
Oct 25, 2019
d7d2855
more edits in flight
Oct 25, 2019
d0a0581
more edits for porting section
Oct 28, 2019
aae8701
a few more tweaks
Oct 28, 2019
2bdb578
Update create-a-new-linux-project.md
itechedit Oct 29, 2019
e788958
fixed links
Oct 29, 2019
39d1a8b
fixed link path
Oct 29, 2019
a64e812
Add section on tcp port forwarding
esweet431 Oct 29, 2019
f7ba969
minor formatting
Oct 29, 2019
cbce069
Format and clean up numeric
Oct 30, 2019
6e6780b
Merge pull request #2452 from MicrosoftDocs/FromPublicMasterBranch
Oct 30, 2019
03cddad
More updates for style, F1
Oct 30, 2019
2060033
Merge pull request #2454 from MicrosoftDocs/FromPublicMasterBranch
Oct 30, 2019
0ad3c29
added link to remarks
Oct 30, 2019
1f92ed9
Update text for LNK1120 in a hopeless cause
Oct 31, 2019
009244f
Fix important note issue
Oct 31, 2019
36cc534
Style and wording.
Oct 31, 2019
eb30281
Update links
esweet431 Oct 31, 2019
dadda32
Photos
esweet431 Oct 31, 2019
a17707d
FIx links to photos
esweet431 Oct 31, 2019
842256b
Merge pull request #2455 from mikeblome/mb-1656
PRMerger12 Oct 31, 2019
2651b01
acrolinx spelling
Oct 31, 2019
cb18c89
updates per tech review
Oct 31, 2019
ac03e2c
fix merge conflicts
Oct 31, 2019
c6d5268
fixed link
Oct 31, 2019
008f56a
Update connect-to-your-remote-linux-computer.md
mikeblome Oct 31, 2019
7c9f558
Merge pull request #2401 from mikeblome/mb-cmake-updates
tiburd Oct 31, 2019
1bb6c8c
Delete photo1
esweet431 Oct 31, 2019
74b6991
Delete photo2
esweet431 Oct 31, 2019
cdfe2bc
Upload photos w/lowercase .png
esweet431 Oct 31, 2019
6260131
Merge pull request #2449 from esweet431/patch-1
tfosmark Oct 31, 2019
993651b
Merge pull request #2457 from MicrosoftDocs/FromPublicMasterBranch
Oct 31, 2019
9f2755f
Merge pull request #2456 from corob-msft/cr-1617796
tfosmark Oct 31, 2019
7dced28
Merge pull request #2440 from mikeblome/mb-porting2
tiburd Oct 31, 2019
c32bd9b
Merge pull request #2451 from corob-msft/cr-build-issues
garycentric Oct 31, 2019
afc907d
Bulk fix to debug fill character
Nov 1, 2019
a12592c
Update date, description, Acrolinx
Nov 1, 2019
5a653a7
Acrolinx _strdate_s
Nov 1, 2019
a528970
Make LNK1120 friendlier and more helpful
Nov 1, 2019
5f673ee
Grammar
Nov 1, 2019
a74e3d6
Merge pull request #2459 from corob-msft/cr-1617796-2
PRMerger9 Nov 1, 2019
08c3bc8
Merge pull request #2458 from corob-msft/cr-1668
PMEds28 Nov 1, 2019
74b977a
added description
Nov 1, 2019
632f0cc
Merge branch 'mb-linux2' of github.com:mikeblome/cpp-docs-pr into mb-…
Nov 1, 2019
183c45c
Merge pull request #2438 from mikeblome/mb-linux2
GitHubber17 Nov 1, 2019
447f493
Build insights (#2314)
kevcadieux Nov 3, 2019
4b4b8e8
Remove PCH from desktop walkthrough
Nov 3, 2019
c0a86ed
Merge pull request #2460 from corob-msft/cr-1666
PRMerger7 Nov 3, 2019
e7bb9a1
Merge pull request #2462 from MicrosoftDocs/FromPublicMasterBranch
Nov 4, 2019
a83f3f5
Merge pull request #2464 from MicrosoftDocs/FromPublicMasterBranch
Taojunshen Nov 4, 2019
2786585
Merge pull request #2465 from MicrosoftDocs/master
Taojunshen Nov 4, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
95 changes: 95 additions & 0 deletions docs/build-insights/getting-started.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
---
title: "Getting started with C++ Build Insights"
description: "A high-level overview of how to use the tools that are part of C++ Build Insights."
ms.date: "09/06/2019"
helpviewer_keywords: ["C++ Build Insights", "throughput analysis", "build time analysis", "vcperf.exe"]
ms.assetid: 88dbcc3a-787b-4da5-b6ae-738fe6f02e7f
---
# Getting started with C++ Build Insights

## Introduction

C++ Build Insights is a collection of tools that provides increased visibility into the Microsoft Visual C++ (MSVC) tool chain. It collects data about your C++ builds and presents it in a format that can help you answer common questions like:

- Are my builds sufficiently parallelized?
- What should I include in my pre-compiled header (PCH)?
- Is there a specific bottleneck I should focus on to increase my build speeds?

The two principal components of this technology are the command-line utility *vcperf.exe* and an add-in for the Windows Performance Analyzer (WPA) trace viewer. The utility is used to collect traces of your build, while the add-in allows you to view them in WPA. On this page, we will show you how to quickly get started using these two tools.

## Step 1: Install and configure Windows Performance Analyzer

WPA is a trace viewer available in the Windows Assessment and Deployment Kit (ADK). It needs to be obtained separately from Visual Studio. Acquiring and setting up this component can be done by following the steps below.

### Acquisition steps

A version of WPA that supports C++ Build Insights is currently only available in the Windows ADK Insider Preview. To access this preview, you will need to sign up to the Windows Insider Program. You do not need to install the Windows 10 Insider Preview operating system to obtain the Windows ADK preview; simply registering your Microsoft account with the Windows Insider Program is enough.

1. Browse to the Windows ADK Insider Preview [download page](https://www.microsoft.com/software-download/windowsinsiderpreviewADK).
1. Download the Windows ADK Insider Preview. It is a disk image.
1. Open the disk image and run the *adksetup.exe* installer.
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 are not required to install WPA.

The image below shows an appropriate feature selection:

![The Windows Performance Analyzer installer's feature selection screen](media/wpa-installation.png)

### Configuration steps

1. Launch WPA.
1. Select Window -> Select Tables (Experimental).
1. Scroll down to the Diagnostics section.
1. Make sure all the C++ Build Insights views are selected.

A correctly configured table selection looks like the following image:

![Windows Performance Analyzer's table selection panel](media/wpa-configuration.png)

## Step 2: Trace your build with vcperf.exe

Viewing C++ Build Insights data requires you to first collect it into a trace file by following these steps:

1. Open a native tools or cross tools command prompt for Visual Studio 2019 in administrative mode.
1. Issue the following command: `vcperf.exe /start SessionName`. Choose a session name that you will remember.
1. Build your project as you normally would. You do not need to use the same command prompt.
1. Issue the following command: `vcperf.exe /stop SessionName traceFile.etl`. Use the same session name that was chosen when issuing the start command. Give your trace file an appropriate name.

The image below illustrates the use of *vcperf.exe*:

![A simple vcperf.exe usage scenario](media/vcperf-simple-usage.png)

### Important notes about vcperf.exe

- Starting and stopping a trace with *vcperf.exe* requires administrative privileges.
- Only one tracing session at a time may run on a machine.
- Make sure to remember the session name you used to start your trace. Stopping a running session without knowing its name can be troublesome.
- Just like *cl.exe* and *link.exe*, the command-line utility *vcperf.exe* is included in an MSVC installation. No additional step is required to obtain this component.
- *vcperf.exe* collects information about all MSVC tools running on your system. As a result, it is not necessary to start your build from the command prompt that you used to collect the trace. If desired, you can build your project from either a different command prompt or even Visual Studio.

## Step 3: View your trace in Windows Performance Analyzer

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:

- Build Explorer
- Files
- Function

If you cannot see these views, double-check that WPA has been configured correctly as described in [Configuration steps](#configuration-steps). You can view your build data by dragging the views into the empty Analysis window on the right. This step is shown in the image below.

Other views might also be available in the Graph Explorer panel. Feel free to also drag them into the Analysis window if you are interested in the information they contain. A useful one is the CPU (Sampled) view, which shows CPU utilization throughout your build.

![Viewing a C++ Build Insights trace in Windows Performance Analyzer](media/wpa-viewing-trace.gif)

## More information

[Windows Performance Analyzer basics](wpa-basics.md)<br/>
Learn about common WPA operations that can help you analyze your build traces.

[vcperf.exe reference](vcperf-reference.md)<br/>
View this page for a list of *vcperf.exe* commands.

[Windows Performance Analyzer views reference](wpa-views-reference.md)<br/>
Refer to this page for details about the C++ Build Insights views in WPA.

[Windows Performance Analyzer](https://docs.microsoft.com/windows-hardware/test/wpt/windows-performance-analyzer)<br/>
The official WPA documentation site.
Binary file added docs/build-insights/media/vcperf-simple-usage.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/build-insights/media/wpa-configuration.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/build-insights/media/wpa-grouping.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/build-insights/media/wpa-installation.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/build-insights/media/wpa-presets.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/build-insights/media/wpa-viewing-trace.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/build-insights/media/wpa-zooming.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
32 changes: 32 additions & 0 deletions docs/build-insights/vcperf-reference.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
---
title: "C++ Build Insights: vcperf.exe reference"
description: "Reference for the command-line utility vcperf.exe."
ms.date: "09/16/2019"
helpviewer_keywords: ["C++ Build Insights", "throughput analysis", "build time analysis", "vcperf.exe"]
ms.assetid: a2a4c05a-4a77-44da-922e-d2c939cfd4e6
---
# C++ Build Insights: vcperf.exe reference

## Introduction

This section describes the commands that are available in *vcperf.exe* and how to use them.

## Commands to start and stop traces

*IMPORTANT: the following commands all require administrative privileges.*

| Option | Arguments and description |
|------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `/start` | `[/nocpusampling]` `<sessionName>` |
| | Instructs *vcperf.exe* to start a trace under the given session name. There may only be one active session at a time on a given machine. <br/><br/> If the `/nocpusampling` option is specified, *vcperf.exe* will not collect CPU samples. This will prevent the use of the CPU Usage (Sampled) view in Windows Performance Analyzer, but will make the collected traces smaller. <br/><br/> Once tracing is started, *vcperf.exe* returns immediately. Events are collected system-wide for all processes running on the machine. This means that you do not need to build your project from the same command prompt as the one you used to run *vcperf.exe*. For example, you can build your project from Visual Studio. |
| `/stop` | `<sessionName>` `<outputFile.etl>` |
| | Stops the trace identified by the given session name. Runs a post-processing step on the trace to generate a file that can be viewed in Windows Performance Analyzer (WPA). For the best viewing experience, you will need a version of WPA that includes the C++ Build Insights add-in. For more information, please see the [Getting started](getting-started.md) page. The `<outputFile.etl>` parameter specifies the location where the output file will be saved. |
| `/stopnoanalyze` | `<sessionName>` `<rawOutputFile.etl>` |
| | Stops the trace identified by the given session name and writes the raw, unprocessed data in the specified output file. The resulting file is not meant to be viewed in WPA. <br/><br/> The post-processing step involved in the `/stop` command can sometimes be lengthy. You can use the `/stopnoanalyze` command to delay this post-processing step. Use the `/analyze` command when you are ready to produce a file that can be viewed in Windows Performance Analyzer. |

## Miscellaneous commands

| Option | Arguments and description |
|------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `/analyze` | `<rawInputFile.etl> <outputFile.etl>` |
| | Accepts a raw trace file produced by the `/stopnoanalyze` command. Runs a post-processing step on this trace to generate a file that is suitable for viewing in Windows Performance Analyzer. For the best viewing experience, you will need a version of WPA that includes the C++ Build Insights add-in. For more information, please see the [Getting started](getting-started.md) page. |
45 changes: 45 additions & 0 deletions docs/build-insights/wpa-basics.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
---
title: "C++ Build Insights: Windows Performance Analyzer basics"
description: "Tutorial on how to complete basic operations in Windows Performance Analyzer."
ms.date: "09/16/2019"
helpviewer_keywords: ["C++ Build Insights", "throughput analysis", "build time analysis", "vcperf.exe"]
ms.assetid: ceb8e00f-5e98-4948-bd2c-1ac3880b96d4
---
# C++ Build Insights: Windows Performance Analyzer basics

## Introduction

Using C++ Build Insights effectively requires some knowledge of Windows Performance Analyzer (WPA). This section will help you become familiar with common WPA operations.

## Changing the view mode

WPA offers two basic view modes for you to explore your traces:

- graph mode; and
- table mode.

You can switch between them as follows:

![Switching between graph mode and table mode.](media/wpa-switching-view-mode.gif)

## Selecting presets

Most C++ Build Insights WPA views have multiple presets for you to choose from. You can select your desired preset by using the drop-down menu shown below:

![Selecting a preset.](media/wpa-presets.png)

## Zooming in and out

Some build traces are so large it is hard to make out the details. Consider zooming on an area that interests you by right-clicking on the graph and selecting *Zoom*. You can always go back to the previous setting by choosing *Undo Zoom*. An example of zooming is illustrated below:

![Zooming in on a graph.](media/wpa-zooming.gif)

## Grouping by different columns

You can customize the way your trace is displayed by clicking on the gear icon at the top of a view and rearranging columns. The columns that are found above the yellow line in this dialog are the ones your data rows will be grouped by. The column right above the yellow line has a special significance for the graph view: it will be displayed on the colored bars. Here is an example where we are looking at a bar graph of a link invocation. The configuration is changed to increase the level of detail and see what was actually happening inside the linker:

![Zooming in on a graph.](media/wpa-grouping.gif)

## More information

For more information on how to use WPA, please refer to its official documentation at [https://docs.microsoft.com/windows-hardware/test/wpt/windows-performance-analyzer](https://docs.microsoft.com/windows-hardware/test/wpt/windows-performance-analyzer).
Loading