Collecting Detailed Timing Data by Using Instrumentation
This article applies to Visual Studio 2015. If you're looking for the latest Visual Studio documentation, see Visual Studio documentation. We recommend upgrading to the latest version of Visual Studio. Download it here
The Visual Studio Profiling Tools instrumentation method injects profiling code into a copy of a module. The code records each entry, exit, and function call of the functions in the module during a profiling run. The instrumentation method is useful for gathering detailed timing information about a section of your code and for understanding the impact of input and output operations on application performance.
You can specify the instrumentation method by using one of the following procedures:
On the first page of the Profiling Wizard, select Instrumentation.
On the Performance Explorer toolbar, in the Method list, click Instrumentation.
On the General page of the properties dialog box for the performance session, select Instrumentation.
You can specify additional options in the Performance SessionProperty Pages dialog box of the performance session. To open this dialog box:
In Performance Explorer, right-click the performance session name, and then click Properties.
The tasks in the following table describe options that you can specify in the Performance SessionProperty Pages dialog box when you profile by using the instrumentation method.
|On the General page, add .NET memory allocation and lifetime data, and specify naming details for the generated profiling data (.vsp) file.||- Collecting .NET Memory Allocation and Lifetime Data
- How to: Set Performance Data File Name Options
|On the Launch page, if you have multiple .exe projects in your solution.specify the application to start and their start order.||- How to: Specify the Binary to Start|
|On the Binaries page, specify a location for the instrumented copies of the modules. By default, the original binaries are moved to a backup folder.||- How to: Relocate Instrumented Binaries|
|On the Tier Interaction page, add ADO.NET call data to the profiling run.||- Collecting tier interaction data|
- How to: Specify Pre- and Post-Instrument Commands
|On the CPU Counters page, specify one or more processor performance counters to add to the profiling data.||- How to: Collect CPU Counter Data|
|On the Windows Events page, select one or more Event Tracing for Windows (ETW) events to collect with the sampling data.||- How to: Collect Event Tracing for Windows (ETW) Data|
|On the Windows Counters page, specify one or more operating system performance counters to add to the profiling data as marks.||- How to: Collect Windows Counter Data|
|On the Advanced page, specify any additional options that you want to pass to the VSInstr instrumentation program, such as options to include or exclude specific functions.||- How to: Specify Additional Instrumentation Options
- How to: Limit Instrumentation to Specific Functions