Roslyn's PM (Program Manager) Bill Chiles and Roslyn use managed-only code development, but the performance exceeds the native implementation previously written in C ++. What is the secret? He recently wrote an article titled "Essential Performance Facts and. NET Framework Tips" which recommends a Performance analysis tool "Improving Your App's Performance with PerfView". PerfView can collect Windows event tracking (ETW) data to track the call flow of programs, which identify the frequency of calls by these programs. In addition to configuring program performance data (tools such as Perfmon, PAL, and Xperf cannot be completed easily), PerfView can also analyze the program memory heap to help determine whether memory usage is efficient. It also provides a Diff feature that allows you to determine any difference between traces to help you identify all retrograde events. The tool also has a Dump function to generate a program memory Dump.
Install PerfView
The PerfView package downloaded from Microsoft stores a zip file with only one executable file, which simplifies installation. You can copy this file to multiple servers you want to track and analyze data on these servers or your local workstation. PerfView is supported on Windows Vista, Windows 7, Windows Server 2008, Windows Server 2008 R2, and Windows Server 2012. It must be. net fx 2.0 or later.
Collect configuration data
PerfView uses Windows event tracking, and ETW has been built into the operating system since Windows 2000 Server. Recently, tools like XPerf and PerfView used ETW data to solve performance problems. Event data is collected to an event tracking log (ETL. Based on the number of events you want to track and the length of time, the ETL file may be very large. You can limit the size of this log file. If the space is limited or you do not know when the problem occurs, you can also let them loop. By default, the sampling interval per millisecond generates approximately 10 percent of CPU expenditure during the collection time. It is recommended that around 5000 samples (5 seconds) be used for a representative configuration sample.
There are two ways to start a data collection: run a command to start a program or use a collection command to collect data within the computer. These commands can be triggered by the GUI under the collection drop-down menu, or run the "PerfView run" or "PerfView collect" command from the CLI or script. Displays the process of collecting data when running the command tutorial.exe. tutorial.exe is a built-in training exercise.
View results
Once you collect data for performance issues, you can use PerfView to analyze ETL files. The ETL file appears in the left-side window with the name you provided during log collection or command running. By double-clicking the RTL file, more than 10 independent nodes will appear together with the names that refer to their content. For example, you will see tracking information, programs, events, and CPU stacks in. Double-click each node to open the content in the appropriate viewer.
To analyze computing-intensive performance issues for a specific program, you will need to learn the stacks and functions to call. You can double-click the "CPU stack" node in the left-side window. Then you will be prompted to select the program you are interested in. Finally, the CPU stack viewer will be opened in an independent window, such as QQ process information. You can determine which function is called and their frequency.
If you carefully check the example above, you will find that the first line shows <user32!?>. "!?" PerfView cannot parse the module name. You can double-click the unknown Module name and select "Search symbol" to display the module name. Configuring the symbolic path as described in the User Guide may be necessary for parsing the operating system function name.
PerfView is a user-friendly tool that can be used to collect and analyze ETW data to solve the problem of configuring program performance data. This tool can quickly display the operating system functions executed for this program and understand the potential location of performance problems.