VTune Use Notes

Source: Internet
Author: User
1. Introduce

Vtune is an Intel performance analysis tool that can analyze the characteristics of a particular application, detect the characteristics of the entire system, identify the hotspot bottlenecks, and provide developers with a good idea for optimization. 2.Vtune Download, installation

Vtune has a Windows version and a Linux version, with a charge, trial, and free. I am using a trial version, VTune address http://software.intel.com/en-us/articles/intel-vtune-amplifier-xe/, need to register before downloading the account number, get serial numbers, Need to be used when installing.

The install VTune needs to be installed under the root account or in sudo, and after the installation is successful, the user will need to be added to the VTune group to be able to use VTune. Usermod–ag VTune User 3.vtune uses

3.1 Profiling applications

Amplxe-cl-collect hotspots-r test_hot./test

The above command allows you to collect the hotspot data for test application and save it in the Test_hot directory. can also collect locksandwaits, lightweight-hotspots and other types of data, you can use Amplxe-cl–help to view detailed methods, or man amplxe-cl, of course Source/opt/intel/vtune _amplifier_xe_2011/amplxe-vars.sh (This is the file obtained after the successful installation of the VTune), the VTune command can be used directly

It should be noted that in the detection of Java applications, if you need to get JIT information, before running, you need to set the environment variable export amplxe_experimental=1

3.2 Amplxe-runsa and Amplxe-runss

Amplxe-runsa, System mode performance analysis, AMPLXE-RUNSS, user mode performance analysis.

Amplxe-runsa can analyze the hot bottleneck of the whole system, using the example shown below, where test is the collection data directory. Amplxe-runsa–target=host-r./test

AMPLXE-RUNSS analysis is the user mode of the hot bottleneck, using the example below, test for the data directory, app for application. Amplxe-runss-r Test--app

Amplxe-runss can be attach to a process for monitoring and collection. Amplxe-runss–t cpu–r ./test-target-pid=<integer>-interval=<integer>

3.3 Generating statistical data

Generates statistical results using the command line, Amplxe-cl-report hotspots-r test_hot-report-out test_out, where hotspots is the collection data type for collect above, Test_hot for data collection Record Test_out As the result file of the statistic.

Use the VTune-led graphics tool to view the results, for example, under Ubuntu, using Ampx-cl-gui. The data you see under the graphical interface is rich and helpful for analysis, such as the ability to see CPI and other information.

Amplxe-cl,amplxe-runss,amplxe-runsa can attach a process,-target-pid=integer, but out of the show is no JIT information, with the application of the VTune start, will eventually generate a band 4 of the JIT information. Error conditions during use

SPECJBB Lightweight-hotspots

Using result path '/home/xxx/test/specjbb2005/specjbb_hot '

Executing actions% Loading data files

Warning:cannot load data file '/home/xxx/test/specjbb2005/specjbb_hot/d                                                                                  ata.0/ Tbs1381903680.tb6 ' (TBRW call) Tbrw_dobind (Tbrwfile->gethandle (), streamin                                                                                 dex) "Failed:invalid sample file (24)).

Executing actions

Error:error 0x4000001e (Cannot load raw collector data)

The above error is because the number of samples is too large, so there will be errors in generating lightweight-hotspots, in the case of reduced sampling, you can avoid the above mistakes

Solution:

With the parameter-target-duration-type=medium, the resulting data file is larger, Windows VTune GUI opened for a long time did not respond

Set the parameter to-target-duration-type=long, this is the resulting file will be smaller, the VTune GUI Open is no problem.

In fact, there is a parameter-duration xxx, xxx unit for seconds, is to let the VTune detect xxx These seconds, the numerical setting is smaller, can also achieve the above effect, but just monitor the part of the program, the application has not completely run.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.