Intel® VTune™ Amplifier 2015 for Systems within Intel® System Studio 2015

Intel® VTune™ Amplifier 2015 for Systems within
Intel® System Studio 2015
Agenda
Overview
Installation Overview

Intel® System Studio 2015

Device Requirements

Intel® VTune™ Amplifier 2015 for Systems

Host Installation

Intel® Energy Profiler

Target Installation

What’s New

Device Drivers

Other Tool Options for Android*
Basic Performance Analysis

Steps to do “Basic Hotspots”
Additional Features
Optimization Notice

Performance Optimization Basics

Other Collection Options

Viewpoints/Grouping/Filtering

How to Collect

Advanced Topics
Copyright © 2015, Intel Corporation. All rights reserved. *Other names and brands may be claimed as the property of others.
2
Overview
Optimization Notice
Copyright © 2015, Intel Corporation. All rights reserved. *Other names and brands may be claimed as the property of others.
3
Intel® VTune™ Amplifier for Systems
Performance Profiler
Get the Tuning Data You Need
− Low overhead “hotspot” analysis with call stacks
− Advanced analysis for cache, branching, …
Find Answers Fast
− Powerful analysis & data mining
− Results mapped to C/C++ or Java source
Easy to Use
− Remote analysis from the User Interface
− Windows or Linux Host analyzes Linux or Android target
Available now as part of Intel® System Studio
Optimize Your Software Performance
Optimization Notice
Copyright © 2015, Intel Corporation. All rights reserved. *Other names and brands may be claimed as the property of others.
4
Intel® Energy Profiler
Energy and Power Profiler for System Software Developers
Optimize Software for Extended
Battery Life
Find the Cause of Wake Ups
That Waste Energy
− Interrupts mapped to the IRQ/device
− Timers mapped to the scheduling process
− Data correlated with Android Wake Locks
Available now for Linux and Android
Part of Intel® System Studio
Requires specific SOCs. On
Android, a rootable OS is required
with version compatible device
drivers. See release notes for
details.
Get Actionable Data to Extend Battery Life
Optimization Notice
Copyright © 2015, Intel Corporation. All rights reserved. *Other names and brands may be claimed as the property of others.
5
Other Intel® Software Developer Tools
for Android*
6
Optimization Notice
Copyright © 2015, Intel Corporation. All rights reserved. *Other names and brands may be claimed as the property of others.
6
Basic Performance Analysis
Using Intel® VTune™ Amplifier 2015 for Systems
on Android Systems
Optimization Notice
Copyright © 2015, Intel Corporation. All rights reserved. *Other names and brands may be claimed as the property of others.
7
Basic Hotspots
Start Here - Makes It Easy
#1 used feature
Easiest feature to use
Enables the most important feature of
identifying the hotspot
Works on non-rooted (and rooted)
Intel® architecture devices1
Collects samples using OS-timer event for
a specific application/process
Associate samples to:
Module/thread/function
C/C++ source or assembly
JITted Java/Dalvik
functions/assembly/dex/source
Collects User Mode Stacks (default)
amplxe-cl --collect hotspots --target-process=<myApp>
--target-system=android
Optimization Notice
Copyright © 2015, Intel Corporation. All rights reserved. *Other names and brands may be claimed as the property of others.
8
Basic Hotspots
Step 1) Attach device to host System
Host System
Android* Device
Windows* or Linux*
Intel® architecture based
adb
• ADB connectivity installed on host system
• “Enable USB Debugging” (Under Developer Options on Target Device)
Optimization Notice
Copyright © 2015, Intel Corporation. All rights reserved. *Other names and brands may be claimed as the property of others.
9
Basic Hotspots
Step 2) Create Project in Intel® VTune™ Amplifier
Create Project in VTune Amplifier
set target type: “Android Device (ADB)”
set target system: Your device
set target type: Launch Android
Package
set Package or Process Name
Optionally set other options
Optimization Notice
Copyright © 2015, Intel Corporation. All rights reserved. *Other names and brands may be claimed as the property of others.
10
Basic Hotspots
Step 3) Start Hotspot Analysis
Click “Launch New Analysis” via play button
Then select “Basic Hotspots” under “Analysis Type”
Then click “Start”
Optimization Notice
Copyright © 2015, Intel Corporation. All rights reserved. *Other names and brands may be claimed as the property of others.
11
Basic Hotspots
Step 4) Run benchmark & stop VTune Amplifier collection
Now interact with your app…
make it run whatever it is you
want to tune.
Tell VTune Amplifier to Stop
VTune Amplifier will then copy
the data files back to the host
system for post analysis
Optimization Notice
Copyright © 2015, Intel Corporation. All rights reserved. *Other names and brands may be claimed as the property of others.
12
Basic Hotspots
Step 5) Identify hottest functions
Optimization Notice
Copyright © 2015, Intel Corporation. All rights reserved. *Other names and brands may be claimed as the property of others.
13
Basic Hotspots
Optional Step 5) Enable C/C++ Source View
amplxe-cl [options]
–search-dirs=Path-to-Symbols -on-host
Binaries with symbols traditionally are located in:
[AndroidAppBuildDir]/out/target/product/[your target]/obj
[AndroidOSBuildDir]/out/target/product/[your target]/symbols, or
[AndroidOSBuildDir]/out/target/product/[your target]/obj
[AndroidOSBuildDir]/out/target/product/[your target]/linux/kernel
Optimization Notice
Copyright © 2015, Intel Corporation. All rights reserved. *Other names and brands may be claimed as the property of others.
14
Basic Hotspots
Summary
Basic Hotspots is
• Easy
• Works on all Intel architecture-based Android* devices
• Extremely useful for diagnosing performance issues
Simple set of steps presented
Optimization Notice
Copyright © 2015, Intel Corporation. All rights reserved. *Other names and brands may be claimed as the property of others.
15
Additional Features of
Intel® VTune™ Amplifier
Using Intel® VTune™ Amplifier 2015 for Systems
Optimization Notice
Copyright © 2015, Intel Corporation. All rights reserved. *Other names and brands may be claimed as the property of others.
16
Performance Analysis Steps (condensed)
1.
Determine desired performance
2.
Build Application/System for optimization not debug (w symbols avail)
1.
2.
System = Userdebug Build (rootable)
Application = Compile C/C++ binaries w optimizations (debuggable attribute disables this)
3.
Find hotspots (Where the application/system is spending time)
4.
[Optional] Determine the efficiency of the hotspots

5.
[Optional] Find changes to hotspots between builds
6.
Make 1 code change to 1 hotspot to improve performance




Optimization Notice
Determine architectural issues of the hotspots
Remove hotspot
Improve algorithm
Change code to better utilize hardware
Get new hardware
7.
Validate that change improved performance
8.
Go to step 3 – until desired performance achieved
Copyright © 2015, Intel Corporation. All rights reserved. *Other names and brands may be claimed as the property of others.
17
Advanced Hotspots
To get more information
Identifies the hotspot using hardware
counters (PMU) of Intel® processors
Allows system-wide collection
Allowing you to see all processes
running on system
For single application can collect:
User-Stacks + Kernel-Stacks Context
Switches
Call Counts
Associate samples to:
Process/Module/function
Core/thread
C/C++ source or assembly
JITted Java/Dalvik
functions/assembly/dex/source
Optimization Notice
System Wide:
amplxe-cl --collect advanced-hotspots --duration=<N>
--target-system=android
Stacks, Context & Counts:
amplxe-cl –collect advanced-hotspots
-knob collection-detail=stack-and-callcount
–-target-process=<appName> --target-system=android
Copyright © 2015, Intel Corporation. All rights reserved. *Other names and brands may be claimed as the property of others.
18
General Exploration
To Diagnose Microarchitecture Bottlenecks
Uses hardware counters (PMU) to identify microarchitectural issues in your
system/application
Makes it easy to select appropriate counters for each Intel® microarchitecture to
find issues in…




Memory (Cache, TLB, Reissues, Bus-Locks)
Branch mis-prediction
Machine Clears, Floating Point Stalls
Efficiency (CPI, uOp(s)-Retired)
Applies Formulas/Heuristics developed by Intel engineers to highlights issues
Pin
Easy to Interpret – If it is kPink – Examine in more detail
amplxe-cl --collect advanced-hotspots --duration=<N>
--target-system=android
amplxe-cl --collect [atom-general-exploration | snb-general-exploration]
--target-system=android
Optimization Notice
Copyright © 2015, Intel Corporation. All rights reserved. *Other names and brands may be claimed as the property of others.
19
Viewpoints
Enable looking at the data the way you need it
It is a pre-defined view that determines what needs to be displayed
in the grid and timeline for a given analysis type
An analysis type may support more than one view points
Optimization Notice
Copyright © 2015, Intel Corporation. All rights reserved. *Other names and brands may be claimed as the property of others.
20
Intel® VTune™ Amplifier for Systems
Key Concepts
Groupings
 Each analysis type has many viewpoints
 Each viewpoint has pre-defined groupings
 Allows you to analyze the data in different hierarchies and granularities
Click
Optimization Notice
Copyright © 2015, Intel Corporation. All rights reserved. *Other names and brands may be claimed as the property of others.
21
Groupings
For example, pre-defined groupings can be used to determine load
imbalance
Change to
Function/Thread
Optimization Notice
Copyright © 2015, Intel Corporation. All rights reserved. *Other names and brands may be claimed as the property of others.
22
Filtering
Only view data related to your issue
Filtering (Time or Group) - Lets you focus on what’s
important
Optimization Notice
Copyright © 2015, Intel Corporation. All rights reserved. *Other names and brands may be claimed as the property of others.
23
Caller/Callee View
GUI Layout
Select a function in the
Bottom-Up and find
the caller/callee
List of functions sorted
by CPU Time
List of callers and
their stacks
List of callees
and their stacks
Optimization Notice
Copyright © 2015, Intel Corporation. All rights reserved. *Other names and brands may be claimed as the property of others.
24
Adding User Marks to the Timeline
GUI Controls
Resume data collection
when needed
Start application
without data collection
Observe paused region
on the Time Line
Click “Mark Timeline”
during collection
Observe the mark on
the Time Line
Optimization Notice
Copyright © 2015, Intel Corporation. All rights reserved. *Other names and brands may be claimed as the property of others.
25
Repeat: Overview of Remote/Attached Collection
Procedure/Architecture for Android*
Host
GUI Collector Control
Target device
VTune
GUI
amplxe-cl
control
collection
adb
adb
transfer
data/modules
VTune
result
Data is opened in GUI and
symbols are resolved
using modules stored in
result dir
User can specify search
dir with separate debug
files if needed
amplxe-runss
VTune collector
binary runs on
target and
stores result
on target
VTune
result
driver
Transfers data collected
remotely back to host
automatically together with
stripped application modules
for symbol resolution
Some collection
types require
signed drivers
accessed from
rooted device
Uses “adb” protocol/binary for collection & data transfer (must be in path)
Flexible collection configuration + control (pause/resume/stop)
Optimization Notice
Copyright © 2015, Intel Corporation. All rights reserved. *Other names and brands may be claimed as the property of others.
26
How to Collect
Via the command line

amplxe-cl --collect hotspots --target-process=<appName>
[Other Options] --target-system=android

amplxe-cl --collect advanced-hotspots
[Other Options] --target-system=android

amplxe-cl --collect [atom-general-exploration | snb-general-exploration]
[Other Options] --target-system=android
Via the GUI
1) Attach device to host – via adb
2) Create Project in VTune
and set target system
3) Click “Launch New Analysis”
then Select Analysis Type
then click “Start”
4) Wait till collection finishes or click Pause,
Resume, or Stop Collection.
Click “Command Line….” – dialog will display
the Command Line for that analysis type
Optimization Notice
Copyright © 2015, Intel Corporation. All rights reserved. *Other names and brands may be claimed as the property of others.
27
Advanced Topics
Intel® VTune™ Amplifier for Systems
Optimization Notice
Copyright © 2015, Intel Corporation. All rights reserved. *Other names and brands may be claimed as the property of others.
28
Custom Analysis Types
allows many advanced options for collection
Choose Specific Processor Events
Change Sampling Rates
Collect Samples for Entire System, Single Application,
Kernel Space Only, User Space Only
Many, Many More Options….
Note: Very flexible option set – (with defaults presented earlier) lets user collect as much or as little
potential information in a single run, with the caveat that the more you collect the higher the overhead
– which will impact the performance of what you are measuring
More details in
Intel® VTune™ Amplifier Help: User's Guide
Optimization Notice
Copyright © 2015, Intel Corporation. All rights reserved. *Other names and brands may be claimed as the property of others.
29
Compare Results Quickly - Sort By Difference
Quickly identify cause of regressions.
 Run a command line analysis daily
 Identify the function responsible so you know who to alert
Compare 2 optimizations – What improved?
Compare 2 systems – What didn’t speed up as much?
Optimization Notice
Copyright © 2015, Intel Corporation. All rights reserved. *Other names and brands may be claimed as the property of others.
30
Intel® VTune™ Amplifier for Systems
User APIs
Enable you to
• control collection
• set marks during the execution of the specific code
• specify custom synchronization primitives implemented
without standard system APIs
To use the user APIs, do the following:
• Include ittnotify.h, located at <install_dir>/include
• Insert __itt_* notifications in your code
• Link to the libittnotify.lib file located at <install_dir>/lib
• New feature allows creating a csv file instead of using
user API’s… see Help : Creating a CSV File with
External Data
Optimization Notice
Copyright © 2015, Intel Corporation. All rights reserved. *Other names and brands may be claimed as the property of others.
31
Intel® VTune™ Amplifier
User APIs
Collection Control APIs
void __itt_pause (void)
Run the application without collecting data. VTune™
Amplifier reduces the overhead of collection, by collecting
only critical information, such as thread and process
creation.
void __itt_resume (void)
Resume data collection. VTune™ Amplifier resumes
collecting all data.
Thread naming APIs
Optimization Notice
void __itt_thread_set_name (const
__itt_char *name)
Set thread name using char or Unicode string, where
name is the thread name.
void __itt_thread_ignore (void)
Indicate that this thread should be ignored from
analysis. It will not affect the concurrency of the
application. It will not be visible in the Timeline pane.
Copyright © 2015, Intel Corporation. All rights reserved. *Other names and brands may be claimed as the property of others.
32
Intel® VTune™ Amplifier
Collection Control APIs
int main(int argc, char* argv[])
{
doSomeInitializationWork();
__itt_resume();
while(gRunning) {
doSomeDataParallelWork();
}
__itt_pause();
doSomeFinalizationWork();
return 0;
}
Optimization Notice
Copyright © 2015, Intel Corporation. All rights reserved. *Other names and brands may be claimed as the property of others.
33
Intel® VTune™ Amplifier
User Event APIs
• Useful to observe when certain events occur in your
application or identify how long certain regions of code
take to execute
• Event APIs enables you to annotate an application when
certain events occur
__itt_event __itt_event_create(char *, int);
__itt_event_start(__itt_event);
__itt_event_end(__itt_event);
Optimization Notice
Copyright © 2015, Intel Corporation. All rights reserved. *Other names and brands may be claimed as the property of others.
34
Intel® VTune™ Amplifier
User Event APIs
Optimization Notice
__itt_event __itt_event_create(const
__itt_char *name, int namelen );
Create a user event type with the specified name. This API
returns a handle to the user event type that should be
passed into the following APIs as a parameter. The
namelen parameter refers to the number of characters,
not the number of bytes.
int __itt_event_start( __itt_event event );
Call this API with an already created user event handle to
register an instance of that event. This event appears in
the Timeline pane display as a tick mark.
int __itt_event_end( __itt_event event );
Call this API following a call to __itt_event_start() to show
the user event as a tick mark with a a duration line from
start to end. If this API is not called, the user event
appears in the Timeline pane as a single tick mark.
Copyright © 2015, Intel Corporation. All rights reserved. *Other names and brands may be claimed as the property of others.
35
Intel® VTune™ Amplifier
User Events - using APIs
DWORD WINAPI aiWork(LPVOID lpArg)
{
int tid = *((int*)lpArg);
__itt_event aiEvent;
aiEvent = __itt_event_create("AI Thread Work",14);
while(gRunning) {
WaitForSingleObject(bSignal[tid], INFINITE);
__itt_event_start(aiEvent);
doSomeDataParallelWork();
__itt_event_end(aiEvent);
SetEvent(eSignal[tid]);
}
return 0;
}
Optimization Notice
Copyright © 2015, Intel Corporation. All rights reserved. *Other names and brands may be claimed as the property of others.
36
Intel® VTune™ Amplifier
Visualizing Events in the Timeline View
User defined
task
Optimization Notice
Copyright © 2015, Intel Corporation. All rights reserved. *Other names and brands may be claimed as the property of others.
37
Intel® VTune™ Amplifier
Frame Analysis
Frame Analysis –
Analyze Long Latency Activity
Frame: a region executed repeatedly (non-overlapping).
•
API marks start and finish
Examples:
Optimization Notice
•
Game – Compute next graphics frame
•
Simulator – Time step loop
•
Computation – Convergence loop
Application
voidalgorithm_1();
voidalgorithm_2(int myid);
doubleGetSeconds();
DWORD WINAPI do_xform (void * lpmyid);
bool checkResults();
__itt_domain* pD = __itt_domain_create (“myDomain”);
Region (Frame)
while( gRunning ) {
__itt_frame_begin_v3(pD, NULL);
...
//Do Work
...
__itt_frame_end_v3(pD, NULL);
}
for (int k = 0; k < N; ++k) {
int ik = i*N + k;
int kj = k*N + j;
c2[ij] += a[ik]*b[kj];
}
Copyright © 2015, Intel Corporation. All rights reserved. *Other names and brands may be claimed as the property of others.
38
Intel® VTune™ Amplifier
Frame APIs
Optimization Notice
__itt_domain* __itt_domain_create(
const __itt_char *name );
Create a domain with a domain name.
void __itt_frame_begin_v3(const
__itt_domain *domain, __itt_id *id);
Define the beginning of the frame instance.
void __itt_frame_end_v3(const
__itt_domain *domain, __itt_id *id);
Define the end of the frame instance.
Since the domain is expected to be static over the application's
execution time, there is no mechanism to destroy a domain. Any
domain can be accessed by any thread in the process, regardless of
which thread created the domain. This call is thread-safe.
A __itt_frame_begin_v3 call must be paired with a
__itt_frame_end_v3 call.
Successive calls to __itt_frame_begin_v3 with the same ID are
ignored until a call to __itt_frame_end_v3 with the same ID.
•domain is the domain for this frame instance.
•id is the instance ID for this frame instance, or NULL.
A __itt_frame_end_v3 call must be paired with a
__itt_frame_begin_v3 call. The first call to __itt_frame_end_v3 with a
given ID ends the frame. Successive calls with the same ID are
ignored, as are calls that do not have a matching
__itt_frame_begin_v3 call.
•domain - The domain for this frame instance
•id - The instance ID for this frame instance, or NULL for the current
instance.
Copyright © 2015, Intel Corporation. All rights reserved. *Other names and brands may be claimed as the property of others.
39
Frame Analysis
Using APIs
__itt_domain* pD = __itt_domain_create ("SimDomain");
while(gRunning) {
__itt_frame_begin_v3(pD, NULL);
start = clock();
//Wait all threads before moving into the next frame
WaitForMultipleObjects(FUNCTIONAL_DOMAINS, eSignal, TRUE,
INFINITE);
stop = clock();
//Give all threads the "go" signal
for (int i = 0; i < FUNCTIONAL_DOMAINS; i++)
SetEvent(bSignal[i]);
if (frame % NETWORKCONNETION_FREQ == 0) {
//Start network thread
SetEvent(bNetSignal);
}
__itt_frame_end_v3(pD, NULL);
}
Optimization Notice
Copyright © 2015, Intel Corporation. All rights reserved. *Other names and brands may be claimed as the property of others.
40
Summary View / Frame Rate Chart
Adjust the frame rate then Apply changes
Optimization Notice
Copyright © 2015, Intel Corporation. All rights reserved. *Other names and brands may be claimed as the property of others.
Frame Analysis
Find Slow Frames With One Click
(1) Regroup Data
… (Partial list shown)
Optimization Notice
Before: List of Functions Taking Time
After: List of Slow Frames
Copyright © 2015, Intel Corporation. All rights reserved. *Other names and brands may be claimed as the property of others.
42
Just 2 more clicks shows where to focus tuning…
Slow functions in slow frames
(1) Only show slow frames
Result:
Functions taking a lot of time in slow frames
(2) Regroup:Show functions
Optimization Notice
Copyright © 2015, Intel Corporation. All rights reserved. *Other names and brands may be claimed as the property of others.
43
Intel® VTune™ Amplifier
Task APIs
• A task is a logical unit of work performed by a
particular thread
• Tasks can be nested
• You can use task APIs to assign tasks to threads
• One thread executes one task at a given time
• Tasks may correspond to functions, scopes, or a case
block in a switch statement
Optimization Notice
Copyright © 2015, Intel Corporation. All rights reserved. *Other names and brands may be claimed as the property of others.
44
Task API primitives
Optimization Notice
Use This Primitive
To Do This
void ITTAPI__itt_task_begin ( const
__itt_domain *domain, __itt_id taskid, __itt_id
parentid, __itt_string_handle *name)
Create a task instance on a thread. This
becomes the current task instance for that
thread. A call to __itt_task_end() on the same
thread ends the current task instance.
void ITTAPI__itt_task_begin_fn ( const
__itt_domain *domain, __itt_id taskid, __itt_id
parentid, void *fn)
Begin a task instance on a thread.
void ITTAPI__itt_task_end ( const
__itt_domain *domain)
End a task instance on a thread.
Parameter
Description
__itt_domain
The domain of the task.
__itt_id taskid
This is a reserved parameter.
__itt_id parentid
This is a reserved parameter.
__itt_string_handle
The task string handle.
*fn
This is a reserved parameter.
Copyright © 2015, Intel Corporation. All rights reserved. *Other names and brands may be claimed as the property of others.
45
Task API usage
__itt_domain* domain = __itt_domain_create(L"Task Domain");
__itt_string_handle* UserTask = __itt_string_handle_create(L"UserTask");
__itt_string_handle* UserSubTask = __itt_string_handle_create(L“UserSubTask");
int main(int argc, char* argv[])
{
...
__itt_task_begin (domain, __itt_null, __itt_null, UserTask);
//create many threads to call work()
__itt_task_end (domain);
...
}
work()
{
__itt_task_begin (domain, __itt_null, __itt_null, UserSubTask);
do_foo();
__itt_task_end (domain);
return 0;
}
Optimization Notice
Copyright © 2015, Intel Corporation. All rights reserved. *Other names and brands may be claimed as the property of others.
46
Using Task API
Hotspots analysis – Bottom-up pane
Optimization Notice
Copyright © 2015, Intel Corporation. All rights reserved. *Other names and brands may be claimed as the property of others.
47
Using Task API
Hotspots analysis – Tasks pane
Optimization Notice
Copyright © 2015, Intel Corporation. All rights reserved. *Other names and brands may be claimed as the property of others.
48
Installation Overview
Optimization Notice
Copyright © 2015, Intel Corporation. All rights reserved. *Other names and brands may be claimed as the property of others.
49
Installing Intel® System Studio
to the Host System
Linux*
Windows*
1)
1)
./online_install.sh
w_cembd_2015.0.xxx_online.exe
…or…
…or…
2) tar l_cembd_p_2015.0.xxx.tgz
2) w_cembd_2015.0.xxx.exe
l_cembd_p_2015.0.xxx.tg/install.sh
Default Install Location
/opt/intel/
system_studio_2015.0.xxx/
vtune_amplifier_for_systems
C:\Program Files (x86)\Intel\
System Studio 2015.0.xxx\
vtune_amplifier_for_systems
Location of Target Files
<path-to-SystemStudio>/target/
system_studio_target.tgz
Optimization Notice
<path-to-SystemStudio>\target\
system_studio_target.tgz
Copyright © 2015, Intel Corporation. All rights reserved. *Other names and brands may be claimed as the property of others.
50
Performance Collection Requirements
for VTune Amplifier 2015 for Systems:
Basic Hotspots including user mode stacks to C/C++ Source
− All available Android devices based on Intel® Architecture such as those at http://software.intel.com/enus/android/get-device.
− Note: Install to target device is not needed1
Java Functions with Java Source, JIT assembly or DEX Drill Down
− Rootable device
− Instrumented Java/Dalvik JVM (Available in most Intel® Atom processor builds)
Hardware-Event Based Sampling (Advanced Hotspots, General Exploration, System [Wide] Profiling, Kernel
Stacks, and Custom Analysis Types)
− Rootable device
− Version compatible signed performance analysis drivers available
 pax.ko, sep3_10.ko, and vtssp.ko
Optimization Notice
Copyright © 2015, Intel Corporation. All rights reserved. *Other names and brands may be claimed as the property of others.
51
Requirements for Intel® Energy Profiler
− Rootable device
− Version compatible signed Intel® Energy Profiler driver available:
 SOCWATCH1_3.ko for 22nm Intel Atom processor (codenamed silvermont) or 4th
Generation Intel Core processor (codenamed haswell)
 apwr3_1.ko for 32nm High-K next generation Intel Atom processor (codenamed
medfield, lexington, or clovertrail plus)
Optimization Notice
Copyright © 2015, Intel Corporation. All rights reserved. *Other names and brands may be claimed as the property of others.
52
Drivers Needed for VTune Amplifier 2015 for
Systems
Drivers needed:
 SOCWATCH1_3.ko or apwr3_1.ko
 vtsspp.ko
 pax.ko
 sep3_10.ko*
For Intel® reference builds, drivers are located in either:
/lib/modules or /system/lib/modules
Verify if the drivers are on your system via:
adb shell ls /lib/modules /system/lib/modules
Optimization Notice
Copyright © 2015, Intel Corporation. All rights reserved. *Other names and brands may be claimed as the property of others.
53
Building Device Drivers
Best option is to get the drivers integrated into the build
 Reference builds from Intel® Corporation already have them
integrated –sometimes the latest version of driver needs to be
updated…
 Some OEM builds have the driver
 Note: This is “much, much” easier….
Else you need to build the drivers
 The install package contains the sources and scripts needed to build
the drivers If you need to build the drivers against the existing kernel
 You need to have:
– The public/private key for that kernel
– The exact source for the kernel used to build that kernel
 If you do not have the above then you will need to build a new kernel
on your host system, install it on the device, and use the newly
generated key to build and sign the drivers.
 Instructions in Help/User’s Guides
Optimization Notice
Copyright © 2015, Intel Corporation. All rights reserved. *Other names and brands may be claimed as the property of others.
54
(Re)Installing VTune™ Amplifier
Remote Collector to Target
This step is only needed to support Java.
Linux*
Windows*
“unzip” <path-toSystemStudio>\target\
system_studio_target.tgz1
$adb root
$adb root
$vtune_amplifier_2015_for_systems $system_studio_target\vtune_amplif
/vtune_amplifier_2015_for_systems/ ier_2015_for_systems/bin32/amplxe
bin[64|32]/amplxe-androidreg.sh -- -androidreg.bat --packagepackage-command=install -command=install -]
jitvtuneinfo=[src|none|jit|dex
jitvtuneinfo=[src|none|jit|dex]
See Help -> Intel® VTune™ Amplifier User's Guide -> Running Analysis
Remotely -> Preparing a Target Android* System for Remote Analysis
Optimization Notice
Copyright © 2015, Intel Corporation. All rights reserved. *Other names and brands may be claimed as the property of others.
55
Install Intel® Energy Profiler
to Remote Target
Linux*
Windows*
$tar –zxvf <path-toSystemStudio>/target/
system_studio_target.tgz
“unzip” <path-toSystemStudio>\target\
system_studio_target.tgz
$adb root1
$adb root1
High-K next generation Intel® Atom™ processor (codenamed Medfield,
Lexington, or Clovertrail Plus)
$system_studio_target/
wuwatch_android/
wuwatch_android_install
<- Use Unix bash interpreter on
Windows* (such as CygWin*) and run
Linux* install script
22nm Intel® Atom™ processor (codenamed Silvermont) or
4th generation Intel® Core Processors (codenamed Haswell)
$system_studio_target/
socwatch_android_v1.3/
socwatch_android_install.sh
$system_studio_target/
socwatch_android_v1.3/
socwatch_android_install.bat
See SoCWatchForAndroid_v1_3_0.pdf or WakeUpWatch_v3_1_6.pdf for full details
Optimization Notice
Copyright © 2015, Intel Corporation. All rights reserved. *Other names and brands may be claimed as the property of others.
56
Steps to start SoCWatch/WuWatch
WuWatch
$adb shell
#cd /data/wuwatch
#insmod /lib/modules/apwr3_1.ko
SoCWatch
$adb shell
#cd /data/socwatch
#. ./setup_socwatch_env.sh
#insmod /lib/modules/SOCWATCH1_3.ko
Optimization Notice
Copyright © 2015, Intel Corporation. All rights reserved. *Other names and brands may be claimed as the property of others.
57
Summary
Capabilities of VTune Amplifier 2015 for Systems on Android*

To Identify Performance Issues
 Hotspot, Advanced-Hotspots, General Exploration
 Other Advanced Options(Custom Collections, Regressions, Frames)

To Identify Power Issues
 CPU Wake-ups, Frequency, Device States, Wakelocks

To Zoom In on your Issue via the GUI
 Grouping, Filtering, Sorting, Comparing
Workflow for
Optimization Notice

Performance and Power Analysis Steps

Installation
 Including System Requirements

Collecting

Viewing Data
Copyright © 2015, Intel Corporation. All rights reserved. *Other names and brands may be claimed as the property of others.
58
Call to Action
Intel® System Studio 2015 provides deep system-level insights into
power, reliability and performance to help accelerate time to
market of Intel Architecture-based embedded and mobile
systems
For more information, to evaluate, or purchase:
http://intel.ly/system-studio
For other versions contact:
Your Intel representative or …
[email protected]
Note: Most features presented here require access to a rootable
Android* device, and version compatible device drivers.
Optimization Notice
Copyright © 2015, Intel Corporation. All rights reserved. *Other names and brands may be claimed as the property of others.
59
Additional Resources
http://intel.ly/system-studio
http://software.intel.com/en-us/intel-vtune-amplifier-for-systems
http://software.intel.com/en-us/intel-energy-profiler
Premier Support: https://premier.intel.com
Forums: http://software.intel.com/en-us/forum/intel-system-studio/
Email: [email protected]
Release Notes:
http://software.intel.com/sites/default/files/release_notes_amplifier_for_android_linux.pdf
VTune Amplifier Help Documentation:
http://software.intel.com/en-us/vtuneampxe_2013_ug_lin
SubTopic-> Intel VTune Amplifier User’s Guide : Running Analysis Remotely
http://software.intel.com/sites/default/files/managed/c8/f9/SoCWatchForAndroid_v1_3_0.pdf
http://software.intel.com/sites/default/files/managed/9d/59/WakeUpWatch_v3_1_6.pdf
KB Articles: http://software.intel.com/en-us/articles/intel-system-studio-articles
http://software.intel.com/en-us/articles/android-features-in-intel-vtune-amplifier-2015-for-systemsrequirements
http://software.intel.com/en-us/articles/using-intel-vtune-amplifier-on-non-rooted-android-devices
http://software.intel.com/en-us/articles/how-to-use-the-intel-energy-profiler-in-intel-system-studio-2015
60
Optimization Notice
Copyright © 2015, Intel Corporation. All rights reserved. *Other names and brands may be claimed as the property of others.
60
Legal Disclaimer & Optimization
Notice
INFORMATION IN THIS DOCUMENT IS PROVIDED “AS IS”. NO LICENSE, EXPRESS OR IMPLIED, BY ESTOPPEL OR
OTHERWISE, TO ANY INTELLECTUAL PROPERTY RIGHTS IS GRANTED BY THIS DOCUMENT. INTEL ASSUMES NO
LIABILITY WHATSOEVER AND INTEL DISCLAIMS ANY EXPRESS OR IMPLIED WARRANTY, RELATING TO THIS
INFORMATION INCLUDING LIABILITY OR WARRANTIES RELATING TO FITNESS FOR A PARTICULAR PURPOSE,
MERCHANTABILITY, OR INFRINGEMENT OF ANY PATENT, COPYRIGHT OR OTHER INTELLECTUAL PROPERTY RIGHT.
Software and workloads used in performance tests may have been optimized for performance only on Intel
microprocessors. Performance tests, such as SYSmark and MobileMark, are measured using specific computer
systems, components, software, operations and functions. Any change to any of those factors may cause the results to
vary. You should consult other information and performance tests to assist you in fully evaluating your contemplated
purchases, including the performance of that product when combined with other products.
Copyright © 2015, Intel Corporation. All rights reserved. Intel, Pentium, Xeon, Xeon Phi, Core, VTune, Cilk, and the Intel
logo are trademarks of Intel Corporation in the U.S. and other countries.
Optimization Notice
Intel’s compilers may or may not optimize to the same degree for non-Intel microprocessors for optimizations that
are not unique to Intel microprocessors. These optimizations include SSE2, SSE3, and SSSE3 instruction sets and
other optimizations. Intel does not guarantee the availability, functionality, or effectiveness of any optimization on
microprocessors not manufactured by Intel. Microprocessor-dependent optimizations in this product are intended
for use with Intel microprocessors. Certain optimizations not specific to Intel microarchitecture are reserved for Intel
microprocessors. Please refer to the applicable product User and Reference Guides for more information regarding
the specific instruction sets covered by this notice.
Notice revision #20110804
Optimization Notice
Copyright © 2015, Intel Corporation. All rights reserved. *Other names and brands may be claimed as the property of others.
61
Legal Disclaimer & Optimization Notice
INFORMATION IN THIS DOCUMENT IS PROVIDED “AS IS”. NO LICENSE, EXPRESS OR IMPLIED, BY ESTOPPEL OR OTHERWISE, TO
ANY INTELLECTUAL PROPERTY RIGHTS IS GRANTED BY THIS DOCUMENT. INTEL ASSUMES NO LIABILITY WHATSOEVER AND
INTEL DISCLAIMS ANY EXPRESS OR IMPLIED WARRANTY, RELATING TO THIS INFORMATION INCLUDING LIABILITY OR
WARRANTIES RELATING TO FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABILITY, OR INFRINGEMENT OF ANY PATENT,
COPYRIGHT OR OTHER INTELLECTUAL PROPERTY RIGHT.
Software and workloads used in performance tests may have been optimized for performance only on Intel microprocessors.
Performance tests, such as SYSmark and MobileMark, are measured using specific computer systems, components, software,
operations and functions. Any change to any of those factors may cause the results to vary. You should consult other
information and performance tests to assist you in fully evaluating your contemplated purchases, including the performance of
that product when combined with other products.
Copyright © 2015, Intel Corporation. All rights reserved. Intel, Pentium, Xeon, Xeon Phi, Core, VTune, Cilk, and the Intel logo are
trademarks of Intel Corporation in the U.S. and other countries.
Optimization Notice
Intel’s compilers may or may not optimize to the same degree for non-Intel microprocessors for optimizations that are not unique to Intel
microprocessors. These optimizations include SSE2, SSE3, and SSSE3 instruction sets and other optimizations. Intel does not guarantee the
availability, functionality, or effectiveness of any optimization on microprocessors not manufactured by Intel. Microprocessor-dependent
optimizations in this product are intended for use with Intel microprocessors. Certain optimizations not specific to Intel microarchitecture
are reserved for Intel microprocessors. Please refer to the applicable product User and Reference Guides for more information regarding the
specific instruction sets covered by this notice.
Notice revision #20110804
Optimization Notice
Copyright © 2015, Intel Corporation. All rights reserved. *Other names and brands may be claimed as the property of others.
63