analyze system and code interactions

31
1

Upload: qualcomm-developer-network

Post on 16-Jun-2015

321 views

Category:

Technology


2 download

DESCRIPTION

The Qualcomm® Snapdragon™ Performance Visualizer, a product of Qualcomm Technologies, Inc. is a suite of tools that allows developers to better analyze their code’s operation on a Snapdragon processor. This session will show developers how to examine interrupts, DSP information, GPU events, performance counters and temperature, as well as custom, user-defined data and more. Learn more about Snapdragon Performance Visualizer: https://developer.qualcomm.com/mobile-development/increase-app-performance/snapdragon-performance-visualizer Watch this presentation on YouTube: https://www.youtube.com/watch?v=iVrF6LEyCwY

TRANSCRIPT

Page 1: Analyze System and Code Interactions

1

Page 2: Analyze System and Code Interactions

Visualize your system with Qualcomm® Snapdragon™ Performance Visualizer

Kevin A. Sapp, Engineer, Principal Qualcomm Innovation Center, Inc.

Qualcomm Snapdragon is a product of Qualcomm Technologies, Inc.

Page 3: Analyze System and Code Interactions

3

Real Time Data and Live View

Adding Custom Data

Agenda

2 3 4 6 1 Profiling and

Trace

5 Questions What is

Qualcomm® Snapdragon™ Performance

Visualizer (SPV)

Qualcomm Embedded Power Monitor is a product of Qualcomm Technologies, Inc.

Power and Qualcomm® Embedded

Power Monitor (QEPM)

Page 4: Analyze System and Code Interactions

4

Adding Custom Data

Agenda

3 4 6 Profiling and

Trace

5 Questions Real Time Data

and Live View

2 1 What is

Qualcomm® Snapdragon™ Performance

Visualizer (SPV)

Power and Qualcomm® Embedded

Power Monitor (QEPM)

Page 5: Analyze System and Code Interactions

5

Agenda

4 6 Profiling and

Trace

5 Questions

1 Adding Custom

Data

3 Real Time Data and Live View

2 What is

Qualcomm® Snapdragon™ Performance

Visualizer (SPV)

Power and Qualcomm® Embedded

Power Monitor (QEPM)

Page 6: Analyze System and Code Interactions

6

Agenda

6 Profiling and

Trace

5 Questions

1 Real Time Data and Live View

2 4 Adding Custom

Data

3 What is

Qualcomm® Snapdragon™ Performance

Visualizer (SPV)

Power and Qualcomm® Embedded

Power Monitor (QEPM)

Page 7: Analyze System and Code Interactions

7

Agenda

6 5 Power and

Qualcomm® Embedded

Power Monitor (QEPM)

Questions

1 Real Time Data and Live View

2 Adding Custom

Data

3 Profiling and

Trace

4 What is

Qualcomm® Snapdragon™ Performance

Visualizer (SPV)

Page 8: Analyze System and Code Interactions

8

Agenda

6 Questions

1 Real Time Data and Live View

2 Adding Custom

Data

3 Profiling and

Trace

4 5

? What is

Qualcomm® Snapdragon™ Performance

Visualizer (SPV)

Power and Qualcomm® Embedded

Power Monitor (QEPM)

Page 9: Analyze System and Code Interactions

9

What is Snapdragon Performance Visualizer?

Page 10: Analyze System and Code Interactions

10

Snapdragon Performance Visualizer (SPV) is a comprehensive software tool suite that is designed to enable Android developers using the Qualcomm® Snapdragon™ Mobile Development Platform (MDP) to visualize, analyze and correlate the impact of detailed CPU and system data on application performance, making it easier to pinpoint and resolve performance bottlenecks.

Page 11: Analyze System and Code Interactions

11

The GUI is web based − Dojo − JavaScript − Scalable Vector Graphics (SVG) − JSON

Command Line − ssh access for advanced command line tools − Access to “perf” command line − Other familiar tools, top, strace, etc − Scripting (bash, perl) for automation

Automation − Web based automation APIs available for many of the tools

− http://server:7376/api/setSessionTimeout&sessionId=131074&timeout=3600

How Does SPV Work Web based tool set and more

Page 12: Analyze System and Code Interactions

12

Monitor performance

Examine performance monitors (CPU, L2, GPU, DSP)

Visualize system traces

Statistical (time or event) profiling

Add custom data, custom markers

Thermal data

Integrate with power monitoring (QEPM) tools

Memory leak and allocation corruption detection

Kernel probes

B and E markers from Atrace

Runs on most Linux based distributions (Android, Ubuntu, Debian, Tizen, Chrome, etc)

What can SPV do? Tools to monitor the system post processed and in real-time

Page 13: Analyze System and Code Interactions

13

Live View

Page 14: Analyze System and Code Interactions

14

CPU Information − Performance Monitors (cache hits) − Utilization − Frequency − Temperature − more

GPU Information − Performance monitors − Utilization − Frequency − more

DSP − Performance Monitors

Live View Real time collection and Visualization of time correlated system data

Source: Snapdragon Performance Visualizer screen shots

Page 15: Analyze System and Code Interactions

15

Live View (2) Live View is the bridge to ProfileView’s advanced visualization and correlations

=

Source: Snapdragon Performance Visualizer screen shots

Page 16: Analyze System and Code Interactions

16

Live View Demonstration

Page 17: Analyze System and Code Interactions

17

Custom Data

Page 18: Analyze System and Code Interactions

18

File Line Field − Reads /proc, /sys, /debugfs files

− Periodically plots the value in a specific File …

− At a specific Line number

− And a specific Field on that line

Named Pipes − Marker

− Long

− Double

− Binary

Adding Custom Data to SPV Mechanisms to extend SPV with your unique data

Source: Snapdragon Performance Visualizer screen shots

Page 19: Analyze System and Code Interactions

19

File Line Field node − Look at the run-queue depth on CPU0

− Stored in /sys/devices/system/cpu/cpu0/rq-stats/run_queue_avg

Pipe data format is: − timestamp,data<cr> -or- ,data<cr>

− Timestamp is gtod, in decimal seconds − e.g. 12345.34567

− Data can be written from shells using echo − echo “,123.456” > /tmp/namedpipe

Adding Custom Data to SPV Some simple code and nodes

Source: Snapdragon Performance Visualizer screen shots

Page 20: Analyze System and Code Interactions

20

Custom Data Demonstration

Page 21: Analyze System and Code Interactions

21

Profiling and Trace

Page 22: Analyze System and Code Interactions

22

Sample based profiling

Uses “perf record” under the covers

Not real-time − Collect – Stop – Analyze

Multiple Visualizations − Text Based (Oprofile)

− ProfileView GUI

Libs provided for instrumented code

Profiling Statistical and instrumented

Source: Snapdragon Performance Visualizer screen shots

Page 23: Analyze System and Code Interactions

23

Correlate events

See when frequency changes

Which processes/threads are running

When CPU issues commands to GPU

Per-context Performance Monitors

Call stack analysis

Hot Spot analysis

Not real-time − Collect – Stop – Analyze

Correlates with Live View data

Correlates with Profile data

Correlates with Custom data

Tracing Instrumented kernel and code

Source: Snapdragon Performance Visualizer screen shots

Page 24: Analyze System and Code Interactions

24

Profile and Trace Demonstrations

Page 25: Analyze System and Code Interactions

25

Qualcomm® Embedded Power Monitor (QEPM)

Page 26: Analyze System and Code Interactions

26

Monitors current and voltage rails

Combined sample rates up 50K

Simultaneously monitor multiple devices

Correlate data with SPV − Frequency

− Thermal

− Performance

Web based

Automation interface

Data export capabilities

QEPM

Source: Snapdragon Performance Visualizer screen shots

Page 27: Analyze System and Code Interactions

27

QEPM Demonstration

Page 28: Analyze System and Code Interactions

28

Questions?

Page 29: Analyze System and Code Interactions

29

FAQ and Support for SPV is available on

Qualcomm Developer Network

Page 30: Analyze System and Code Interactions

30

developer.qualcomm.com

Augmented reality

Context awareness

Peer to peer

Wireless health

Graphics & gaming

Computer vision

Android applications

App development SDKs & tools

Marketing opportunities

Case Studies & Tutorials

News & Information

Hardware development platforms

Forums & technical support

Tools & resources to help developers build, integrate, and optimize

Qualcomm Developer Network

Page 31: Analyze System and Code Interactions

31

For more information on Qualcomm, visit us at: www.qualcomm.com & www.qualcomm.com/blog

Thank you

FOLLOW US ON:

© 2013-2014 Qualcomm Technologies, Inc. and/or its affiliated companies. All rights reserved. Qualcomm and Snapdragon are trademarks of Qualcomm Incorporated, registered in the United States and other countries. Uplinq is a trademark of Qualcomm Incorporated. All trademarks of Qualcomm Incorporated are used with permission. Other product and brand names may be trademarks or registered trademarks of their respective owners. References in this presentation to “Qualcomm” may mean Qualcomm Incorporated, Qualcomm Technologies, Inc., and/or other subsidiaries or business units within the Qualcomm corporate structure, as applicable. Qualcomm Incorporated includes Qualcomm’s licensing business, QTL, and the vast majority of its patent portfolio. Qualcomm Technologies, Inc., a wholly-owned subsidiary of Qualcomm Incorporated, operates, along with its subsidiaries, substantially all of Qualcomm’s engineering, research and development functions, and substantially all of its product and services businesses, including its semiconductor business, QCT.