SlideShare ist ein Scribd-Unternehmen logo
1 von 29
Downloaden Sie, um offline zu lesen
Presented by
Date
Event
CoreSight/OpenCSD - Open
for Business
CoreSight trace decoding with Perf
and OpenCSD
Mike Leach
Tor Jeremiassen
Mathieu Poirier
BKK16-103 7th March 2016
Linaro Connect BKK16
Topics Covered
• A brief overview of the CoreSight technology
• Using CoreSight on Linux
• OpenCSD project – the decoder library, progress and
programming.
• Using Perf to decode and render trace information.
What is CoreSight?
● CoreSight is a set of IP blocks enabling HW assisted program flow tracing in an SoC.
● Using CoreSight, it is possible to know the exact code path a program took, in both user and
kernel space, including interruptions.
● CoreSight tracers record branch point rather than all executed instructions. Using object files
and libraries it is possible to reconstruct the execution path.
● Each CoreSight implementation is different and tailored to specific SoC tracing requirement.
● Implementation will typically have a HW tracer per CPU core, and series of “links” connecting
tracers to “sinks”.
● Sinks are entities collecting trace data, either in an internal memory buffer or system memory.
CoreSight Trace : Hardware
Why CoreSight?
● Tracing has minimal to no impact on the system timing.
● Does not require any external component or cable to be connected to a system.
● Can be used in “live” systems without impact of reconfiguration.
● Each CoreSight implementation is different and tailored to specific SoC tracing requirement.
● Implementation will typically have a HW tracer per CPU core, and series of “links” connecting
tracers to “sinks”.
● Sinks are entities collecting trace data, either in an internal memory buffer or system memory.
Using CoreSight on Linux
● Support for most CoreSight IP blocks have been available upstream since 3.19.
○ Everything is under: $(KERNEL)/drivers/hwtracing/coresight/
● The upstream solution provides an extensible framework to support different kind of topology.
Everything is driven via DT.
● Two ways of using CoreSight:
○ Using sysFS.
○ Using the Perf infrastructure.
● Reference platform supported:
○ Versatile Express (TC2)
○ Juno-r1 (Extra DT needed)
○ Pandaboard (OMAP4430, extra patches needed)
● Get in touch with me for the extra patches.
CoreSight on Linux using sysFS
● Really a “Build your own trace kit” method.
● The CoreSight Access Library (CSAL) can be used for programming the tracers. More on that
topic later in the presentation.
● Trace data need to be collected and fed to openCSD.
● Everything is driven via sysFS.
● Why not simply using Perf?
○ Some use case simply can’t be addressed by Perf.
CoreSight driven from sysFS
linaro@linaro-nano:/sys/bus/coresight/devices$ ls
20010000.etf 20040000.main_funnel 22040000.etm 22140000.etm 230c0000.
A53_funnel 23240000.etm replicator@20020000 20030000.tpiu 20070000.etr
220c0000.A57_funnel 23040000.etm 23140000.etm 23340000.etm
linaro@linaro-nano:/sys/bus/coresight/devices$
linaro@linaro-nano:/sys/bus/coresight/devices$ ls 22040000.etm/ | wc -l
52
linaro@linaro-nano:/sys/bus/coresight/devices$
CoreSight driven from Perf
linaro@linaro-nano:~/kernel$ ./tools/perf/perf record -v 
-e cs_etm//u --per-thread uname
mmap size 266240B
Linux
[ perf record: Woken up 1 times to write data ]
failed to write feature 8
failed to write feature 9
failed to write feature 14
[ perf record: Captured and wrote 0.072 MB perf.data ]
linaro@linaro-nano:~/kernel$ ls -lh perf.data ~/.debug/
-rw------- 1 linaro linaro 77K Feb 28 17:47 perf.data
/home/linaro/.debug/:
total 16K
drwxr-xr-x 2 linaro linaro 4.0K Feb 24 19:21 [kernel.kallsyms]
drwxr-xr-x 2 linaro linaro 4.0K Feb 24 19:21 [vdso]
drwxr-xr-x 3 linaro linaro 4.0K Feb 24 19:21 bin
drwxr-xr-x 3 linaro linaro 4.0K Feb 24 19:21 lib
Famous Last Words
● When using the CoreSight framework in either Perf or sysFS mode, CPUidle MUST be disabled.
● Why?
○ Because ETMv3/4 tracers USUALLY share the same power domain. If a CPU is
suspended in a deep state, configuration of the tracers is lost.
● The same problem exists for other PMU, interrupt controller and CCIs. Anything that is sharing
a power domain with a CPU will be affected the same way.
● It is being worked on in the community - currently no available solution.
● Linaro rather disable CPUidle than introduce a hack that needs to be undone.
OpenCSD Library
• Designed to decode the different CoreSight Trace source protocols into generic trace packets.
Implemented in C++ with C wrapper API.
• Platforms supported are native ARM (Linux and bare metal), x86/x64 Linux and Windows.
• Three stage decode:-
De-multiplex:– split combined trace frames into individual trace source byte streams.
Packet Process:– split the source byte stream into individual protocol packet stream.
Packet Decode:– decode packet stream into a set of generic trace packets.
• Generic trace packets consist of instruction ranges executed, core state and other packets
describing program flow.
• Library provides a “Decode Tree” API which manages decode for a single trace sink.
Creates a demuxer and decoders according to the “Trace Source Config” data used to program the
hardware. Client program must also provide memory images to allow the decoder to access the
opcodes traced for full instruction execution flow.
OpenCSD: Library in Use
1) Client Application creates a Decode Tree for trace
data from a single sink.
2) Protocol Decoders are created from the SW Trace
Source Config data used to program up the
hardware.
3) Client program provides memory images, in the form
of memory buffers or files to represent the areas of
code executed in the trace run.
4) Trace data is then pushed through the decoder, trace
elements are output via a callback into the client
program.
5) Client program processes the trace elements as
required (e.g. Generate disassembly, record
coverage data)
Note: Not all sources in a trace data file need to be
decoded. The de-mux will ignore sources without an
attached decoder
OpenCSD: test and debug
• For test and debug purposes, the library provides APIs to convert protocol packets and generic
packets into a human readable string format.
• This string format is used in the output of the library test application “trc_pkt_lister ”, and is
also available from the perf report / perf script outputs as an option.
• trc_pkt_lister example below:
Idx:1643; ID:10; [0x00 0xf7 0x95 0xa2 0xa5 0xdb ]; I_NOT_SYNC : I Stream not synchronised
Idx:1650; ID:10; [0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x80 ]; I_ASYNC : Alignment
Synchronisation.
Idx:1662; ID:10; [0x01 0x01 0x00 ]; I_TRACE_INFO : Trace Info.
Idx:1666; ID:10; [0x9d 0x00 0x35 0x09 0x00 0xc0 0xff 0xff 0xff ]; I_ADDR_L_64IS0 : Address, Long, 64 bit, IS0.;
Addr=0xFFFFFFC000096A00;
Idx:1675; ID:10; [0x04 ]; I_TRACE_ON : Trace On.
Idx:1676; ID:10; [0x85 0x00 0x35 0x09 0x00 0xc0 0xff 0xff 0xff 0xf1 0x00 0x00 0x00 0x00 0x00 ];
I_ADDR_CTXT_L_64IS0 : Address & Context, Long, 64 bit, IS0.; Addr=0xFFFFFFC000096A00; Ctxt: AArch64,EL1, NS;
CID=0x00000000; VMID=0x0000;
Idx:1692; ID:10; [0xf7 ]; I_ATOM_F1 : Atom format 1.; E
Idx:1675; ID:10; RCTDL_GEN_TRC_ELEM_TRACE_ON( [begin or filter])
Idx:1676; ID:10; RCTDL_GEN_TRC_ELEM_PE_CONTEXT(EL1N; AArch64; VMID=0x0; CTXTID=0x0; )
Idx:1692; ID:10; RCTDL_GEN_TRC_ELEM_INSTR_RANGE(exec range=0xffffffc000096a00:[0xffffffc000096a10] E ISB )
OpenCSD : trace protocols and support level
ETMv4 – Instruction: Full decode (limited configuration).
ETMv4 – Data: None.
ETMv3 – Instruction: Packet processing.
ETMv3 – Data: Packet processing.
PTMv1 – Instruction: Full decode (limited configuration).
STM – SW trace: Packet processing.
ITM – SW trace: None.
The intention is to bring all above protocols to the full decode level. Priority being given to
instruction trace and STM as data trace is not present on A class Cortex cores.
Note: Limited configuration above means that there are certain programmable
configuration options on the ETM hardware that the decoder does not yet support.
e.g. Return stack.
Custom Application: trace capture and decode
• Application must program the CoreSight trace hardware according to requirements. Options are:
-
A) Use the sysfs interface in Linux. Requires detailed knowledge of CoreSight hardware and
operation.
B) Use the CoreSight Access Library (CSAL) from ARM. Higher level library designed to ease
direct programming of CS Hardware. CSAL can be used in Linux environment or on bare metal.
• Application is responsible for initiating and halting trace. Programming CTI components to
propagate trace halt can help here.
• Application then must collect the trace and decode using OpenCSD, as described above.
Note: CSAL is an open source library available from ARM providing a programming API for CoreSight
hardware. Presently the library back-end requires the CS components to be mmap()’ed into user
space. An updated back end using the sysfs on linux is planned.
Library is released under the Apache licence. It is expected to be made available on
Github soon.
CoreSight Tracing with perf
Two step process:
● perf record
○ Configures trace unit
○ Manages collection of the compressed trace data
○ Produces perf.data file and populates .debug/ with collateral files
● perf report and/or perf script
○ Parses perf.data file and uses the collected trace information and
the collateral files in .debug/ to expand the collected trace.
○ report provides a text based interface to analyze the data
○ script either dumps the raw events or passes them to a script for
further processing.
The perf.data File
All trace data and information about the execution of a program is collected in
the perf.data file:
● Host system information
○ Number of processors, ISA (instruction set arch), processor topology
○ Operating system version
● Name(s) of all libraries and executable files and their locations in memory
during the data collection.
● Description of what was traced.
● Actual trace data.
● Links between file names and build_id’s
○ build-id is a 160 bit unique id attached to each executable/lib
The magic.debug/ directory
● To avoid duplicating information the actual executable files (and libraries)
are not stored in the perf.data file, but are stored in the .debug directory,
usually $HOME/.debug
● Files are stored under their build-id’s, such that multiple versions of the
“same” executable can be stored without conflict
○ Traces collected for different versions of a program refer to different
build-id’s and thus can coexist with a single .debug/ directory
● Exception:
○ The kernel file (vmlinux) is not stored in .debug/ (though some
symbols extracted from it are stored in [kernel.kallsyms])
○ A path to the kernel must be passed to perf (report/script) if kernel
space trace decoding is required.
perf report / script
Trace Decoding in report/script
perf.data
configuration
trace data
Protocol
Specific
Trace
Decoder
Extract trace data from
perf.data sections
.debug/*
vmlinux
Read instruction words
from exe/lib files
Generate perf samples
Mem req’s
Inst. data
Parse config and create
decoder instance
Trace data
Instruction
ranges
config
% perf report
Note, symbol information available when perf is compiled with elfutils available.
Samples: 114K of event 'instructions:u', Event count (approx.): 519690
Children Self Command Shared Object Symbol
10.46% 10.46% uname libc-2.21.so [.] strlen
9.66% 9.66% uname libc-2.21.so [.] _dl_addr
6.43% 6.43% uname libc-2.21.so [.] strcmp
4.52% 4.52% uname libc-2.21.so [.] malloc
3.38% 3.38% uname libc-2.21.so [.] memcpy
2.42% 2.42% uname libc-2.21.so [.] __stpcpy
1.85% 1.85% uname libc-2.21.so [.] memchr
1.59% 1.59% uname ld-2.21.so [.] 0x0000a7f4
1.40% 1.40% uname libc-2.21.so [.] __rawmemchr
1.32% 1.32% uname libc-2.21.so [.] 0x0002f0c0
1.19% 1.19% uname ld-2.21.so [.] 0x00008eb8
1.14% 1.14% uname ld-2.21.so [.] 0x00016888
1.04% 1.04% uname libc-2.21.so [.] 0x00072520
0.95% 0.95% uname libc-2.21.so [.] free
0.94% 0.94% uname libc-2.21.so [.] getenv
% perf report --sort dso
Samples: 114K of event 'instructions:u', Event count (approx.): 519690
Children Self Shared Object
83.37% 83.37% libc-2.21.so
16.53% 16.53% ld-2.21.so
0.09% 0.09% uname
% perf script
uname 15244 8 instructions:u: 7f89e46f54 fgets_unlocked ([...]/libc-2.21.so)
uname 15244 2 instructions:u: 7f89e46f74 fgets_unlocked ([...]/libc-2.21.so)
uname 15244 11 instructions:u: 7f89e46f7c fgets_unlocked ([...]/libc-2.21.so)
uname 15244 2 instructions:u: 7f89e3e2d8 _IO_getline ([...]/libc-2.21.so)
uname 15244 14 instructions:u: 7f89e3e148 _IO_getline_info ([...]/libc-2.21.so)
uname 15244 2 instructions:u: 7f89e3e184 _IO_getline_info ([...]/libc-2.21.so)
uname 15244 1 instructions:u: 7f89e3e18c _IO_getline_info ([...]/libc-2.21.so)
uname 15244 8 instructions:u: 7f89e3e190 _IO_getline_info ([...]/libc-2.21.so)
uname 15244 5 instructions:u: 7f89e3e1b0 _IO_getline_info ([...]/libc-2.21.so)
...
● Note, not all fields of the trace event is returned by default, here the fields are:
○ comm, tid, period, event, ip, sym, dso
● Additional fields are available:
○ pid, time, cpu, trace, addr, symoff, iregs, brstack,
brstacksym, flags
● Address range from trace is (ip, addr)
% perf script -F comm,addr,ip,sym,dso
uname 8 7f89e46f74 7f89e46f54 fgets_unlocked (/[...]/libc-2.21.so)
uname 2 7f89e46f7c 7f89e46f74 fgets_unlocked (/[...]/libc-2.21.so)
uname 11 7f89e46fa8 7f89e46f7c fgets_unlocked (/[...]/libc-2.21.so)
uname 2 7f89e3e2e0 7f89e3e2d8 _IO_getline (/[...]/libc-2.21.so)
uname 14 7f89e3e180 7f89e3e148 _IO_getline_info (/[...]/libc-2.21.so)
uname 2 7f89e3e18c 7f89e3e184 _IO_getline_info (/[...]/libc-2.21.so)
uname 3 7f89e3e294 7f89e3e288 _IO_getline_info (/[...]/libc-2.21.so)
uname 1 7f89e3e190 7f89e3e18c _IO_getline_info (/[...]/libc-2.21.so)
uname 8 7f89e3e1b0 7f89e3e190 _IO_getline_info (/[...]/libc-2.21.so)
Note, addr is always listed before the ip field, so the range is listed “backwards”.
Range is not inclusive - the addr field marks the address after the last instruction.
Script output can be piped to other scripts/progs for further processing.
perf script scripting
● perf script can call scripts in python or perl directly.
● Specific functions are called within the script
○ trace_before()
○ trace_end()
○ process_event(t)
○ trace_unhandled(...)
● More detailed information is available inside the script process_event()
function than with command line perf script
echo-script.py
def process_event(t)
print t
Output (per line):
{'attr': 'x06x00...x00x00x00', 'sample': {'addr':
547609259400L, 'ip': 547609259392L, 'pid': 3773, 'period':
2L, 'time': 0L, 'tid': 3773, 'cpu': 4294967295}, 'dso':
'/lib/aarch64-linux-gnu/ld-2.21.so', 'comm': 'uname',
'ev_name': 'cs_etm//u', 'raw_buf': '', 'callchain': []}
cs-trace-disasm.py
● A script that provides a disassembly of the instruction trace
○ Calls perf buildid-list to get list of object files
○ Calls perf script --show-mmap-events to collect information
about which object files were used and where in memory they were
allocated during execution (.so files don’t have a start address)
○ For each trace address range generate disassembly by calling :
■ objdump -d --start-address=<ip> --stop-
address=<addr>
○ Filters and prints the generated disassembly to stdout.
■ Removes blank lines, header information for each invocation
○ Caches decoded address ranges to improve runtime
cs-trace-disasm.py - Example Output
401bb8: d280001d mov x29, #0x0 // #0
401bbc: d280001e mov x30, #0x0 // #0
401bc0: 910003fd mov x29, sp
401bc4: aa0003e5 mov x5, x0
401bc8: f94003e1 ldr x1, [sp]
401bcc: 910023e2 add x2, sp, #0x8
401bd0: 910003e6 mov x6, sp
401bd4: 580000a0 ldr x0, 401be8 <setlocale@plt+0x4e8>
401bd8: 580000c3 ldr x3, 401bf0 <setlocale@plt+0x4f0>
401bdc: 580000e4 ldr x4, 401bf8 <setlocale@plt+0x4f8>
401be0: 97fffe38 bl 4014c0 <__libc_start_main@plt>
4014c0: b00000b0 adrp x16, 416000 <setlocale@plt+0x14900>
4014c4: f9404a11 ldr x17, [x16,#144]
4014c8: 91024210 add x16, x16, #0x90
4014cc: d61f0220 br x17
401380: a9bf7bf0 stp x16, x30, [sp,#-16]!
401384: 900000b0 adrp x16, 415000 <setlocale@plt+0x13900>
Current Project Status
● Everything that was presented today is available on github [1].
● Instructions on how to setup the environment and use the Perf methods
can be found in the HOWTO file on branch opencsd-bkk16.
● The work that integrates the CoreSight framework to Perf has been
accepted for the 4.6 merge window.
● Upstreaming of the work to support for ETMv4 and TMC via Perf has
started.
● All the user space “perf tools” is on github but upstreaming of that code
hasn’t started yet.
Question and Comments?
[1]. https://github.com/Linaro/OpenCSD branch opencsd-bkk16

Weitere ähnliche Inhalte

Was ist angesagt?

BKK16-303 96Boards - TV Platform
BKK16-303 96Boards - TV PlatformBKK16-303 96Boards - TV Platform
BKK16-303 96Boards - TV PlatformLinaro
 
LAS16-405:OpenDataPlane: Software Defined Dataplane leader
LAS16-405:OpenDataPlane: Software Defined Dataplane leaderLAS16-405:OpenDataPlane: Software Defined Dataplane leader
LAS16-405:OpenDataPlane: Software Defined Dataplane leaderLinaro
 
LAS16-310: Introducing the first 96Boards TV Platform: Poplar by Hisilicon
LAS16-310: Introducing the first 96Boards TV Platform: Poplar by HisiliconLAS16-310: Introducing the first 96Boards TV Platform: Poplar by Hisilicon
LAS16-310: Introducing the first 96Boards TV Platform: Poplar by HisiliconLinaro
 
Las16 200 - firmware summit - ras what is it- why do we need it
Las16 200 - firmware summit - ras what is it- why do we need itLas16 200 - firmware summit - ras what is it- why do we need it
Las16 200 - firmware summit - ras what is it- why do we need itLinaro
 
Linux-wpan: IEEE 802.15.4 and 6LoWPAN in the Linux Kernel - BUD17-120
Linux-wpan: IEEE 802.15.4 and 6LoWPAN in the Linux Kernel - BUD17-120Linux-wpan: IEEE 802.15.4 and 6LoWPAN in the Linux Kernel - BUD17-120
Linux-wpan: IEEE 802.15.4 and 6LoWPAN in the Linux Kernel - BUD17-120Linaro
 
BUD17 Socionext SC2A11 ARM Server SoC
BUD17 Socionext SC2A11 ARM Server SoCBUD17 Socionext SC2A11 ARM Server SoC
BUD17 Socionext SC2A11 ARM Server SoCLinaro
 
Ostech war story using mainline linux for an android tv bsp
Ostech  war story  using mainline linux  for an android tv bspOstech  war story  using mainline linux  for an android tv bsp
Ostech war story using mainline linux for an android tv bspNeil Armstrong
 
Lcu14 101- coresight overview
Lcu14 101- coresight overviewLcu14 101- coresight overview
Lcu14 101- coresight overviewLinaro
 
P4 to OpenDataPlane Compiler - BUD17-304
P4 to OpenDataPlane Compiler - BUD17-304P4 to OpenDataPlane Compiler - BUD17-304
P4 to OpenDataPlane Compiler - BUD17-304Linaro
 
HKG18-411 - Introduction to OpenAMP which is an open source solution for hete...
HKG18-411 - Introduction to OpenAMP which is an open source solution for hete...HKG18-411 - Introduction to OpenAMP which is an open source solution for hete...
HKG18-411 - Introduction to OpenAMP which is an open source solution for hete...Linaro
 
Andrea Righi - Spying on the Linux kernel for fun and profit
Andrea Righi - Spying on the Linux kernel for fun and profitAndrea Righi - Spying on the Linux kernel for fun and profit
Andrea Righi - Spying on the Linux kernel for fun and profitlinuxlab_conf
 
Emerging Persistent Memory Hardware and ZUFS - PM-based File Systems in User ...
Emerging Persistent Memory Hardware and ZUFS - PM-based File Systems in User ...Emerging Persistent Memory Hardware and ZUFS - PM-based File Systems in User ...
Emerging Persistent Memory Hardware and ZUFS - PM-based File Systems in User ...Kernel TLV
 
MOVED: RDK/WPE Port on DB410C - SFO17-206
MOVED: RDK/WPE Port on DB410C - SFO17-206MOVED: RDK/WPE Port on DB410C - SFO17-206
MOVED: RDK/WPE Port on DB410C - SFO17-206Linaro
 
BKK16-304 The State of GDB on AArch64
BKK16-304 The State of GDB on AArch64BKK16-304 The State of GDB on AArch64
BKK16-304 The State of GDB on AArch64Linaro
 
LAS16-211: Using LAVA V2 for advanced KVM testing
LAS16-211: Using LAVA V2 for advanced KVM testingLAS16-211: Using LAVA V2 for advanced KVM testing
LAS16-211: Using LAVA V2 for advanced KVM testingLinaro
 
LAS16-TR03: Upstreaming 201
LAS16-TR03: Upstreaming 201LAS16-TR03: Upstreaming 201
LAS16-TR03: Upstreaming 201Linaro
 
BUD17-104: Scripting Languages in IoT: Challenges and Approaches
BUD17-104: Scripting Languages in IoT: Challenges and ApproachesBUD17-104: Scripting Languages in IoT: Challenges and Approaches
BUD17-104: Scripting Languages in IoT: Challenges and ApproachesLinaro
 
Mirko Damiani - An Embedded soft real time distributed system in Go
Mirko Damiani - An Embedded soft real time distributed system in GoMirko Damiani - An Embedded soft real time distributed system in Go
Mirko Damiani - An Embedded soft real time distributed system in Golinuxlab_conf
 
Las16 309 - lua jit arm64 port - status
Las16 309 - lua jit arm64 port - statusLas16 309 - lua jit arm64 port - status
Las16 309 - lua jit arm64 port - statusLinaro
 

Was ist angesagt? (20)

BKK16-303 96Boards - TV Platform
BKK16-303 96Boards - TV PlatformBKK16-303 96Boards - TV Platform
BKK16-303 96Boards - TV Platform
 
LAS16-405:OpenDataPlane: Software Defined Dataplane leader
LAS16-405:OpenDataPlane: Software Defined Dataplane leaderLAS16-405:OpenDataPlane: Software Defined Dataplane leader
LAS16-405:OpenDataPlane: Software Defined Dataplane leader
 
LAS16-310: Introducing the first 96Boards TV Platform: Poplar by Hisilicon
LAS16-310: Introducing the first 96Boards TV Platform: Poplar by HisiliconLAS16-310: Introducing the first 96Boards TV Platform: Poplar by Hisilicon
LAS16-310: Introducing the first 96Boards TV Platform: Poplar by Hisilicon
 
Las16 200 - firmware summit - ras what is it- why do we need it
Las16 200 - firmware summit - ras what is it- why do we need itLas16 200 - firmware summit - ras what is it- why do we need it
Las16 200 - firmware summit - ras what is it- why do we need it
 
Linux-wpan: IEEE 802.15.4 and 6LoWPAN in the Linux Kernel - BUD17-120
Linux-wpan: IEEE 802.15.4 and 6LoWPAN in the Linux Kernel - BUD17-120Linux-wpan: IEEE 802.15.4 and 6LoWPAN in the Linux Kernel - BUD17-120
Linux-wpan: IEEE 802.15.4 and 6LoWPAN in the Linux Kernel - BUD17-120
 
BUD17 Socionext SC2A11 ARM Server SoC
BUD17 Socionext SC2A11 ARM Server SoCBUD17 Socionext SC2A11 ARM Server SoC
BUD17 Socionext SC2A11 ARM Server SoC
 
Ostech war story using mainline linux for an android tv bsp
Ostech  war story  using mainline linux  for an android tv bspOstech  war story  using mainline linux  for an android tv bsp
Ostech war story using mainline linux for an android tv bsp
 
Lcu14 101- coresight overview
Lcu14 101- coresight overviewLcu14 101- coresight overview
Lcu14 101- coresight overview
 
P4 to OpenDataPlane Compiler - BUD17-304
P4 to OpenDataPlane Compiler - BUD17-304P4 to OpenDataPlane Compiler - BUD17-304
P4 to OpenDataPlane Compiler - BUD17-304
 
Foss Gadgematics
Foss GadgematicsFoss Gadgematics
Foss Gadgematics
 
HKG18-411 - Introduction to OpenAMP which is an open source solution for hete...
HKG18-411 - Introduction to OpenAMP which is an open source solution for hete...HKG18-411 - Introduction to OpenAMP which is an open source solution for hete...
HKG18-411 - Introduction to OpenAMP which is an open source solution for hete...
 
Andrea Righi - Spying on the Linux kernel for fun and profit
Andrea Righi - Spying on the Linux kernel for fun and profitAndrea Righi - Spying on the Linux kernel for fun and profit
Andrea Righi - Spying on the Linux kernel for fun and profit
 
Emerging Persistent Memory Hardware and ZUFS - PM-based File Systems in User ...
Emerging Persistent Memory Hardware and ZUFS - PM-based File Systems in User ...Emerging Persistent Memory Hardware and ZUFS - PM-based File Systems in User ...
Emerging Persistent Memory Hardware and ZUFS - PM-based File Systems in User ...
 
MOVED: RDK/WPE Port on DB410C - SFO17-206
MOVED: RDK/WPE Port on DB410C - SFO17-206MOVED: RDK/WPE Port on DB410C - SFO17-206
MOVED: RDK/WPE Port on DB410C - SFO17-206
 
BKK16-304 The State of GDB on AArch64
BKK16-304 The State of GDB on AArch64BKK16-304 The State of GDB on AArch64
BKK16-304 The State of GDB on AArch64
 
LAS16-211: Using LAVA V2 for advanced KVM testing
LAS16-211: Using LAVA V2 for advanced KVM testingLAS16-211: Using LAVA V2 for advanced KVM testing
LAS16-211: Using LAVA V2 for advanced KVM testing
 
LAS16-TR03: Upstreaming 201
LAS16-TR03: Upstreaming 201LAS16-TR03: Upstreaming 201
LAS16-TR03: Upstreaming 201
 
BUD17-104: Scripting Languages in IoT: Challenges and Approaches
BUD17-104: Scripting Languages in IoT: Challenges and ApproachesBUD17-104: Scripting Languages in IoT: Challenges and Approaches
BUD17-104: Scripting Languages in IoT: Challenges and Approaches
 
Mirko Damiani - An Embedded soft real time distributed system in Go
Mirko Damiani - An Embedded soft real time distributed system in GoMirko Damiani - An Embedded soft real time distributed system in Go
Mirko Damiani - An Embedded soft real time distributed system in Go
 
Las16 309 - lua jit arm64 port - status
Las16 309 - lua jit arm64 port - statusLas16 309 - lua jit arm64 port - status
Las16 309 - lua jit arm64 port - status
 

Andere mochten auch

Embedded Systems
Embedded SystemsEmbedded Systems
Embedded SystemsSara Morgan
 
Arm système embarqué
Arm système embarquéArm système embarqué
Arm système embarquéHoussem Rouini
 
LAS16-203: Platform security architecture for embedded devices
LAS16-203: Platform security architecture for embedded devicesLAS16-203: Platform security architecture for embedded devices
LAS16-203: Platform security architecture for embedded devicesLinaro
 
Archermind demo for MTK X20 Pro and Mstar TV 96Boards
Archermind demo for MTK X20 Pro and Mstar TV 96BoardsArchermind demo for MTK X20 Pro and Mstar TV 96Boards
Archermind demo for MTK X20 Pro and Mstar TV 96BoardsLinaro
 
Embarquer Linux et des systèmes libres, méthodes et apports
Embarquer Linux et des systèmes libres, méthodes et apportsEmbarquer Linux et des systèmes libres, méthodes et apports
Embarquer Linux et des systèmes libres, méthodes et apportsguest3be047
 
Linux Profiling at Netflix
Linux Profiling at NetflixLinux Profiling at Netflix
Linux Profiling at NetflixBrendan Gregg
 

Andere mochten auch (6)

Embedded Systems
Embedded SystemsEmbedded Systems
Embedded Systems
 
Arm système embarqué
Arm système embarquéArm système embarqué
Arm système embarqué
 
LAS16-203: Platform security architecture for embedded devices
LAS16-203: Platform security architecture for embedded devicesLAS16-203: Platform security architecture for embedded devices
LAS16-203: Platform security architecture for embedded devices
 
Archermind demo for MTK X20 Pro and Mstar TV 96Boards
Archermind demo for MTK X20 Pro and Mstar TV 96BoardsArchermind demo for MTK X20 Pro and Mstar TV 96Boards
Archermind demo for MTK X20 Pro and Mstar TV 96Boards
 
Embarquer Linux et des systèmes libres, méthodes et apports
Embarquer Linux et des systèmes libres, méthodes et apportsEmbarquer Linux et des systèmes libres, méthodes et apports
Embarquer Linux et des systèmes libres, méthodes et apports
 
Linux Profiling at Netflix
Linux Profiling at NetflixLinux Profiling at Netflix
Linux Profiling at Netflix
 

Ähnlich wie BKK16-103 OpenCSD - Open for Business!

LAS16-300: Mini Conference 2 Cortex-M Software - Device Configuration
LAS16-300: Mini Conference 2 Cortex-M Software - Device ConfigurationLAS16-300: Mini Conference 2 Cortex-M Software - Device Configuration
LAS16-300: Mini Conference 2 Cortex-M Software - Device ConfigurationLinaro
 
Intel® RDT Hands-on Lab
Intel® RDT Hands-on LabIntel® RDT Hands-on Lab
Intel® RDT Hands-on LabMichelle Holley
 
Install FD.IO VPP On Intel(r) Architecture & Test with Trex*
Install FD.IO VPP On Intel(r) Architecture & Test with Trex*Install FD.IO VPP On Intel(r) Architecture & Test with Trex*
Install FD.IO VPP On Intel(r) Architecture & Test with Trex*Michelle Holley
 
BPF Hardware Offload Deep Dive
BPF Hardware Offload Deep DiveBPF Hardware Offload Deep Dive
BPF Hardware Offload Deep DiveNetronome
 
DPDK Summit 2015 - Intel - Keith Wiles
DPDK Summit 2015 - Intel - Keith WilesDPDK Summit 2015 - Intel - Keith Wiles
DPDK Summit 2015 - Intel - Keith WilesJim St. Leger
 
Bridging the gap between hardware and software tracing
Bridging the gap between hardware and software tracingBridging the gap between hardware and software tracing
Bridging the gap between hardware and software tracingChristian Babeux
 
Building Network Functions with eBPF & BCC
Building Network Functions with eBPF & BCCBuilding Network Functions with eBPF & BCC
Building Network Functions with eBPF & BCCKernel TLV
 
Rina p4 rina workshop
Rina p4   rina workshopRina p4   rina workshop
Rina p4 rina workshopEduard Grasa
 
CSW2017Richard Johnson_harnessing intel processor trace on windows for vulner...
CSW2017Richard Johnson_harnessing intel processor trace on windows for vulner...CSW2017Richard Johnson_harnessing intel processor trace on windows for vulner...
CSW2017Richard Johnson_harnessing intel processor trace on windows for vulner...CanSecWest
 
Linux io introduction-fudcon-2015-with-demo-slides
Linux io introduction-fudcon-2015-with-demo-slidesLinux io introduction-fudcon-2015-with-demo-slides
Linux io introduction-fudcon-2015-with-demo-slidesKASHISH BHATIA
 
Compiling P4 to XDP, IOVISOR Summit 2017
Compiling P4 to XDP, IOVISOR Summit 2017Compiling P4 to XDP, IOVISOR Summit 2017
Compiling P4 to XDP, IOVISOR Summit 2017Cheng-Chun William Tu
 
Network Programming: Data Plane Development Kit (DPDK)
Network Programming: Data Plane Development Kit (DPDK)Network Programming: Data Plane Development Kit (DPDK)
Network Programming: Data Plane Development Kit (DPDK)Andriy Berestovskyy
 
SF-TAP: Scalable and Flexible Traffic Analysis Platform (USENIX LISA 2015)
SF-TAP: Scalable and Flexible Traffic Analysis Platform (USENIX LISA 2015)SF-TAP: Scalable and Flexible Traffic Analysis Platform (USENIX LISA 2015)
SF-TAP: Scalable and Flexible Traffic Analysis Platform (USENIX LISA 2015)Yuuki Takano
 
Design of 32 Bit Processor Using 8051 and Leon3 (Progress Report)
Design of 32 Bit Processor Using 8051 and Leon3 (Progress Report)Design of 32 Bit Processor Using 8051 and Leon3 (Progress Report)
Design of 32 Bit Processor Using 8051 and Leon3 (Progress Report)Talal Khaliq
 
First Steps Developing Embedded Applications using Heterogeneous Multi-core P...
First Steps Developing Embedded Applications using Heterogeneous Multi-core P...First Steps Developing Embedded Applications using Heterogeneous Multi-core P...
First Steps Developing Embedded Applications using Heterogeneous Multi-core P...Toradex
 
The sunsparc architecture
The sunsparc architectureThe sunsparc architecture
The sunsparc architectureTaha Malampatti
 
Fletcher Framework for Programming FPGA
Fletcher Framework for Programming FPGAFletcher Framework for Programming FPGA
Fletcher Framework for Programming FPGAGanesan Narayanasamy
 
Lec 10-linux-review
Lec 10-linux-reviewLec 10-linux-review
Lec 10-linux-reviewabinaya m
 
Introduction to eBPF and XDP
Introduction to eBPF and XDPIntroduction to eBPF and XDP
Introduction to eBPF and XDPlcplcp1
 

Ähnlich wie BKK16-103 OpenCSD - Open for Business! (20)

LAS16-300: Mini Conference 2 Cortex-M Software - Device Configuration
LAS16-300: Mini Conference 2 Cortex-M Software - Device ConfigurationLAS16-300: Mini Conference 2 Cortex-M Software - Device Configuration
LAS16-300: Mini Conference 2 Cortex-M Software - Device Configuration
 
eBPF Basics
eBPF BasicseBPF Basics
eBPF Basics
 
Intel® RDT Hands-on Lab
Intel® RDT Hands-on LabIntel® RDT Hands-on Lab
Intel® RDT Hands-on Lab
 
Install FD.IO VPP On Intel(r) Architecture & Test with Trex*
Install FD.IO VPP On Intel(r) Architecture & Test with Trex*Install FD.IO VPP On Intel(r) Architecture & Test with Trex*
Install FD.IO VPP On Intel(r) Architecture & Test with Trex*
 
BPF Hardware Offload Deep Dive
BPF Hardware Offload Deep DiveBPF Hardware Offload Deep Dive
BPF Hardware Offload Deep Dive
 
DPDK Summit 2015 - Intel - Keith Wiles
DPDK Summit 2015 - Intel - Keith WilesDPDK Summit 2015 - Intel - Keith Wiles
DPDK Summit 2015 - Intel - Keith Wiles
 
Bridging the gap between hardware and software tracing
Bridging the gap between hardware and software tracingBridging the gap between hardware and software tracing
Bridging the gap between hardware and software tracing
 
Building Network Functions with eBPF & BCC
Building Network Functions with eBPF & BCCBuilding Network Functions with eBPF & BCC
Building Network Functions with eBPF & BCC
 
Rina p4 rina workshop
Rina p4   rina workshopRina p4   rina workshop
Rina p4 rina workshop
 
CSW2017Richard Johnson_harnessing intel processor trace on windows for vulner...
CSW2017Richard Johnson_harnessing intel processor trace on windows for vulner...CSW2017Richard Johnson_harnessing intel processor trace on windows for vulner...
CSW2017Richard Johnson_harnessing intel processor trace on windows for vulner...
 
Linux io introduction-fudcon-2015-with-demo-slides
Linux io introduction-fudcon-2015-with-demo-slidesLinux io introduction-fudcon-2015-with-demo-slides
Linux io introduction-fudcon-2015-with-demo-slides
 
Compiling P4 to XDP, IOVISOR Summit 2017
Compiling P4 to XDP, IOVISOR Summit 2017Compiling P4 to XDP, IOVISOR Summit 2017
Compiling P4 to XDP, IOVISOR Summit 2017
 
Network Programming: Data Plane Development Kit (DPDK)
Network Programming: Data Plane Development Kit (DPDK)Network Programming: Data Plane Development Kit (DPDK)
Network Programming: Data Plane Development Kit (DPDK)
 
SF-TAP: Scalable and Flexible Traffic Analysis Platform (USENIX LISA 2015)
SF-TAP: Scalable and Flexible Traffic Analysis Platform (USENIX LISA 2015)SF-TAP: Scalable and Flexible Traffic Analysis Platform (USENIX LISA 2015)
SF-TAP: Scalable and Flexible Traffic Analysis Platform (USENIX LISA 2015)
 
Design of 32 Bit Processor Using 8051 and Leon3 (Progress Report)
Design of 32 Bit Processor Using 8051 and Leon3 (Progress Report)Design of 32 Bit Processor Using 8051 and Leon3 (Progress Report)
Design of 32 Bit Processor Using 8051 and Leon3 (Progress Report)
 
First Steps Developing Embedded Applications using Heterogeneous Multi-core P...
First Steps Developing Embedded Applications using Heterogeneous Multi-core P...First Steps Developing Embedded Applications using Heterogeneous Multi-core P...
First Steps Developing Embedded Applications using Heterogeneous Multi-core P...
 
The sunsparc architecture
The sunsparc architectureThe sunsparc architecture
The sunsparc architecture
 
Fletcher Framework for Programming FPGA
Fletcher Framework for Programming FPGAFletcher Framework for Programming FPGA
Fletcher Framework for Programming FPGA
 
Lec 10-linux-review
Lec 10-linux-reviewLec 10-linux-review
Lec 10-linux-review
 
Introduction to eBPF and XDP
Introduction to eBPF and XDPIntroduction to eBPF and XDP
Introduction to eBPF and XDP
 

Mehr von Linaro

Deep Learning Neural Network Acceleration at the Edge - Andrea Gallo
Deep Learning Neural Network Acceleration at the Edge - Andrea GalloDeep Learning Neural Network Acceleration at the Edge - Andrea Gallo
Deep Learning Neural Network Acceleration at the Edge - Andrea GalloLinaro
 
Arm Architecture HPC Workshop Santa Clara 2018 - Kanta Vekaria
Arm Architecture HPC Workshop Santa Clara 2018 - Kanta VekariaArm Architecture HPC Workshop Santa Clara 2018 - Kanta Vekaria
Arm Architecture HPC Workshop Santa Clara 2018 - Kanta VekariaLinaro
 
Huawei’s requirements for the ARM based HPC solution readiness - Joshua Mora
Huawei’s requirements for the ARM based HPC solution readiness - Joshua MoraHuawei’s requirements for the ARM based HPC solution readiness - Joshua Mora
Huawei’s requirements for the ARM based HPC solution readiness - Joshua MoraLinaro
 
Bud17 113: distribution ci using qemu and open qa
Bud17 113: distribution ci using qemu and open qaBud17 113: distribution ci using qemu and open qa
Bud17 113: distribution ci using qemu and open qaLinaro
 
OpenHPC Automation with Ansible - Renato Golin - Linaro Arm HPC Workshop 2018
OpenHPC Automation with Ansible - Renato Golin - Linaro Arm HPC Workshop 2018OpenHPC Automation with Ansible - Renato Golin - Linaro Arm HPC Workshop 2018
OpenHPC Automation with Ansible - Renato Golin - Linaro Arm HPC Workshop 2018Linaro
 
HPC network stack on ARM - Linaro HPC Workshop 2018
HPC network stack on ARM - Linaro HPC Workshop 2018HPC network stack on ARM - Linaro HPC Workshop 2018
HPC network stack on ARM - Linaro HPC Workshop 2018Linaro
 
It just keeps getting better - SUSE enablement for Arm - Linaro HPC Workshop ...
It just keeps getting better - SUSE enablement for Arm - Linaro HPC Workshop ...It just keeps getting better - SUSE enablement for Arm - Linaro HPC Workshop ...
It just keeps getting better - SUSE enablement for Arm - Linaro HPC Workshop ...Linaro
 
Intelligent Interconnect Architecture to Enable Next Generation HPC - Linaro ...
Intelligent Interconnect Architecture to Enable Next Generation HPC - Linaro ...Intelligent Interconnect Architecture to Enable Next Generation HPC - Linaro ...
Intelligent Interconnect Architecture to Enable Next Generation HPC - Linaro ...Linaro
 
Yutaka Ishikawa - Post-K and Arm HPC Ecosystem - Linaro Arm HPC Workshop Sant...
Yutaka Ishikawa - Post-K and Arm HPC Ecosystem - Linaro Arm HPC Workshop Sant...Yutaka Ishikawa - Post-K and Arm HPC Ecosystem - Linaro Arm HPC Workshop Sant...
Yutaka Ishikawa - Post-K and Arm HPC Ecosystem - Linaro Arm HPC Workshop Sant...Linaro
 
Andrew J Younge - Vanguard Astra - Petascale Arm Platform for U.S. DOE/ASC Su...
Andrew J Younge - Vanguard Astra - Petascale Arm Platform for U.S. DOE/ASC Su...Andrew J Younge - Vanguard Astra - Petascale Arm Platform for U.S. DOE/ASC Su...
Andrew J Younge - Vanguard Astra - Petascale Arm Platform for U.S. DOE/ASC Su...Linaro
 
HKG18-501 - EAS on Common Kernel 4.14 and getting (much) closer to mainline
HKG18-501 - EAS on Common Kernel 4.14 and getting (much) closer to mainlineHKG18-501 - EAS on Common Kernel 4.14 and getting (much) closer to mainline
HKG18-501 - EAS on Common Kernel 4.14 and getting (much) closer to mainlineLinaro
 
HKG18-100K1 - George Grey: Opening Keynote
HKG18-100K1 - George Grey: Opening KeynoteHKG18-100K1 - George Grey: Opening Keynote
HKG18-100K1 - George Grey: Opening KeynoteLinaro
 
HKG18-318 - OpenAMP Workshop
HKG18-318 - OpenAMP WorkshopHKG18-318 - OpenAMP Workshop
HKG18-318 - OpenAMP WorkshopLinaro
 
HKG18-501 - EAS on Common Kernel 4.14 and getting (much) closer to mainline
HKG18-501 - EAS on Common Kernel 4.14 and getting (much) closer to mainlineHKG18-501 - EAS on Common Kernel 4.14 and getting (much) closer to mainline
HKG18-501 - EAS on Common Kernel 4.14 and getting (much) closer to mainlineLinaro
 
HKG18-315 - Why the ecosystem is a wonderful thing, warts and all
HKG18-315 - Why the ecosystem is a wonderful thing, warts and allHKG18-315 - Why the ecosystem is a wonderful thing, warts and all
HKG18-315 - Why the ecosystem is a wonderful thing, warts and allLinaro
 
HKG18- 115 - Partitioning ARM Systems with the Jailhouse Hypervisor
HKG18- 115 - Partitioning ARM Systems with the Jailhouse HypervisorHKG18- 115 - Partitioning ARM Systems with the Jailhouse Hypervisor
HKG18- 115 - Partitioning ARM Systems with the Jailhouse HypervisorLinaro
 
HKG18-TR08 - Upstreaming SVE in QEMU
HKG18-TR08 - Upstreaming SVE in QEMUHKG18-TR08 - Upstreaming SVE in QEMU
HKG18-TR08 - Upstreaming SVE in QEMULinaro
 
HKG18-113- Secure Data Path work with i.MX8M
HKG18-113- Secure Data Path work with i.MX8MHKG18-113- Secure Data Path work with i.MX8M
HKG18-113- Secure Data Path work with i.MX8MLinaro
 
HKG18-120 - Devicetree Schema Documentation and Validation
HKG18-120 - Devicetree Schema Documentation and Validation HKG18-120 - Devicetree Schema Documentation and Validation
HKG18-120 - Devicetree Schema Documentation and Validation Linaro
 
HKG18-223 - Trusted FirmwareM: Trusted boot
HKG18-223 - Trusted FirmwareM: Trusted bootHKG18-223 - Trusted FirmwareM: Trusted boot
HKG18-223 - Trusted FirmwareM: Trusted bootLinaro
 

Mehr von Linaro (20)

Deep Learning Neural Network Acceleration at the Edge - Andrea Gallo
Deep Learning Neural Network Acceleration at the Edge - Andrea GalloDeep Learning Neural Network Acceleration at the Edge - Andrea Gallo
Deep Learning Neural Network Acceleration at the Edge - Andrea Gallo
 
Arm Architecture HPC Workshop Santa Clara 2018 - Kanta Vekaria
Arm Architecture HPC Workshop Santa Clara 2018 - Kanta VekariaArm Architecture HPC Workshop Santa Clara 2018 - Kanta Vekaria
Arm Architecture HPC Workshop Santa Clara 2018 - Kanta Vekaria
 
Huawei’s requirements for the ARM based HPC solution readiness - Joshua Mora
Huawei’s requirements for the ARM based HPC solution readiness - Joshua MoraHuawei’s requirements for the ARM based HPC solution readiness - Joshua Mora
Huawei’s requirements for the ARM based HPC solution readiness - Joshua Mora
 
Bud17 113: distribution ci using qemu and open qa
Bud17 113: distribution ci using qemu and open qaBud17 113: distribution ci using qemu and open qa
Bud17 113: distribution ci using qemu and open qa
 
OpenHPC Automation with Ansible - Renato Golin - Linaro Arm HPC Workshop 2018
OpenHPC Automation with Ansible - Renato Golin - Linaro Arm HPC Workshop 2018OpenHPC Automation with Ansible - Renato Golin - Linaro Arm HPC Workshop 2018
OpenHPC Automation with Ansible - Renato Golin - Linaro Arm HPC Workshop 2018
 
HPC network stack on ARM - Linaro HPC Workshop 2018
HPC network stack on ARM - Linaro HPC Workshop 2018HPC network stack on ARM - Linaro HPC Workshop 2018
HPC network stack on ARM - Linaro HPC Workshop 2018
 
It just keeps getting better - SUSE enablement for Arm - Linaro HPC Workshop ...
It just keeps getting better - SUSE enablement for Arm - Linaro HPC Workshop ...It just keeps getting better - SUSE enablement for Arm - Linaro HPC Workshop ...
It just keeps getting better - SUSE enablement for Arm - Linaro HPC Workshop ...
 
Intelligent Interconnect Architecture to Enable Next Generation HPC - Linaro ...
Intelligent Interconnect Architecture to Enable Next Generation HPC - Linaro ...Intelligent Interconnect Architecture to Enable Next Generation HPC - Linaro ...
Intelligent Interconnect Architecture to Enable Next Generation HPC - Linaro ...
 
Yutaka Ishikawa - Post-K and Arm HPC Ecosystem - Linaro Arm HPC Workshop Sant...
Yutaka Ishikawa - Post-K and Arm HPC Ecosystem - Linaro Arm HPC Workshop Sant...Yutaka Ishikawa - Post-K and Arm HPC Ecosystem - Linaro Arm HPC Workshop Sant...
Yutaka Ishikawa - Post-K and Arm HPC Ecosystem - Linaro Arm HPC Workshop Sant...
 
Andrew J Younge - Vanguard Astra - Petascale Arm Platform for U.S. DOE/ASC Su...
Andrew J Younge - Vanguard Astra - Petascale Arm Platform for U.S. DOE/ASC Su...Andrew J Younge - Vanguard Astra - Petascale Arm Platform for U.S. DOE/ASC Su...
Andrew J Younge - Vanguard Astra - Petascale Arm Platform for U.S. DOE/ASC Su...
 
HKG18-501 - EAS on Common Kernel 4.14 and getting (much) closer to mainline
HKG18-501 - EAS on Common Kernel 4.14 and getting (much) closer to mainlineHKG18-501 - EAS on Common Kernel 4.14 and getting (much) closer to mainline
HKG18-501 - EAS on Common Kernel 4.14 and getting (much) closer to mainline
 
HKG18-100K1 - George Grey: Opening Keynote
HKG18-100K1 - George Grey: Opening KeynoteHKG18-100K1 - George Grey: Opening Keynote
HKG18-100K1 - George Grey: Opening Keynote
 
HKG18-318 - OpenAMP Workshop
HKG18-318 - OpenAMP WorkshopHKG18-318 - OpenAMP Workshop
HKG18-318 - OpenAMP Workshop
 
HKG18-501 - EAS on Common Kernel 4.14 and getting (much) closer to mainline
HKG18-501 - EAS on Common Kernel 4.14 and getting (much) closer to mainlineHKG18-501 - EAS on Common Kernel 4.14 and getting (much) closer to mainline
HKG18-501 - EAS on Common Kernel 4.14 and getting (much) closer to mainline
 
HKG18-315 - Why the ecosystem is a wonderful thing, warts and all
HKG18-315 - Why the ecosystem is a wonderful thing, warts and allHKG18-315 - Why the ecosystem is a wonderful thing, warts and all
HKG18-315 - Why the ecosystem is a wonderful thing, warts and all
 
HKG18- 115 - Partitioning ARM Systems with the Jailhouse Hypervisor
HKG18- 115 - Partitioning ARM Systems with the Jailhouse HypervisorHKG18- 115 - Partitioning ARM Systems with the Jailhouse Hypervisor
HKG18- 115 - Partitioning ARM Systems with the Jailhouse Hypervisor
 
HKG18-TR08 - Upstreaming SVE in QEMU
HKG18-TR08 - Upstreaming SVE in QEMUHKG18-TR08 - Upstreaming SVE in QEMU
HKG18-TR08 - Upstreaming SVE in QEMU
 
HKG18-113- Secure Data Path work with i.MX8M
HKG18-113- Secure Data Path work with i.MX8MHKG18-113- Secure Data Path work with i.MX8M
HKG18-113- Secure Data Path work with i.MX8M
 
HKG18-120 - Devicetree Schema Documentation and Validation
HKG18-120 - Devicetree Schema Documentation and Validation HKG18-120 - Devicetree Schema Documentation and Validation
HKG18-120 - Devicetree Schema Documentation and Validation
 
HKG18-223 - Trusted FirmwareM: Trusted boot
HKG18-223 - Trusted FirmwareM: Trusted bootHKG18-223 - Trusted FirmwareM: Trusted boot
HKG18-223 - Trusted FirmwareM: Trusted boot
 

Kürzlich hochgeladen

Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesKari Kakkonen
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Farhan Tariq
 
Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Hiroshi SHIBATA
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfLoriGlavin3
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
Generative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfGenerative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfIngrid Airi González
 
Top 10 Hubspot Development Companies in 2024
Top 10 Hubspot Development Companies in 2024Top 10 Hubspot Development Companies in 2024
Top 10 Hubspot Development Companies in 2024TopCSSGallery
 
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesThousandEyes
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxLoriGlavin3
 
A Framework for Development in the AI Age
A Framework for Development in the AI AgeA Framework for Development in the AI Age
A Framework for Development in the AI AgeCprime
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
Zeshan Sattar- Assessing the skill requirements and industry expectations for...
Zeshan Sattar- Assessing the skill requirements and industry expectations for...Zeshan Sattar- Assessing the skill requirements and industry expectations for...
Zeshan Sattar- Assessing the skill requirements and industry expectations for...itnewsafrica
 
Connecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfConnecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfNeo4j
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxLoriGlavin3
 
Potential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsPotential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsRavi Sanghani
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersNicole Novielli
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxLoriGlavin3
 
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality AssuranceInflectra
 

Kürzlich hochgeladen (20)

Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examples
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...
 
Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdf
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
Generative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfGenerative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdf
 
Top 10 Hubspot Development Companies in 2024
Top 10 Hubspot Development Companies in 2024Top 10 Hubspot Development Companies in 2024
Top 10 Hubspot Development Companies in 2024
 
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
 
A Framework for Development in the AI Age
A Framework for Development in the AI AgeA Framework for Development in the AI Age
A Framework for Development in the AI Age
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
Zeshan Sattar- Assessing the skill requirements and industry expectations for...
Zeshan Sattar- Assessing the skill requirements and industry expectations for...Zeshan Sattar- Assessing the skill requirements and industry expectations for...
Zeshan Sattar- Assessing the skill requirements and industry expectations for...
 
Connecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfConnecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdf
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
 
Potential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsPotential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and Insights
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software Developers
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
 
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
 

BKK16-103 OpenCSD - Open for Business!

  • 1. Presented by Date Event CoreSight/OpenCSD - Open for Business CoreSight trace decoding with Perf and OpenCSD Mike Leach Tor Jeremiassen Mathieu Poirier BKK16-103 7th March 2016 Linaro Connect BKK16
  • 2. Topics Covered • A brief overview of the CoreSight technology • Using CoreSight on Linux • OpenCSD project – the decoder library, progress and programming. • Using Perf to decode and render trace information.
  • 3. What is CoreSight? ● CoreSight is a set of IP blocks enabling HW assisted program flow tracing in an SoC. ● Using CoreSight, it is possible to know the exact code path a program took, in both user and kernel space, including interruptions. ● CoreSight tracers record branch point rather than all executed instructions. Using object files and libraries it is possible to reconstruct the execution path. ● Each CoreSight implementation is different and tailored to specific SoC tracing requirement. ● Implementation will typically have a HW tracer per CPU core, and series of “links” connecting tracers to “sinks”. ● Sinks are entities collecting trace data, either in an internal memory buffer or system memory.
  • 4. CoreSight Trace : Hardware
  • 5. Why CoreSight? ● Tracing has minimal to no impact on the system timing. ● Does not require any external component or cable to be connected to a system. ● Can be used in “live” systems without impact of reconfiguration. ● Each CoreSight implementation is different and tailored to specific SoC tracing requirement. ● Implementation will typically have a HW tracer per CPU core, and series of “links” connecting tracers to “sinks”. ● Sinks are entities collecting trace data, either in an internal memory buffer or system memory.
  • 6. Using CoreSight on Linux ● Support for most CoreSight IP blocks have been available upstream since 3.19. ○ Everything is under: $(KERNEL)/drivers/hwtracing/coresight/ ● The upstream solution provides an extensible framework to support different kind of topology. Everything is driven via DT. ● Two ways of using CoreSight: ○ Using sysFS. ○ Using the Perf infrastructure. ● Reference platform supported: ○ Versatile Express (TC2) ○ Juno-r1 (Extra DT needed) ○ Pandaboard (OMAP4430, extra patches needed) ● Get in touch with me for the extra patches.
  • 7. CoreSight on Linux using sysFS ● Really a “Build your own trace kit” method. ● The CoreSight Access Library (CSAL) can be used for programming the tracers. More on that topic later in the presentation. ● Trace data need to be collected and fed to openCSD. ● Everything is driven via sysFS. ● Why not simply using Perf? ○ Some use case simply can’t be addressed by Perf.
  • 8. CoreSight driven from sysFS linaro@linaro-nano:/sys/bus/coresight/devices$ ls 20010000.etf 20040000.main_funnel 22040000.etm 22140000.etm 230c0000. A53_funnel 23240000.etm replicator@20020000 20030000.tpiu 20070000.etr 220c0000.A57_funnel 23040000.etm 23140000.etm 23340000.etm linaro@linaro-nano:/sys/bus/coresight/devices$ linaro@linaro-nano:/sys/bus/coresight/devices$ ls 22040000.etm/ | wc -l 52 linaro@linaro-nano:/sys/bus/coresight/devices$
  • 9. CoreSight driven from Perf linaro@linaro-nano:~/kernel$ ./tools/perf/perf record -v -e cs_etm//u --per-thread uname mmap size 266240B Linux [ perf record: Woken up 1 times to write data ] failed to write feature 8 failed to write feature 9 failed to write feature 14 [ perf record: Captured and wrote 0.072 MB perf.data ] linaro@linaro-nano:~/kernel$ ls -lh perf.data ~/.debug/ -rw------- 1 linaro linaro 77K Feb 28 17:47 perf.data /home/linaro/.debug/: total 16K drwxr-xr-x 2 linaro linaro 4.0K Feb 24 19:21 [kernel.kallsyms] drwxr-xr-x 2 linaro linaro 4.0K Feb 24 19:21 [vdso] drwxr-xr-x 3 linaro linaro 4.0K Feb 24 19:21 bin drwxr-xr-x 3 linaro linaro 4.0K Feb 24 19:21 lib
  • 10. Famous Last Words ● When using the CoreSight framework in either Perf or sysFS mode, CPUidle MUST be disabled. ● Why? ○ Because ETMv3/4 tracers USUALLY share the same power domain. If a CPU is suspended in a deep state, configuration of the tracers is lost. ● The same problem exists for other PMU, interrupt controller and CCIs. Anything that is sharing a power domain with a CPU will be affected the same way. ● It is being worked on in the community - currently no available solution. ● Linaro rather disable CPUidle than introduce a hack that needs to be undone.
  • 11. OpenCSD Library • Designed to decode the different CoreSight Trace source protocols into generic trace packets. Implemented in C++ with C wrapper API. • Platforms supported are native ARM (Linux and bare metal), x86/x64 Linux and Windows. • Three stage decode:- De-multiplex:– split combined trace frames into individual trace source byte streams. Packet Process:– split the source byte stream into individual protocol packet stream. Packet Decode:– decode packet stream into a set of generic trace packets. • Generic trace packets consist of instruction ranges executed, core state and other packets describing program flow. • Library provides a “Decode Tree” API which manages decode for a single trace sink. Creates a demuxer and decoders according to the “Trace Source Config” data used to program the hardware. Client program must also provide memory images to allow the decoder to access the opcodes traced for full instruction execution flow.
  • 12. OpenCSD: Library in Use 1) Client Application creates a Decode Tree for trace data from a single sink. 2) Protocol Decoders are created from the SW Trace Source Config data used to program up the hardware. 3) Client program provides memory images, in the form of memory buffers or files to represent the areas of code executed in the trace run. 4) Trace data is then pushed through the decoder, trace elements are output via a callback into the client program. 5) Client program processes the trace elements as required (e.g. Generate disassembly, record coverage data) Note: Not all sources in a trace data file need to be decoded. The de-mux will ignore sources without an attached decoder
  • 13. OpenCSD: test and debug • For test and debug purposes, the library provides APIs to convert protocol packets and generic packets into a human readable string format. • This string format is used in the output of the library test application “trc_pkt_lister ”, and is also available from the perf report / perf script outputs as an option. • trc_pkt_lister example below: Idx:1643; ID:10; [0x00 0xf7 0x95 0xa2 0xa5 0xdb ]; I_NOT_SYNC : I Stream not synchronised Idx:1650; ID:10; [0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x80 ]; I_ASYNC : Alignment Synchronisation. Idx:1662; ID:10; [0x01 0x01 0x00 ]; I_TRACE_INFO : Trace Info. Idx:1666; ID:10; [0x9d 0x00 0x35 0x09 0x00 0xc0 0xff 0xff 0xff ]; I_ADDR_L_64IS0 : Address, Long, 64 bit, IS0.; Addr=0xFFFFFFC000096A00; Idx:1675; ID:10; [0x04 ]; I_TRACE_ON : Trace On. Idx:1676; ID:10; [0x85 0x00 0x35 0x09 0x00 0xc0 0xff 0xff 0xff 0xf1 0x00 0x00 0x00 0x00 0x00 ]; I_ADDR_CTXT_L_64IS0 : Address & Context, Long, 64 bit, IS0.; Addr=0xFFFFFFC000096A00; Ctxt: AArch64,EL1, NS; CID=0x00000000; VMID=0x0000; Idx:1692; ID:10; [0xf7 ]; I_ATOM_F1 : Atom format 1.; E Idx:1675; ID:10; RCTDL_GEN_TRC_ELEM_TRACE_ON( [begin or filter]) Idx:1676; ID:10; RCTDL_GEN_TRC_ELEM_PE_CONTEXT(EL1N; AArch64; VMID=0x0; CTXTID=0x0; ) Idx:1692; ID:10; RCTDL_GEN_TRC_ELEM_INSTR_RANGE(exec range=0xffffffc000096a00:[0xffffffc000096a10] E ISB )
  • 14. OpenCSD : trace protocols and support level ETMv4 – Instruction: Full decode (limited configuration). ETMv4 – Data: None. ETMv3 – Instruction: Packet processing. ETMv3 – Data: Packet processing. PTMv1 – Instruction: Full decode (limited configuration). STM – SW trace: Packet processing. ITM – SW trace: None. The intention is to bring all above protocols to the full decode level. Priority being given to instruction trace and STM as data trace is not present on A class Cortex cores. Note: Limited configuration above means that there are certain programmable configuration options on the ETM hardware that the decoder does not yet support. e.g. Return stack.
  • 15. Custom Application: trace capture and decode • Application must program the CoreSight trace hardware according to requirements. Options are: - A) Use the sysfs interface in Linux. Requires detailed knowledge of CoreSight hardware and operation. B) Use the CoreSight Access Library (CSAL) from ARM. Higher level library designed to ease direct programming of CS Hardware. CSAL can be used in Linux environment or on bare metal. • Application is responsible for initiating and halting trace. Programming CTI components to propagate trace halt can help here. • Application then must collect the trace and decode using OpenCSD, as described above. Note: CSAL is an open source library available from ARM providing a programming API for CoreSight hardware. Presently the library back-end requires the CS components to be mmap()’ed into user space. An updated back end using the sysfs on linux is planned. Library is released under the Apache licence. It is expected to be made available on Github soon.
  • 16. CoreSight Tracing with perf Two step process: ● perf record ○ Configures trace unit ○ Manages collection of the compressed trace data ○ Produces perf.data file and populates .debug/ with collateral files ● perf report and/or perf script ○ Parses perf.data file and uses the collected trace information and the collateral files in .debug/ to expand the collected trace. ○ report provides a text based interface to analyze the data ○ script either dumps the raw events or passes them to a script for further processing.
  • 17. The perf.data File All trace data and information about the execution of a program is collected in the perf.data file: ● Host system information ○ Number of processors, ISA (instruction set arch), processor topology ○ Operating system version ● Name(s) of all libraries and executable files and their locations in memory during the data collection. ● Description of what was traced. ● Actual trace data. ● Links between file names and build_id’s ○ build-id is a 160 bit unique id attached to each executable/lib
  • 18. The magic.debug/ directory ● To avoid duplicating information the actual executable files (and libraries) are not stored in the perf.data file, but are stored in the .debug directory, usually $HOME/.debug ● Files are stored under their build-id’s, such that multiple versions of the “same” executable can be stored without conflict ○ Traces collected for different versions of a program refer to different build-id’s and thus can coexist with a single .debug/ directory ● Exception: ○ The kernel file (vmlinux) is not stored in .debug/ (though some symbols extracted from it are stored in [kernel.kallsyms]) ○ A path to the kernel must be passed to perf (report/script) if kernel space trace decoding is required.
  • 19. perf report / script Trace Decoding in report/script perf.data configuration trace data Protocol Specific Trace Decoder Extract trace data from perf.data sections .debug/* vmlinux Read instruction words from exe/lib files Generate perf samples Mem req’s Inst. data Parse config and create decoder instance Trace data Instruction ranges config
  • 20. % perf report Note, symbol information available when perf is compiled with elfutils available. Samples: 114K of event 'instructions:u', Event count (approx.): 519690 Children Self Command Shared Object Symbol 10.46% 10.46% uname libc-2.21.so [.] strlen 9.66% 9.66% uname libc-2.21.so [.] _dl_addr 6.43% 6.43% uname libc-2.21.so [.] strcmp 4.52% 4.52% uname libc-2.21.so [.] malloc 3.38% 3.38% uname libc-2.21.so [.] memcpy 2.42% 2.42% uname libc-2.21.so [.] __stpcpy 1.85% 1.85% uname libc-2.21.so [.] memchr 1.59% 1.59% uname ld-2.21.so [.] 0x0000a7f4 1.40% 1.40% uname libc-2.21.so [.] __rawmemchr 1.32% 1.32% uname libc-2.21.so [.] 0x0002f0c0 1.19% 1.19% uname ld-2.21.so [.] 0x00008eb8 1.14% 1.14% uname ld-2.21.so [.] 0x00016888 1.04% 1.04% uname libc-2.21.so [.] 0x00072520 0.95% 0.95% uname libc-2.21.so [.] free 0.94% 0.94% uname libc-2.21.so [.] getenv
  • 21. % perf report --sort dso Samples: 114K of event 'instructions:u', Event count (approx.): 519690 Children Self Shared Object 83.37% 83.37% libc-2.21.so 16.53% 16.53% ld-2.21.so 0.09% 0.09% uname
  • 22. % perf script uname 15244 8 instructions:u: 7f89e46f54 fgets_unlocked ([...]/libc-2.21.so) uname 15244 2 instructions:u: 7f89e46f74 fgets_unlocked ([...]/libc-2.21.so) uname 15244 11 instructions:u: 7f89e46f7c fgets_unlocked ([...]/libc-2.21.so) uname 15244 2 instructions:u: 7f89e3e2d8 _IO_getline ([...]/libc-2.21.so) uname 15244 14 instructions:u: 7f89e3e148 _IO_getline_info ([...]/libc-2.21.so) uname 15244 2 instructions:u: 7f89e3e184 _IO_getline_info ([...]/libc-2.21.so) uname 15244 1 instructions:u: 7f89e3e18c _IO_getline_info ([...]/libc-2.21.so) uname 15244 8 instructions:u: 7f89e3e190 _IO_getline_info ([...]/libc-2.21.so) uname 15244 5 instructions:u: 7f89e3e1b0 _IO_getline_info ([...]/libc-2.21.so) ... ● Note, not all fields of the trace event is returned by default, here the fields are: ○ comm, tid, period, event, ip, sym, dso ● Additional fields are available: ○ pid, time, cpu, trace, addr, symoff, iregs, brstack, brstacksym, flags ● Address range from trace is (ip, addr)
  • 23. % perf script -F comm,addr,ip,sym,dso uname 8 7f89e46f74 7f89e46f54 fgets_unlocked (/[...]/libc-2.21.so) uname 2 7f89e46f7c 7f89e46f74 fgets_unlocked (/[...]/libc-2.21.so) uname 11 7f89e46fa8 7f89e46f7c fgets_unlocked (/[...]/libc-2.21.so) uname 2 7f89e3e2e0 7f89e3e2d8 _IO_getline (/[...]/libc-2.21.so) uname 14 7f89e3e180 7f89e3e148 _IO_getline_info (/[...]/libc-2.21.so) uname 2 7f89e3e18c 7f89e3e184 _IO_getline_info (/[...]/libc-2.21.so) uname 3 7f89e3e294 7f89e3e288 _IO_getline_info (/[...]/libc-2.21.so) uname 1 7f89e3e190 7f89e3e18c _IO_getline_info (/[...]/libc-2.21.so) uname 8 7f89e3e1b0 7f89e3e190 _IO_getline_info (/[...]/libc-2.21.so) Note, addr is always listed before the ip field, so the range is listed “backwards”. Range is not inclusive - the addr field marks the address after the last instruction. Script output can be piped to other scripts/progs for further processing.
  • 24. perf script scripting ● perf script can call scripts in python or perl directly. ● Specific functions are called within the script ○ trace_before() ○ trace_end() ○ process_event(t) ○ trace_unhandled(...) ● More detailed information is available inside the script process_event() function than with command line perf script
  • 25. echo-script.py def process_event(t) print t Output (per line): {'attr': 'x06x00...x00x00x00', 'sample': {'addr': 547609259400L, 'ip': 547609259392L, 'pid': 3773, 'period': 2L, 'time': 0L, 'tid': 3773, 'cpu': 4294967295}, 'dso': '/lib/aarch64-linux-gnu/ld-2.21.so', 'comm': 'uname', 'ev_name': 'cs_etm//u', 'raw_buf': '', 'callchain': []}
  • 26. cs-trace-disasm.py ● A script that provides a disassembly of the instruction trace ○ Calls perf buildid-list to get list of object files ○ Calls perf script --show-mmap-events to collect information about which object files were used and where in memory they were allocated during execution (.so files don’t have a start address) ○ For each trace address range generate disassembly by calling : ■ objdump -d --start-address=<ip> --stop- address=<addr> ○ Filters and prints the generated disassembly to stdout. ■ Removes blank lines, header information for each invocation ○ Caches decoded address ranges to improve runtime
  • 27. cs-trace-disasm.py - Example Output 401bb8: d280001d mov x29, #0x0 // #0 401bbc: d280001e mov x30, #0x0 // #0 401bc0: 910003fd mov x29, sp 401bc4: aa0003e5 mov x5, x0 401bc8: f94003e1 ldr x1, [sp] 401bcc: 910023e2 add x2, sp, #0x8 401bd0: 910003e6 mov x6, sp 401bd4: 580000a0 ldr x0, 401be8 <setlocale@plt+0x4e8> 401bd8: 580000c3 ldr x3, 401bf0 <setlocale@plt+0x4f0> 401bdc: 580000e4 ldr x4, 401bf8 <setlocale@plt+0x4f8> 401be0: 97fffe38 bl 4014c0 <__libc_start_main@plt> 4014c0: b00000b0 adrp x16, 416000 <setlocale@plt+0x14900> 4014c4: f9404a11 ldr x17, [x16,#144] 4014c8: 91024210 add x16, x16, #0x90 4014cc: d61f0220 br x17 401380: a9bf7bf0 stp x16, x30, [sp,#-16]! 401384: 900000b0 adrp x16, 415000 <setlocale@plt+0x13900>
  • 28. Current Project Status ● Everything that was presented today is available on github [1]. ● Instructions on how to setup the environment and use the Perf methods can be found in the HOWTO file on branch opencsd-bkk16. ● The work that integrates the CoreSight framework to Perf has been accepted for the 4.6 merge window. ● Upstreaming of the work to support for ETMv4 and TMC via Perf has started. ● All the user space “perf tools” is on github but upstreaming of that code hasn’t started yet.
  • 29. Question and Comments? [1]. https://github.com/Linaro/OpenCSD branch opencsd-bkk16