Skip to content

Commit 94cc957

Browse files
Merge pull request #5122 from MicrosoftDocs/main638670329827011265sync_temp
For protected branch, push strategy should use PR and merge to target branch method to work around git push error
2 parents cc5d11e + 8148c02 commit 94cc957

21 files changed

+247
-51
lines changed

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

Lines changed: 13 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -14,24 +14,24 @@ The C++ Build Insights tools are available in Visual Studio 2019 and later. To s
1414
::: moniker-end
1515
::: moniker range=">=msvc-160"
1616

17-
C++ Build Insights is a collection of tools that provides increased visibility into the Microsoft Visual C++ (MSVC) tool chain. The tools collect data about your C++ builds, and present it in a format that can help you answer common questions, like:
17+
C++ Build Insights is a collection of tools that collect data about your C++ builds, and present it in a format that can help you answer common questions such as:
1818

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

2323
The main components of this technology are:
2424

25-
- *vcperf.exe*, a command-line utility that you can use to collect traces for your builds,
26-
- a Windows Performance Analyzer (WPA) extension that allows you to view build traces in WPA, and
27-
- the C++ Build Insights SDK, a software development kit for creating your own tools that consume C++ Build Insights data.
25+
- `vcperf.exe`, a command-line utility that you can use to collect traces for your builds
26+
- A Windows Performance Analyzer (WPA) extension that allows you to view build traces in WPA, and
27+
- The C++ Build Insights software development kit for creating your own tools that consume C++ Build Insights data.
2828

2929
## Documentation sections
3030

31-
[Tutorial: vcperf and Windows Performance Analyzer](tutorials/vcperf-and-wpa.md)\
31+
[vcperf and Windows Performance Analyzer](tutorials/vcperf-and-wpa.md)\
3232
Learn how to collect build traces for your C++ projects and how to view them in WPA.
3333

34-
[Tutorial: Windows Performance Basics](tutorials/wpa-basics.md)\
34+
[Windows Performance Basics](tutorials/wpa-basics.md)\
3535
Discover useful WPA tips for analyzing your build traces.
3636

3737
[C++ Build Insights SDK](reference/sdk/overview.md)\
@@ -41,20 +41,13 @@ An overview of the C++ Build Insights SDK.
4141

4242
Read these articles from the official C++ team blog for more information on C++ Build Insights:
4343

44-
[Introducing C++ Build Insights](https://devblogs.microsoft.com/cppblog/introducing-c-build-insights/)
45-
46-
[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/)
47-
48-
[Finding build bottlenecks with C++ Build Insights](https://devblogs.microsoft.com/cppblog/finding-build-bottlenecks-with-cpp-build-insights/)
49-
50-
[Faster builds with PCH suggestions from C++ Build Insights](https://devblogs.microsoft.com/cppblog/faster-builds-with-pch-suggestions-from-c-build-insights/)
51-
52-
[Profiling template metaprograms with C++ Build Insights](https://devblogs.microsoft.com/cppblog/profiling-template-metaprograms-with-cpp-build-insights/)
53-
54-
[Improving code generation time with C++ Build Insights](https://devblogs.microsoft.com/cppblog/improving-code-generation-time-with-cpp-build-insights/)
55-
56-
[Introducing vcperf /timetrace for C++ build time analysis](https://devblogs.microsoft.com/cppblog/introducing-vcperf-timetrace-for-cpp-build-time-analysis/)
57-
44+
[Introducing C++ Build Insights](https://devblogs.microsoft.com/cppblog/introducing-c-build-insights/)\
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+
[Finding build bottlenecks with C++ Build Insights](https://devblogs.microsoft.com/cppblog/finding-build-bottlenecks-with-cpp-build-insights/)\
47+
[Faster builds with PCH suggestions from C++ Build Insights](https://devblogs.microsoft.com/cppblog/faster-builds-with-pch-suggestions-from-c-build-insights/)\
48+
[Profiling template metaprograms with C++ Build Insights](https://devblogs.microsoft.com/cppblog/profiling-template-metaprograms-with-cpp-build-insights/)\
49+
[Improving code generation time with C++ Build Insights](https://devblogs.microsoft.com/cppblog/improving-code-generation-time-with-cpp-build-insights/)\
50+
[Introducing vcperf /timetrace for C++ build time analysis](https://devblogs.microsoft.com/cppblog/introducing-vcperf-timetrace-for-cpp-build-time-analysis/)\
5851
[Faster C++ builds, simplified: a new metric for time](https://devblogs.microsoft.com/cppblog/faster-cpp-builds-simplified-a-new-metric-for-time/)
5952

6053
::: moniker-end

docs/build-insights/toc.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,12 @@ items:
66
- name: "Tutorials"
77
expanded: true
88
items:
9-
- name: "Tutorial: Troubleshoot function inlining on build time"
9+
- name: "Troubleshoot function inlining on build time"
1010
href: ../build-insights/tutorials/build-insights-function-view.md
11-
- name: "Tutorial: Troubleshoot header file impact on build time"
11+
- name: "Troubleshoot header file impact on build time"
1212
href: ../build-insights/tutorials/build-insights-included-files-view.md
13+
- name: "Build Insights tips and tricks"
14+
href: ../build-insights/tutorials/build-insights-tips.md
1315
- name: "vcperf and Windows Performance Analyzer"
1416
href: ../build-insights/tutorials/vcperf-and-wpa.md
1517
- name: "Windows Performance Analyzer basics"

docs/build-insights/tutorials/build-insights-function-view.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
---
2-
title: "Tutorial: Troubleshoot function inlining on build time"
3-
description: "Tutorial on how to use Build Insights function view to troubleshoot the impact of function inlining on build time in your C++ projects."
2+
title: "Troubleshoot function inlining on build time"
3+
description: "Tutorial for how to use Build Insights function view to troubleshoot the impact of function inlining on build time in your C++ projects."
44
ms.date: 5/30/2024
55
helpviewer_keywords: ["C++ Build Insights", "inline function analysis", "build time analysis", "__forceinline analysis", "inlines analysis"]
66
---
7-
# Tutorial: Troubleshoot function inlining on build time
7+
# Troubleshoot function inlining on build time
88

99
Use Build Insights **Functions** view to troubleshoot the impact of function inlining on build time in your C++ projects.
1010

@@ -141,6 +141,7 @@ Double-click, right-click, or press **Enter** while on a file in the **Functions
141141
142142
## See also
143143
144+
[Build Insights tips and tricks](build-insights-tips.md)\
144145
[Inline functions (C++)](../../cpp/inline-functions-cpp.md)\
145146
[Faster C++ builds, simplified: a new metric for time](https://devblogs.microsoft.com/cppblog/faster-cpp-builds-simplified-a-new-metric-for-time)\
146147
[Build Insights in Visual Studio video - Pure Virtual C++ 2023](/events/pure-virtual-cpp-2023/build-insights-in-visual-studio)\

docs/build-insights/tutorials/build-insights-included-files-view.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
---
2-
title: "Tutorial: Troubleshoot header file impact on build time"
2+
title: "Troubleshoot header file impact on build time"
33
description: "Tutorial on how to use Build Insights Includes Files and Includes Tree views to troubleshoot the impact of #include files on build time."
44
ms.date: 5/30/2024
55
helpviewer_keywords: ["C++ Build Insights", "header file build time", "included files view", "include tree view", "#include analysis", "build time analysis"]
66
---
7-
# Tutorial: Troubleshoot header file impact on build time
7+
# Troubleshoot header file impact on build time
88

99
Use Build Insights **Included Files** and **Include Tree** views to troubleshoot the impact of `#include` files on C and C++ build times.
1010

@@ -44,7 +44,7 @@ Before gathering Build Insights data, set the build options for the type of buil
4444

4545
## Run Build Insights
4646

47-
On a project of your choosing, and using the **Debug** build options set in the previous section, run Build Insights by choosing from the main menu **Build** > **Run Build Insights on Selection** > **Rebuild**. You can also right-click a project in the solution explorer and choose **Run Build Insights** > **Rebuild**. Choose **Rebuild** instead of **Build** to measure the build time for the entire project and not for just the few files may be dirty right now.
47+
On a project of your choosing, and using the **Debug** build options set in the previous section, run Build Insights by choosing from the main menu **Build** > **Run Build Insights on \<project name\>** > **Rebuild**. You can also right-click a project in the solution explorer and choose **Run Build Insights** > **Rebuild**. Choose **Rebuild** instead of **Build** to measure the build time for the entire project and not for just the few files may be dirty right now.
4848

4949
:::image type="content" source="./media/build-insights-rebuild-project.png" alt-text="Screenshot of the main menu with Run Build Insights on Selection > Rebuild selected.":::
5050

@@ -180,8 +180,9 @@ Or, you can right-click a file in the **Include Tree** view to jump to it in the
180180

181181
## See also
182182

183+
[Build Insights tips and tricks](build-insights-tips.md)\
183184
[Compare header units, modules, and precompiled headers](../../build/compare-inclusion-methods.md)\
184185
[Build Insights in Visual Studio video - Pure Virtual C++ 2023](/events/pure-virtual-cpp-2023/build-insights-in-visual-studio)\
185186
[Faster C++ builds, simplified: a new metric for time](https://devblogs.microsoft.com/cppblog/faster-cpp-builds-simplified-a-new-metric-for-time)\
186-
[Tutorial: Troubleshoot function inlining on build time](build-insights-function-view.md)\
187-
[Tutorial: vcperf and Windows Performance Analyzer](vcperf-and-wpa.md)
187+
[Troubleshoot function inlining on build time](build-insights-function-view.md)\
188+
[vcperf and Windows Performance Analyzer](vcperf-and-wpa.md)
Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
---
2+
title: "Build Insights tips and tricks"
3+
description: "Learn time-saving tips for using Build Insights."
4+
ms.date: 11/11/2024
5+
author: tylermsft
6+
ms.author: twhitney
7+
ms.topic: article
8+
helpviewer_keywords: ["C++ Build Insights tips and tricks"]
9+
---
10+
# Build Insights tips and tricks
11+
12+
Learn time-saving tips for using Build Insights.
13+
14+
## Run Build Insights on selected files
15+
16+
This feature requires Visual Studio 2022 17.12 or later.
17+
18+
If you're working on a specific file or files, and want to see how they impact your build time, you can run Build Insights on just those files. This feature is useful when you want to focus on a subset of files in your project.
19+
20+
To try it, in **Solution Explorer** select the files in your project you want to profile, right-click, and choose **Run Build Insights on Selected Files**:
21+
22+
:::image type="content" source="./media/build-insights-run-on-selected-files.png" alt-text="A screenshot of files in the Solution Explorer. The context menu is open and the option to Run Build Insights on Selected Files is highlighted.":::
23+
24+
## Filter Build Insights results
25+
26+
This feature requires Visual Studio 2022 17.12 or later.
27+
28+
If you have a large solution with many projects, you can filter the Build Insights results to see files only the projects you're interested in. This feature is useful when you want to focus on a subset of projects in your solution.
29+
30+
To try it, click the filter button on the filter column header and select the projects you want to see results for:
31+
32+
:::image type="complex" source="./media/build-insights-filter-by-project.png" alt-text="A screenshot of the Build Insights window with the Included Files tab open.":::
33+
The filter button is selected and a list of projects appears. Checkboxes next to two projects are checked.":::
34+
:::image-end:::
35+
36+
You can also use file wildcards to filter results. The search is case-insensitive:
37+
38+
:::image type="content" source="./media/build-insights-glob-filter.png" alt-text="A screenshot of the build insights filter dialog. There's a files to include text box and a files to exclude text box.":::
39+
40+
This allows you to exclude files from a specific folder or only include files from a specific folder. For example, if your source is located at `C:\src\`, you could include files only from the renderer directory and its subdirectories by putting `C:/src/dev/renderer/**` into the **files to include** text box.
41+
42+
Here are some other examples:
43+
44+
- All files in the renderer directory: `C:/src/dev/renderer/*`
45+
- All files in the `C:/src/dev/renderer/` directory *and all its subdirectories*: `C:/src/dev/renderer/**`
46+
- All header files in the `C:/src/dev/renderer/` directory *and all its subdirectories*: `C:/src/dev/renderer/**/*.h`
47+
48+
For more examples, see the [online glob pattern tester](https://globster.xyz/).
49+
50+
The filter you enter into either text box persists per solution. Filtering by wildcards isn't supported for CMAKE projects.
51+
52+
## Save Build Insights reports to a designated folder
53+
54+
This feature requires Visual Studio 2022 17.12 or later.
55+
56+
Now you can designate a folder to automatically save Build Insight reports to so you can easily access them.
57+
58+
To set the designated folder, go to **Tools** > **Options** > **C++ Build Insights** > **Trace Collection**. Set a path in the **Store Build Insights reports in this directory** field:
59+
60+
:::image type="complex" source="./media/build-insights-reports-directory.png" alt-text="A screenshot of the options window.":::
61+
tools > Options. Build Insights > Trace Collection is selected in the left pane. Collection Settings appears on the right. The Store Build Insights reports in this directory checkbox is selected, and the text box contains the path c:\users\contoso\workspace as an example.":::
62+
:::image-end:::
63+
64+
Reports are automatically saved to this folder when you run Build Insights. If a path isn't set, the `TEMP` folder is used.
65+
66+
## Get help about the Build Insight window
67+
68+
This feature requires Visual Studio 2022 17.12 or later.
69+
70+
To see a short description for the tabs in the Build Insights window, along with a link to the documentation for a detailed explanation, click the question mark icon in the Build Insights window:
71+
72+
:::image type="content" source="./media/build-insights-view-explanations.png" alt-text="A screenshot of the Build Insights window with the view explanations button (a question mark in a circle) highlighted.":::
73+
74+
## See also
75+
76+
[Build Insights in Visual Studio video - Pure Virtual C++ 2023](/events/pure-virtual-cpp-2023/build-insights-in-visual-studio)\
77+
[Improving code generation time with C++ Build Insights](https://devblogs.microsoft.com/cppblog/improving-code-generation-time-with-cpp-build-insights)\
78+
[Troubleshoot header file impact on build time](build-insights-included-files-view.md)\
79+
[Tutorial: Troubleshoot function inlining on build time](build-insights-function-view.md)
Loading
Loading
Loading
Loading
Loading

0 commit comments

Comments
 (0)