You are on page 1of 12


This is to certify that this report

“Intel VTune”

Embodies the original work done by

“Tukuna rout”

In partial fulfillment of their course

requirement at NIIT.
Registration No: R1100A8700000 Signature of
the Co-ordinator
Semester: 3rd (
Batch code-B110000
Date: 09 Dec 2010
Page 2 of 12
I am also grateful to our faculty
Mr. Ashis Ranjan Jena for his keen
guidance and support while
documentation of this document.And
convey my thanks to him for helping
me with his kind co-operation and in
completion of this report.
And at last I would like to say a
special thanks to NIIT who provides us
a wonderful chance to present this
document in front of all.

With regards

Page 3 of 12
Hereby I declare that this ISAS report named as


SAMPLING” is a copy containing the original work

done under the supervision of Mr. Ashis Ranjan Jena.

My work can be confirmed from Mr. Ashis Ranjan

Jena at any time. It has never been presented before

anywhere. Under any circumstance, if any material

found resembling with copy is truly a case of co-


Page 4 of 12
Contents at Glance

 Introduction of Inte VTune

 Sampling

- Introduction

- Sampling mechanism

- Diff.between TBS & EBS

- What happens during Sampling

- Features of Sampling

- Sampling Over Time

Page 5 of 12
“Intel VTune is software from Intel Corporation that is
used by the development companies to analyze their
softwares and applications performance.It also provides
boost performance of applications, on specific OS.” Intel
VTune Performance analyzer is a commercial application for
software performance analysis for Intel-manufactured x86
and x64 based machines, and has both GUI and command
line interfaces. It is available for both Linux and Microsoft
Windows operating systems.

The VTune analyzer provides an integrated

performance analysis and tuning environment that helps
you analyze your code's performance. It can plug in into
Microsoft Visual Studio and Eclipse integrated development

One can work with the VTune analyzer using the

graphical interface and command line interface. All
commands to create and run Activities must be preceded by
Virtual time line at the command line.

The VTune(TM) Performance Analyzer can analyze the
performance of Linux applications.This is installed on a
controlling system and controls the run of your Linux
application on a Remote Agent system. The VTune analyzer
then collects data on your Linux application by collecting
data remotely.


Page 6 of 12
When the VTune(TM) Performance Analyzer analyzes
the performance of Java application or applet (.class), the
Virtual Machine (VM) and Just-in-Time Compiler (JIT) are
enhanced to provide the VTune analyzer with specific
information required to analyze the performance of a Java

During sampling, the VM and JIT provide the VTune analyzer

with information about JIT-compiled Java methods being
loaded into memory, such as their memory addresses, sizes,
and symbol information.

The VTune(TM) Performance Analyzer also enables to
profile .NET and ASP.NET web services running on the
machine.This sets the necessary environment variables and
restarts the web service before collecting sampling or call
graph data. The environment variables will be deleted and
the service is restarted on completing data collection.



Calculates the actual performance of an application over a

period (Time-based sampling) and for various processor
events (Event-based sampling).


Provides a graphical view of the application and helps you

identify critical functions and timing details in the


Page 7 of 12
Provides system level performance, such as resource
consumption, during the execution of an application.


Provides tuning advice from an anzlusis of the

performance data. The tuning
advice helps you improve performance of an application.

Sampling is the process of collecting a set of data for
analysis and representing the analyzed data in a statistical format.
Using the collected data to identify the critical processes, threads,
modules, functions, and lines of code running on system.During
sampling, the VTune(TM) Performance Analyzer monitors all the
software executing on your system including the operating system,
JIT-compiled Java applications, .NET applications, and device drivers.

Sampling does not modify binary files or executables in order to

monitor the performance of application. The VTune analyzer analyzes
the collected samples and helps you to identify:-

1. Hotspots- It is a section of code within a module that takes long

time to execute. This results in high amount of processor time
spent executing that section, thus generating lot of samples for
that module.
2. BottleNecks- It is an area in the code that is slowing down the
execution of application. Bottlenecks appear as hotspots in
hotspot view. Removing bottlenecks and hotspots optimize the

i. TIME-BASED SAMPLING (TBS): The VTune(TM) uses the
operating system timer to interrupt and collect samples of all
active instruction addresses at a regular time interval (1ms. by
default). The collected samples provides the performance data
of all the processes running on the system. Processes that took
the longest time to execute have the highest number of

Page 8 of 12
ii. EVENT-BASED SAMPLING (EBS): Use to identify system-
wide software performance problems caused by processor
events, such as Cache Misses and Mispredicted Branches.From
the EBS data, one can determine which process, thread,
module, function, and source line in program generated the
most processor events, and if any of those events impacted the
performance of program. The VTune analyzer provides
predefined event ratios recommended for use by performance
analysts at Intel.


TBS- Data is collected using OS timer. And OS timer is not
affected during HLT instructions. And the samples are
collected accuratelty. TBS can potentially gives more
accurate data.

EBS– Data is collected using Clocktick events. But when HLT

instructions are executed by processor clock, the processor
clock causes the clockticks events to stop occurring. This
results in no samples being collected while the processor is in
halt state. The VTune will report few samples than you were


When you run an Activity configured with the sampling collector, the
VTune analyzer does the following:

• Waits for the delay sampling time (if specified) to elapse and
then starts collecting samples.
• Interrupts the processor at the specified sampling interval and
collects samples of instruction addresses. For every interrupt,
the VTune analyzer collects one sample.
• Stores the execution context of the software currently executing
on system.

The following are the main features of the sampling:

Page 9 of 12
1. Collection:-
• Multiple event sampling. Perform event based sampling with
multiple events in one run. Depending on the type of processor
using, the VTune analyzer can monitor and collect samples on
two or more events in one run.

• Remote sampling. Collect sampling data for an application

running on a remote system. Your remote system can be a
machine running on any operating system supported by the
VTune analyzer.
• Collect sampling. Data for applications running on systems
enabled with Hyper-Threading Technology.

• Thread view. View the threads running within a process and
select one or more threads to drill down to specific hotspots.
• Summary view. Opens default for clocktick events.
• Process view. Display a system-wide view of all the processes
running on your system when sampling data was collected.
• Module view. Display all the modules within selected threads.

3. Accessories
The following panels and toolbar options are available from the
sampling view:

• Sampling toolbar. A sampling toolbar is available at the

top of each sampling view. This toolbar includes buttons
labeled Process, Thread, Module, Hotspot, and Source.
Select items within a view and click one of the buttons to
drill down.
• Tabbed windows. When you open a specific sampling
view, a tab is created at the bottom of the window
labeled with the name of the view, for example, Process,
Thread, Module or Hotspot. If you open several views, a
tab for each open view is created at the bottom of the
window. You can use the tabs to quickly move from one
view to another.

Page 10 of 12
• Microsoft Excel. Display your sampling data in a Microsoft
Excel 2000 spreadsheet. You can customize the appearance of
the spreadsheet report as needed.
• Selection Summary panel. View/hide a panel displaying the
events configured in an Activity and the number of samples
collected per event for the items you select in a view.
• Legend. Display a detailed legend for all sampling views. Each
Activity result, event, and event ratio is color-coded. The legend
explains what each color represents.
• Event summary panel. Display the total number of events
collected for items you select in a view.
• Multi-processor. Display the workload as distributed across
multiple processors.


1. The Over time view displays the samples collected for single

2. It enables you to identify which threads are running serially and

in parallel at any point of time.

3. Sampling over Time view can be invoked for Thread, Process

and Module views.

4. Sampling over time view consists of two panels. The left panel
displays the names of the selected items and the right panel
displays the samples collected over time. The right panel is
divided into squares, each square representing a unit of time in

5. The color of the squares indicates the number of samples

collected for that unit of time. A red square indicates a large
number of samples, and a green square indicates a small
number of samples.

The Over Time view can be used to gather the following information:

 Context Switching: One can determine if there is excessive

context switching.

Page 11 of 12
 Processor Utilization: Enables you to view whether processor
is idle or not. If sytem process receives samples there is scope
for improving processor utilization at that time.

 Temporal loction of hotspots: We can see the specific periods

of time when a large number of events occur.

 Thread Interaction: You can view the pattern of thread behavior

and thread interaction.

 Viewing the footprint of each thread: You can view the

footprint of each thread on Hyper-Threading technology enabled

Page 12 of 12