|
1 | 1 | --- |
2 | 2 | title: "Profile Guided Optimization in the Performance and Diagnostics Hub" |
3 | | -ms.date: "03/14/2018" |
| 3 | +ms.date: "11/19/2018" |
4 | 4 | ms.assetid: dc3a1914-dbb6-4401-bc63-10665a8c8943 |
5 | 5 | --- |
6 | 6 | # Profile Guided Optimization in the Visual Studio 2013 Performance and Diagnostics Hub |
@@ -39,44 +39,44 @@ Next, set the build configuration of your app to Release to ready it for the PGO |
39 | 39 |
|
40 | 40 | Open the Performance and Diagnostics Hub—on the menu bar, choose **Analyze**, **Performance and Diagnostics**. This opens a diagnostics session page that has the analysis tools that are available for your project type. |
41 | 41 |
|
42 | | - |
| 42 | + |
43 | 43 |
|
44 | 44 | In **Available Tools**, select the **Profile Guided Optimization** check box. Choose the **Start** button to start the PGO plug-in. |
45 | 45 |
|
46 | | - |
| 46 | + |
47 | 47 |
|
48 | 48 | The **Profile Guided Optimization** page describes the steps the plug-in uses to improve the performance of your app. Choose the **Start** button. |
49 | 49 |
|
50 | | - |
| 50 | + |
51 | 51 |
|
52 | 52 | In the **Instrumentation** section, you use the **Training is initially enabled** option to choose whether to include the startup phase of your app as part of the training. If this option is not selected, training data is not recorded in a running instrumented app until you explicitly enable training. |
53 | 53 |
|
54 | 54 | Choose the **Instrument** button to build your app with a special set of compiler options. The compiler inserts probe instructions in the generated code. These instructions record profiling data during the training phase. |
55 | 55 |
|
56 | | - |
| 56 | + |
57 | 57 |
|
58 | 58 | When the instrumented build of your app is complete, the app is started automatically. |
59 | 59 |
|
60 | 60 | If any errors or warnings occur during the build, correct them and then choose **Restart Build** to restart the instrumented build. |
61 | 61 |
|
62 | 62 | When your app is started, you can use the **Start Training** and **Pause Training** links in the **Training** section to control when profiling information is recorded. You can use the **Stop Application** and **Start Application** links to stop and restart the app. |
63 | 63 |
|
64 | | - |
| 64 | + |
65 | 65 |
|
66 | 66 | During training, go through your user scenarios to capture the profiling information that the PGO plug-in needs to optimize the code. When you have completed the training, close your app or choose the **Stop Application** link. Choose the **Analyze** button to start the analysis step. |
67 | 67 |
|
68 | 68 | When the analysis is complete, the **Analysis** section shows a report of the profiling information that was captured during the user-scenario training phase. You can use this report to examine which functions your app called the most and spent the most time in. The PGO plug-in uses the information to determine which app functions to optimize for speed and which to optimize for size. The PGO plug-in configures build optimizations to create the smallest, fastest app for the user scenarios that you recorded during training. |
69 | 69 |
|
70 | | - |
| 70 | + |
71 | 71 |
|
72 | 72 | If the training captured the expected profiling information, you can choose **Save Changes** to save the analyzed profile data in your project to optimize future builds. To discard the profile data and start the training over from the beginning, choose **Redo Training**. |
73 | 73 |
|
74 | 74 | The profile data file is saved in your project in a **PGO Training Data** folder. This data is used to control the compiler build optimization settings in your app. |
75 | 75 |
|
76 | | - |
| 76 | + |
77 | 77 |
|
78 | 78 | After analysis, the PGO plug-in sets build options in your project to use the profile data to selectively optimize your app during compilation. You can continue to modify and build your app with the same profile data. When the app is built, the build output reports how many functions and instructions were optimized by using profile data. |
79 | 79 |
|
80 | | - |
| 80 | + |
81 | 81 |
|
82 | 82 | If you make significant code changes during development, you may have to retrain your app to get the best optimizations. We recommend that you retrain your app when the build output reports that less than 80 percent of functions or instructions were optimized by using profile data. |
0 commit comments