S E S PVTune - A Quick Tutorial
|
The Software
|
IntroductionThis tutorial contains three sections:
Sampling ActivityCompile your application so that it includes debug information, usually with the -g option. This will allow display of source code with execution time against each line.Create and run a sampling actitivty [djw@hsl vtune_vtl]$ vtl activity -c
sampling -app /opt/intel/vtune/samples/vtunedemo/vtunedemo -moi
vtunedemo run
View output - we see the application run and messages from VTune. The important arguments to this command are -app <name of application to run> and -moi <name of module in that application we are interested in>. Usually the module is the same as the application but for scripts that run many applications we can use -moi to focus on one in particular. Take a look at the activities we have created [djw@hsl vtune_vtl]$ vtl show
VTune(TM) Performance Analyzer 8.0 for
Linux*
Copyright (C) 2000-2005 Intel Corporation. All rights reserved. a1__Activity1 r1___Sampling Results [hsl] - Tue May 2 15:40:08 2006 Show the clocktick results [djw@hsl vtune_vtl]$ vtl view -ar a1
-hf -mn vtunedemo -en 'Clockticks'
The arguments here are:
So let's look in detail at the offending function [djw@hsl vtune_vtl]$ vtl view -ar a1
-code -mn vtunedemo -fn usesse2 > annotated_src.c
View annotated_src.c - Ev2 is the column we want - the clockticks column. Callgraph ActivityCreate and run a callgraph actitivty[djw@hsl vtune_vtl]$ vtl activity -c callgraph -app
/opt/intel/vtune/samples/vtunedemo/vtunedemo -moi
/opt/intel/vtune/samples/vtunedemo/ vtunedemo run
View output - we see the application run and messages from VTune Take a look at the activities we have created so far [djw@hsl vtune_vtl]$ vtl show
VTune(TM) Performance Analyzer 8.0 for Linux* Copyright (C) 2000-2005 Intel Corporation. All rights reserved. a1__Activity1 r1___Sampling Results [hsl] - Wed May 3 09:15:36 2006 a2__Activity2 r1___Call Graph Results [localhost] - Wed May 3 09:18:56 2006 View call info: parent functions with children, threads and timing info [djw@hsl vtune_vtl]$ vtl view -ar a2
-calls > calls.csv
View output - see the calls in the program? :-( Let's have a look at the most time consuming call sequence (the 'critical path') [djw@hsl vtune_vtl]$ vtl view -ar a2
-critical-path > critical_path.csv
View output - see the critical path? :-( You're right, the information is there but very obscure. You could use grep, awk and sort to get useful columns but we want a GUI! ![]() ![]() General Remarks
The application should be given with its full path after the -app flag and if the
application runs other executables (e.g. it's a shell script) you can
analyse one in particular by using -moi exe_of_interest. For single
executables give its name to the -moi
flag (safer to make this the full path too). |
Man pages |
SESP Homepage SEG Homepage |