Skip to content

Commit 92a01cc

Browse files
Tyler WhitneyTyler Whitney
authored andcommitted
Merge branch 'master' of https://github.com/MicrosoftDocs/cpp-docs-pr into twhitney-span
2 parents 4dec371 + 0020253 commit 92a01cc

14 files changed

Lines changed: 1961 additions & 1877 deletions

.openpublishing.redirection.json

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -760,11 +760,6 @@
760760
"redirect_url": "/cpp/cpp/character-sets",
761761
"redirect_document_id": false
762762
},
763-
{
764-
"source_path": "docs/cpp/index.md",
765-
"redirect_url": "/cpp/cpp/cpp-language-reference",
766-
"redirect_document_id": false
767-
},
768763
{
769764
"source_path": "docs/cpp/using-wmain-instead-of-main.md",
770765
"redirect_url": "/cpp/cpp/main-function-command-line-args",

docs/build-insights/get-started-with-cpp-build-insights.md

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ The main components of this technology are:
2525
- a Windows Performance Analyzer (WPA) extension that allows you to view build traces in WPA, and
2626
- the C++ Build Insights SDK, a software development kit for creating your own tools that consume C++ Build Insights data.
2727

28-
Click on the links below to quickly get started with these components:
28+
## Documentation sections
2929

3030
[Tutorial: vcperf and Windows Performance Analyzer](tutorials/vcperf-and-wpa.md)\
3131
Learn how to collect build traces for your C++ projects and how to view them in WPA.
@@ -36,4 +36,16 @@ Discover useful WPA tips for analyzing your build traces.
3636
[C++ Build Insights SDK](reference/sdk/overview.md)\
3737
An overview of the C++ Build Insights SDK.
3838

39+
## Articles
40+
41+
Read these articles from the official C++ team blog for more information on C++ Build Insights:
42+
43+
[Introducing C++ Build Insights](https://devblogs.microsoft.com/cppblog/introducing-c-build-insights/)
44+
45+
[Analyze your builds programmatically with the C++ Build Insights SDK](https://devblogs.microsoft.com/cppblog/analyze-your-builds-programmatically-with-the-c-build-insights-sdk/)
46+
47+
[Finding build bottlenecks with C++ Build Insights](https://devblogs.microsoft.com/cppblog/finding-build-bottlenecks-with-cpp-build-insights/)
48+
49+
[Faster builds with PCH suggestions from C++ Build Insights](https://devblogs.microsoft.com/cppblog/faster-builds-with-pch-suggestions-from-c-build-insights/)
50+
3951
::: moniker-end

docs/build-insights/tutorials/vcperf-and-wpa.md

Lines changed: 24 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -25,33 +25,39 @@ A version of WPA that supports C++ Build Insights is currently only available in
2525

2626
NOTE: Windows 8 or above is required for installing the Windows Performance Analyzer.
2727

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).
2929

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.
3331

3432
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.
3533

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

38-
### <a name="configuration-steps"></a> To configure Build Insights
39-
40-
1. Launch WPA.
36+
### <a name="configuration-steps"></a> To configure WPA
4137

42-
1. Select **Window** > **Select Tables (Experimental)**.
38+
Viewing C++ Build Insights traces in WPA requires a special add-in. Follow these steps to install it:
4339

44-
1. Scroll down to the **Diagnostics** section.
40+
1. Obtain the add-in by downloading one of the components below. You don't need to get both. Choose the one that you find most convenient.
41+
1. [Visual Studio 2019 version 16.6 and above](https://visualstudio.microsoft.com/downloads/), or,
42+
1. [C++ Build Insights NuGet package](https://www.nuget.org/packages/Microsoft.Cpp.BuildInsights/).
4543

46-
1. Select all the MSVC Build Insights views.
44+
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`.
4752

48-
![Windows Performance Analyzer's table selection panel](media/wpa-configuration.png)
53+
1. In your WPA installation directory, open the `perfcore.ini` file and add an entry for `perf_msvcbuildinsights.dll`.
4954

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

5257
To view C++ Build Insights data, first collect it into a trace file by following these steps:
5358

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**.
5561

5662
1. In the command prompt window, enter this command:
5763

@@ -83,13 +89,18 @@ Here's what a typical *vcperf.exe* command sequence looks like in a developer co
8389

8490
- *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.
8591

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+
8696
## Step 3: View your trace in Windows Performance Analyzer
8797

8898
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:
8999

90100
- Build Explorer
91101
- Files
92-
- Function
102+
- Functions
103+
- Template Instantiations
93104

94105
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:
95106

docs/build/arm64-exception-handling.md

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -301,12 +301,7 @@ The unwind codes are encoded according to the table below. All unwind codes are
301301
|`end`| 11100100: end of unwind code. Implies ret in epilog. |
302302
|`end_c`| 11100101: end of unwind code in current chained scope. |
303303
|`save_next`| 11100110: save next non-volatile Int or FP register pair. |
304-
|`arithmetic(add)`| 11100111'000zxxxx: add cookie reg(z) to lr (0=x28, 1=sp); `add lr, lr, reg(z)` |
305-
|`arithmetic(sub)`| 11100111'001zxxxx: sub cookie reg(z) from lr (0=x28, 1=sp); `sub lr, lr, reg(z)` |
306-
|`arithmetic(eor)`| 11100111'010zxxxx: eor lr with cookie reg(z) (0=x28, 1=sp); `eor lr, lr, reg(z)` |
307-
|`arithmetic(rol)`| 11100111'0110xxxx: simulated rol of lr with cookie reg (x28); xip0 = neg x28; `ror lr, xip0` |
308-
|`arithmetic(ror)`| 11100111'100zxxxx: ror lr with cookie reg(z) (0=x28, 1=sp); `ror lr, lr, reg(z)` |
309-
| | 11100111: xxxz----: ---- reserved |
304+
| | 11100111: reserved |
310305
| | 11101xxx: reserved for custom stack cases below only generated for asm routines |
311306
| | 11101000: Custom stack for MSFT_OP_TRAP_FRAME |
312307
| | 11101001: Custom stack for MSFT_OP_MACHINE_FRAME |

docs/code-quality/index.yml

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ metadata:
77
title: C/C++ code analyzers
88
description: Learn how Visual Studio can help you analyze C and C++ code quality.
99
ms.topic: landing-page
10-
ms.date: 02/12/2020
10+
ms.date: 05/26/2020
1111

1212
# linkListType: architecture | concept | deploy | download | get-started | how-to-guide | learn | overview | quickstart | reference | tutorial | video | whats-new
1313

@@ -21,9 +21,29 @@ landingContent:
2121
linkLists:
2222
- linkListType: overview
2323
links:
24-
- text: Analyze C and C++ code
24+
- text: Code analysis for C/C++ overview
2525
url: code-analysis-for-c-cpp-overview.md
26+
- linkListType: quickstart
27+
links:
28+
- text: Code Analysis for C/C++ quick start
29+
url: code-analysis-for-c-cpp-overview.md
30+
- linkListType: tutorial
31+
links:
32+
- text: Analyze C/C++ code for defects walkthrough
33+
url: walkthrough-analyzing-c-cpp-code-for-defects.md
34+
- text: Use SAL annotations to reduce C/C++ code defects
35+
url: using-sal-annotations-to-reduce-c-cpp-code-defects.md
36+
37+
# Card
38+
- title: Code analysis reference
39+
linkLists:
40+
- linkListType: overview
41+
links:
42+
- text: C++ Core Guidelines
43+
url: https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines
2644
- linkListType: reference
2745
links:
46+
- text: C++ Core Guidelines warnings
47+
url: code-analysis-for-cpp-corecheck.md
2848
- text: C++ code analysis warnings
2949
url: code-analysis-for-c-cpp-warnings.md

0 commit comments

Comments
 (0)