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/build-insights-function-view.md
+7-7Lines changed: 7 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -35,18 +35,18 @@ In this article, learn how to use the Build Insights **Functions** view to find
35
35
36
36
To measure the results of `__forceinline`, use a **Release** build because debug builds don't inline `__forceinline` since debug builds use the [`/Ob0`](../../build/reference/ob-inline-function-expansion.md) compiler switch, which disables that optimization. Set the build for **Release** and **x64**:
37
37
38
-
- In the **Solution Configurations** dropdown, choose **Release**.
39
-
- In the **Solution Platforms** dropdown, choose **x64**.
38
+
1. In the **Solution Configurations** dropdown, choose **Release**.
39
+
1. In the **Solution Platforms** dropdown, choose **x64**.
40
40
41
-
:::image type="content" source="./media/build-options-release.png" alt-text="Screenshot showing the Solution Configuration dropdown set to Release, and the Solution Platform dropdown set to x64":::
41
+
:::image type="content" source="./media/build-options-release.png" alt-text="Screenshot of the Solution Configuration dropdown set to Release, and the Solution Platform dropdown set to x64.":::
42
42
43
43
Set the optimization level to maximum optimizations:
44
44
45
-
- In the **Solution Explorer**, right-click the project name and select **Properties**.
46
-
- In the project properties, navigate to **C/C++** > **Optimization**.
47
-
- Set the **Optimization** dropdown to **Maximum Optimization (Favor Speed) ([`/O2`](../../build/reference/ob-inline-function-expansion.md))**.
45
+
1. In the **Solution Explorer**, right-click the project name and select **Properties**.
46
+
1. In the project properties, navigate to **C/C++** > **Optimization**.
47
+
1. Set the **Optimization** dropdown to **Maximum Optimization (Favor Speed) ([`/O2`](../../build/reference/ob-inline-function-expansion.md))**.
48
48
49
-
:::image type="content" source="./media/max-optimization-setting.png" alt-text="Screenshot showing the project property pages dialog. The settings are open to Configuration Properties > C/C++ > Optimization. The Optimization dropdown is set to Maximum Optimization (Favor Speed) (/O2)":::
49
+
:::image type="content" source="./media/max-optimization-setting.png" alt-text="Screenshot of the project property pages dialog. The settings are open to Configuration Properties > C/C++ > Optimization. The Optimization dropdown is set to Maximum Optimization (Favor Speed) (/O2).":::
Copy file name to clipboardExpand all lines: docs/build-insights/tutorials/build-insights-included-files-view.md
+9-9Lines changed: 9 additions & 9 deletions
Original file line number
Diff line number
Diff line change
@@ -38,8 +38,8 @@ Before gathering Build Insights data, set the build options for the type of buil
38
38
- In the **Solution Configurations** dropdown, choose **Debug**.
39
39
- In the **Solution Platforms** dropdown, choose **x64**.
40
40
41
-
:::image type="complex" source="./media/build-options-debug.png" alt-text="Screenshot showing the Solution Configuration dropdowns.":::
42
-
The Solution Configuration dropdown is shown. It has options for Debug, Release, and Configuration manager. The Solution Platform dropdown is set to x64
41
+
:::image type="complex" source="./media/build-options-debug.png" alt-text="Screenshot of the Solution Configuration dropdowns.":::
42
+
The Solution Configuration dropdown is shown. It has options for Debug, Release, and Configuration manager. The Solution Platform dropdown is set to x64.
43
43
:::image-end:::
44
44
45
45
## Run Build Insights
@@ -56,7 +56,7 @@ The trace file shows the build time--which for this example was 16.404 seconds.
56
56
57
57
This view shows the time spent processing `#include` files.
58
58
59
-
:::image type="complex" source="./media/included-files-before-fix.png" alt-text="Screenshot of the included files view":::
59
+
:::image type="complex" source="./media/included-files-before-fix.png" alt-text="Screenshot of the included files view.":::
60
60
In the file path column, several files with a fire icon are highlighted because they take over 10% of the build time to parse. winrtHeaders.h is the biggest one at 8.581 seconds or 52.3% of the 16.404-second build time.
61
61
:::image-end:::
62
62
@@ -72,7 +72,7 @@ To see which file includes `winrtHeaders.h`, click the chevron next to it. The *
72
72
73
73
The **Translation Unit** column shows which file was being processed when the included file was processed. In this example, `winrtHeaders.h` was included while `Grapher.cpp` was compiled:
74
74
75
-
:::image type="complex" source="./media/included-files-translation-unit.png" alt-text="Screenshot of the Included Files view":::
75
+
:::image type="complex" source="./media/included-files-translation-unit.png" alt-text="Screenshot of the Included Files view.":::
76
76
An example ETL file showing the includes files for a sample project. In the file path column, winrtHeaders.h is selected and expanded. It takes 8.219 seconds to build which is 50.1% of the build time. Its child node is Grapher.cpp, which is also listed as the translation unit."
77
77
:::image-end:::
78
78
@@ -86,16 +86,16 @@ In this view, the children nodes are the files included by the parent node. This
86
86
87
87
Select the **Include Tree** tab in the ETL file to see the Include Tree view:
88
88
89
-
:::image type="complex" source="./media/include-tree-view.png" alt-text="Screenshot of the Include Tree view":::
89
+
:::image type="complex" source="./media/include-tree-view.png" alt-text="Screenshot of the Include Tree view.":::
90
90
Shows the include tree for a project. In the file path column, each file that includes other files is listed, along with how many files it includes and the time to parse it.
91
91
:::image-end:::
92
92
93
93
In this view, the **File Path** column shows each file that includes other files. The **Include Count** lists how many files this header file includes. The time to parse this file is listed, and when expanded, lists the time to parse each individual header file that this header file includes.
94
94
95
95
Earlier, we saw that parsing `winrtHeaders.h` is time consuming. In the **Filter Files** text box, if we enter `winrtHeaders.h`, we can filter the view to only the entries that contain `winrtHeaders.h` in the name. Clicking the chevron next to `winrtHeaders.h` shows which files it includes:
96
96
97
-
:::image type="complex" source="./media/include-tree-view-expanded.png" alt-text="Screenshot of the expanded Include Tree view":::
98
-
The file path column lists each file that includes other files, along with how many files it includes and the time it took to parse it. winrtHeaders.h is selected and expanded to show the files it includes. Windows.UI.Xaml.Interop.h is one of those files and is expanded to show `Windows.UI.Xaml.Interop.h` that is expanded to show the header files it includes.
97
+
:::image type="complex" source="./media/include-tree-view-expanded.png" alt-text="Screenshot of the expanded Include Tree view.":::
98
+
The file path column lists each file that includes other files, along with how many files it includes and the time it took to parse it. winrtHeaders.h is selected and expanded to show the files it includes. Windows.UI.Xaml.Interop.h is one of those files and is expanded to show Windows.UI.Xaml.Interop.h that is expanded to show the header files it includes.
99
99
:::image-end:::
100
100
101
101
We see that `winrtHeaders.h` includes `Windows.UI.Xaml.Interop.h`. Remember from the **Included Files** view that this was also time consuming to parse. Click the chevron next to `Windows.UI.Xaml.Interop.h` to see that it includes `Windows.UI.Xaml.h`, which includes 21 other header files, two of which are also on the hot list.
@@ -125,13 +125,13 @@ PCH files must be compiled before they can be used, so we add a file to the proj
125
125
126
126
Then we set our project to use the PCH. That's done in project properties via **C/C++** > **Precompiled Headers** and setting **Precompiled Header** to **Use (/Yu)** and **Precompiled Header File** to **pch.h**.
127
127
128
-
:::image type="complex" source="./media/precompiled-header-settings.png" alt-text="Screenshot of the project properties dialog with the Precompiled Headers settings open":::
128
+
:::image type="complex" source="./media/precompiled-header-settings.png" alt-text="Screenshot of the project properties dialog with the Precompiled Headers settings open.":::
129
129
Precompiled Header is set to: Use (/Yu). The Precompiled Header File is set to pch.h.
130
130
:::image-end:::
131
131
132
132
To use the PCH, we include it as the first line in the source files that use `winrtHeaders.h`. It must come before any other include files. Or, for simplicity, we could modify the project properties to include `pch.h` at the beginning of every file in the solution by setting the project property: **C/C++** > **Advanced** > **Forced Include File** to `pch.h`:
133
133
134
-
:::image type="complex" source="./media/precompiled-header-settings-force-include.png" alt-text="Screenshot of the project properties dialog with the Advanced settings open":::
134
+
:::image type="complex" source="./media/precompiled-header-settings-force-include.png" alt-text="Screenshot of the project properties dialog with the Advanced settings open.":::
0 commit comments