real time trace & real time profilling configure trace32 to record trace information in a...

35
Able.zhou Real Time Trace & Real Time Profilling Trace Streaming Real Time Profiling 2012/8/23 Thursday Lauterbach Academy Confidential Documents 1

Upload: others

Post on 22-Apr-2020

6 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Real Time Trace & Real Time Profilling Configure TRACE32 to record trace information in a compact way e.g. ETM.PortFilter PACK for all ETMs . Caveats: compact raw data reduce the accuracy

Able.zhou

Real Time Trace & Real Time Profilling

Trace Streaming Real Time Profiling

2012/8/23 Thursday Lauterbach Academy Confidential Documents 1

Page 2: Real Time Trace & Real Time Profilling Configure TRACE32 to record trace information in a compact way e.g. ETM.PortFilter PACK for all ETMs . Caveats: compact raw data reduce the accuracy

Trace Streaming

2012/8/23 Thursday Lauterbach Academy Confidential Documents 2

Introduction

System Background

Streaming File

Streaming in Use

Page 3: Real Time Trace & Real Time Profilling Configure TRACE32 to record trace information in a compact way e.g. ETM.PortFilter PACK for all ETMs . Caveats: compact raw data reduce the accuracy

Introduction

The term Trace Streaming : means the recording, processing, and optional storage of streams of

trace data, while the target system is running and emitting new trace data.

Trace display and analysis is performed after the recording stopped

2012/8/23 Thursday Lauterbach Academy Confidential Documents 3

Page 4: Real Time Trace & Real Time Profilling Configure TRACE32 to record trace information in a compact way e.g. ETM.PortFilter PACK for all ETMs . Caveats: compact raw data reduce the accuracy

Introduction

Trace Streaming is one method to deal with Streamed data

2012/8/23 Thursday Lauterbach Academy Confidential Documents 4

Page 5: Real Time Trace & Real Time Profilling Configure TRACE32 to record trace information in a compact way e.g. ETM.PortFilter PACK for all ETMs . Caveats: compact raw data reduce the accuracy

Why do we need Trace Streaming

2012/8/23 Thursday Lauterbach Academy Confidential Documents 5

For our customer the trace memory is never big enough

Page 6: Real Time Trace & Real Time Profilling Configure TRACE32 to record trace information in a compact way e.g. ETM.PortFilter PACK for all ETMs . Caveats: compact raw data reduce the accuracy

System Background

A PowerTrace-II with AutoFocus-II preprocessor An Gbit Ethernet interface A fast host PC, especially for the cycle accurate analysis and

for nested analysis. A 64bit executable and OS are required for handling traces >

2G Frames target with ETMv3, Coresight,Nexus or PTM

2012/8/23 Thursday Lauterbach Academy Confidential Documents 6

Page 7: Real Time Trace & Real Time Profilling Configure TRACE32 to record trace information in a compact way e.g. ETM.PortFilter PACK for all ETMs . Caveats: compact raw data reduce the accuracy

System Background

Technical requirement

1. Compact raw data 2. Flexibility with respect to the time stamp 3. A good data compression before streaming 4. A good data compression before saving on the drive

2012/8/23 Thursday Lauterbach Academy Confidential Documents 7

The average data rate at the trace port should not exceed the maximum transmission rate between the trace memory of the tool and the host

Page 8: Real Time Trace & Real Time Profilling Configure TRACE32 to record trace information in a compact way e.g. ETM.PortFilter PACK for all ETMs . Caveats: compact raw data reduce the accuracy

System Background

Compact raw data (reduce information to be recorded)

1. Switch data-trace off 2. Configure the trace logic to generate trace information in a compact way e.g. Branch History Messaging for NEXUS on MPC5xxx/SPC56x Caveats: compact raw data reduce the accuracy of the TRACE32

hardware time-stamp 3. Configure TRACE32 to record trace information in a compact way e.g. ETM.PortFilter PACK for all ETMs Caveats: compact raw data reduce the accuracy of the TRACE32

hardware time-stamp

2012/8/23 Thursday Lauterbach Academy Confidential Documents 8

Page 9: Real Time Trace & Real Time Profilling Configure TRACE32 to record trace information in a compact way e.g. ETM.PortFilter PACK for all ETMs . Caveats: compact raw data reduce the accuracy

System Background

Flexibility with respect to the time stamp

Default 128 bit frames if no time stamp information is required the amount of

streaming data can be reduced. eg. ETM.PortFilter MAX for all ETMv3 and higher Smaller 64 bit frames (8x8 4x16 2x32) 2012/8/23 Thursday Lauterbach Academy Confidential Documents 9

96 bit trace raw data 32 bit time stamp

64 bit trace raw data

Page 10: Real Time Trace & Real Time Profilling Configure TRACE32 to record trace information in a compact way e.g. ETM.PortFilter PACK for all ETMs . Caveats: compact raw data reduce the accuracy

System Background

Good data compression (reduce information to be streamed) 1. PowerTrace II provides a FPGA-based hardware compression for the

trace information for the ETMv3 and higher (factor 6) 2. Otherwise software compression is used (factor 3)

Trace.STREAMCompression LOW | MID | HIGH 3. Trace.STREAMCompression MID | HIGH (on host: decompress –

compress - zip)

Max transmission rate: Trace memory of tool → host The command IFTEST /Warp provides an estimate of the transmission rate

2012/8/23 Thursday Lauterbach Academy Confidential Documents 10

Page 11: Real Time Trace & Real Time Profilling Configure TRACE32 to record trace information in a compact way e.g. ETM.PortFilter PACK for all ETMs . Caveats: compact raw data reduce the accuracy

System Background

Transmission rates 1. Max transmission rates for trace memory in CombiProbe

• Power Debug USB 2 about 14 MByte/s • Power Debug Ethernet about 10 MByte/s • PowerDebug II about 62 MByte/s

2. Max transmission rates for trace memory in PowerTrace • PowerTrace Ethernet /USB 2.0: about 14 MByte/s • PowerTrace Ethernet: about 10 MByte/s

3. Max transmission rates for trace memory in PowerTrace II • PowerDebug II & PowerTrace II/USB 2.0 about 14 MByte/s • PowerDebug II & PowerTrace II about 60 MByte/s

2012/8/23 Thursday Lauterbach Academy Confidential Documents 11

Page 12: Real Time Trace & Real Time Profilling Configure TRACE32 to record trace information in a compact way e.g. ETM.PortFilter PACK for all ETMs . Caveats: compact raw data reduce the accuracy

Streaming File

Default location

1. TRACE32 temp directory (OS.PTD()) • e.g. C:\Users\amartin\AppData\Local\Temp\

Default file name

1. <TRACE32_instance_ID>streama.t32 • e.g. andT32_1000004streama.t32

Default size limitation 1. less the 1 GByte free memory left on drive

2012/8/23 Thursday Lauterbach Academy Confidential Documents 12

Page 13: Real Time Trace & Real Time Profilling Configure TRACE32 to record trace information in a compact way e.g. ETM.PortFilter PACK for all ETMs . Caveats: compact raw data reduce the accuracy

Streaming File

User-defined location/file name

1. Trace.STREAMFILE <file> • e.g. Trace.STREAMFILE d:/temp/mystream.t32

User-defined size limitation 1. Trace.STREAMFileLimit <limit in bytes>

• e.g. Trace.STREAMFileLimit 5000000000 // 5 Gbyte as max.size • e.g. Trace.STREAMFileLimit -5000000000 // less then 5 Gbyte free memory left on the drive

2012/8/23 Thursday Lauterbach Academy Confidential Documents 13

Page 14: Real Time Trace & Real Time Profilling Configure TRACE32 to record trace information in a compact way e.g. ETM.PortFilter PACK for all ETMs . Caveats: compact raw data reduce the accuracy

Streaming in Use

Trace32 Configuration(Trace.Mode STREAM)

2012/8/23 Thursday Lauterbach Academy Confidential Documents 14

Page 15: Real Time Trace & Real Time Profilling Configure TRACE32 to record trace information in a compact way e.g. ETM.PortFilter PACK for all ETMs . Caveats: compact raw data reduce the accuracy

Streaming in Use

TRACE32 Configuration (ETMv3 – Code Coverage) ... ETM.DataTrace OFF ETM.PortFilter MAX Trace.STREAMCompression HIGH Trace.STREAMFileLimit 10000000000. Trace.STREAMFILE d:/temp/mystream.t32 Trace.Mode STREAM Trace.AutoInit ON ...

2012/8/23 Thursday Lauterbach Academy Confidential Documents 15

Page 16: Real Time Trace & Real Time Profilling Configure TRACE32 to record trace information in a compact way e.g. ETM.PortFilter PACK for all ETMs . Caveats: compact raw data reduce the accuracy

Streaming in Use

TRACE32 Configuration (NEXUS Power Architecture - extended)

... NEXUS.HTM ON Trace.STREAMFileLimit 10000000000. Trace.STREAMFILE d:/temp/mystream.t32 Trace.Mode STREAM ...

2012/8/23 Thursday Lauterbach Academy Confidential Documents 16

Page 17: Real Time Trace & Real Time Profilling Configure TRACE32 to record trace information in a compact way e.g. ETM.PortFilter PACK for all ETMs . Caveats: compact raw data reduce the accuracy

Streaming in Use

2012/8/23 Thursday Lauterbach Academy Confidential Documents 17

Page 18: Real Time Trace & Real Time Profilling Configure TRACE32 to record trace information in a compact way e.g. ETM.PortFilter PACK for all ETMs . Caveats: compact raw data reduce the accuracy

Streaming in Use

2012/8/23 Thursday Lauterbach Academy Confidential Documents 18

Page 19: Real Time Trace & Real Time Profilling Configure TRACE32 to record trace information in a compact way e.g. ETM.PortFilter PACK for all ETMs . Caveats: compact raw data reduce the accuracy

Streaming in Use

2012/8/23 Thursday Lauterbach Academy Confidential Documents 19

Page 20: Real Time Trace & Real Time Profilling Configure TRACE32 to record trace information in a compact way e.g. ETM.PortFilter PACK for all ETMs . Caveats: compact raw data reduce the accuracy

Streaming in Use

When the technical requirement are fulfilled, Trace STREAMing is useful: • Whenever the customer wants to extend his trace memory size • For Trace-based Code-Coverage in one measurement step

2012/8/23 Thursday Lauterbach Academy Confidential Documents 20

Page 21: Real Time Trace & Real Time Profilling Configure TRACE32 to record trace information in a compact way e.g. ETM.PortFilter PACK for all ETMs . Caveats: compact raw data reduce the accuracy

Real Time Profilings

2012/8/23 Thursday Lauterbach Academy Confidential Documents 21

Distinction streaming and Profiling

Requirements for Real-Time Profiling

RTP Explanation with Demos

Feature outlook

Page 22: Real Time Trace & Real Time Profilling Configure TRACE32 to record trace information in a compact way e.g. ETM.PortFilter PACK for all ETMs . Caveats: compact raw data reduce the accuracy

Distinction between Streaming and Real-Time Profiling Streaming (of raw trace data to disk)

Real-time Profiling(live update of changing results)

2012/8/23 Thursday Lauterbach Academy Confidential Documents 22

Page 23: Real Time Trace & Real Time Profilling Configure TRACE32 to record trace information in a compact way e.g. ETM.PortFilter PACK for all ETMs . Caveats: compact raw data reduce the accuracy

Real Time Profiling

Real-time Profiling: 1. live processing 2. live update of changing results 3. live writing to disk

2012/8/23 Thursday Lauterbach Academy Confidential Documents 23

Page 24: Real Time Trace & Real Time Profilling Configure TRACE32 to record trace information in a compact way e.g. ETM.PortFilter PACK for all ETMs . Caveats: compact raw data reduce the accuracy

Requirements for Real-Time Profiling

PowerTrace II with Autofocus I or CombiProbe Gbit Ethernet interface (USB is too slow) A fast host machine A host with 64bit OS is for large data sets >2G Frames An ARM target with ETMv3, Coresight or PTM

2012/8/23 Thursday Lauterbach Academy Confidential Documents 24

Page 25: Real Time Trace & Real Time Profilling Configure TRACE32 to record trace information in a compact way e.g. ETM.PortFilter PACK for all ETMs . Caveats: compact raw data reduce the accuracy

Requirements for Real-Time Profiling (Setup)

Working system setup for conventional tracing (No flow errors!) and enabling

Analyzer.ACCESS VM:

Copy all executed program code to the debugger's VM: 1. including interrupt and exception handlers and vectors 2. Necessary to decode the trace data stream without accessing the

target

All symbol information (“.elf files”) need to be loaded 1. required for decoding the trace data (RTS.ON) 2. required for interpreting the RTP file (RTS.LOAD)

2012/8/23 Thursday Lauterbach Academy Confidential Documents 25

Page 26: Real Time Trace & Real Time Profilling Configure TRACE32 to record trace information in a compact way e.g. ETM.PortFilter PACK for all ETMs . Caveats: compact raw data reduce the accuracy

Real-Time Profiling Setup

Copy all code to the debugger's VM:. 1. Copy ALL executed code to the VM: 2. Copy REALLY ALL executed code to the VM:. (including exception vectors, break & interrupts handlers, …) 3. Copy all code to the VM:

e.g. using Data.Load somefile.elf /plusVM Data.COPY P:0x8000++0x2000 VM:0x8000

2012/8/23 Thursday Lauterbach Academy Confidential Documents 26

Page 27: Real Time Trace & Real Time Profilling Configure TRACE32 to record trace information in a compact way e.g. ETM.PortFilter PACK for all ETMs . Caveats: compact raw data reduce the accuracy

RTP Explanation

RTP Operation modes Overview

2012/8/23 Thursday Lauterbach Academy Confidential Documents 27

Page 28: Real Time Trace & Real Time Profilling Configure TRACE32 to record trace information in a compact way e.g. ETM.PortFilter PACK for all ETMs . Caveats: compact raw data reduce the accuracy

Operation modes RTS.OFF, RTS.ON

RTS.OFF : no recording, no processing RTS.ON : recording and processing of data

live display of constantly updated results (RTS.STAT.*) live display of recorded trace data (RTS.LIST)

processing options: RTS.NestingMode.Flat : flat processing RTS.NestingMode.Tree : nested processing (call tree)

timing options : RTS.TImeMode.OFF : no real-time information RTS.TImeMode.Sampling : low-res ticks from preprocessor RTS.TImeMode.CycleAccurate : ETM-cycle accurate mode

2012/8/23 Thursday Lauterbach Academy Confidential Documents 28

Page 29: Real Time Trace & Real Time Profilling Configure TRACE32 to record trace information in a compact way e.g. ETM.PortFilter PACK for all ETMs . Caveats: compact raw data reduce the accuracy

Demo

Debugger Setup RTS.ON RTS.ISTATistics RTS.STATistics RTS.LIST

2012/8/23 Thursday Lauterbach Academy Confidential Documents 29

Page 30: Real Time Trace & Real Time Profilling Configure TRACE32 to record trace information in a compact way e.g. ETM.PortFilter PACK for all ETMs . Caveats: compact raw data reduce the accuracy

Operation mode RTS.LOAD

RTS.LOAD Accesses all information available in the RTS file that was recorded in the session with RTS.ON. Utilizes identical display commands RTS.ISTAT, RTS.STAT, RTS.LIST

RTS.FILE select streaming file name (used in RTS.ON, RTS.LOAD)

RTS.ON supports the following file options: RTS.FileMode.OFF : nothing is written, no RTS file is used RTS.FileMode.Summary : writes processing results RTS.FileMode.Tasks : additionally, writes task switch information RTS.FileMode.Full : additionally, writes full trace data

2012/8/23 Thursday Lauterbach Academy Confidential Documents 30

Page 31: Real Time Trace & Real Time Profilling Configure TRACE32 to record trace information in a compact way e.g. ETM.PortFilter PACK for all ETMs . Caveats: compact raw data reduce the accuracy

RTS.FileMode : supported commands by file mode

2012/8/23 Thursday Lauterbach Academy Confidential Documents 31

Page 32: Real Time Trace & Real Time Profilling Configure TRACE32 to record trace information in a compact way e.g. ETM.PortFilter PACK for all ETMs . Caveats: compact raw data reduce the accuracy

The Secret Revelations on RTS.ON

RTS.ON overwrites an existing streaming file. Any change in options (RTS.File, RTS. ModeTImMode, …)

resets RTS. If RTS was ON, it performs RTS.OFF / RTS.ON, see above.

2012/8/23 Thursday Lauterbach Academy Confidential Documents 32

Page 33: Real Time Trace & Real Time Profilling Configure TRACE32 to record trace information in a compact way e.g. ETM.PortFilter PACK for all ETMs . Caveats: compact raw data reduce the accuracy

2012/8/23 Thursday Lauterbach Academy Confidential Documents 33

Page 34: Real Time Trace & Real Time Profilling Configure TRACE32 to record trace information in a compact way e.g. ETM.PortFilter PACK for all ETMs . Caveats: compact raw data reduce the accuracy

Feature Outlook

Profiling for multi-core targets

2012/8/23 Thursday Lauterbach Academy Confidential Documents 34

Page 35: Real Time Trace & Real Time Profilling Configure TRACE32 to record trace information in a compact way e.g. ETM.PortFilter PACK for all ETMs . Caveats: compact raw data reduce the accuracy

Thank You!

Q & A

www.lauterbach.com www.lauterbach.cn

2012/8/23 Thursday Lauterbach Academy Confidential Documents 35