Tracing Discussion

ARM Tracing Presentation - Al Grant (ARM)

ARM has Streamline - does nice visualizations, uses sampling

He mentions which is a tool for dynamic code instrumentation. Available under a BSD license.

CoreSight - IP blocks for ARM for debugging, DStream debugger via JTAG. AMBA Trace Bus for core tracing info.

~8 Gbit/s of trace data for a single core

Can use dedicated trace buffer or main memory

ARM and Intel tracing are very similar. Intel has Processor Trace

Program trace - branches, exceptions, data Software trace - messages under program control Hardware event trace - selected signals chosen by CPU designer Common global timestamp for all trace sources

Program trace - like Intel's Last Branch Record

Buffer sizes:

On-chip buffer (8-32 KB) Main memory (e.g., 8 MB) Offchip trace (e.g., 4 GB)

Software Trace Macrocell is like Intel Software Trace Hub

What's the simplest way to get this stuff into FreeBSD? (rwatson)

Integration of the CoreSight libraries. Code is from ARM under an Apache license and the rest is under BSD.

Discussion Topics

DTrace optimizations

Machine-readable output

Distributed DTrace

Documentation/Better frameworks

De-printfifying/Switching to use SDTs

CTF for packages

I/O statistics and other probes

MIB provider and parity with Solaris

Schedgraph and visualization tools

PMC integration, profiling


gprof for other ISAs

Shipping LLVM IR to do profile guided optimization using BTS, etc..


EMC/Isilon clustered UFS appliance. Distributed locking. Latency stats across the distributed system. They use NTP for sync. Uses Itrace.


Dtrace object model - Get Dtrace to spit out some of its internal objects (arrays, etc.).

Need machine readable output

Use python to interact with DTrace objects

Schedgraph++ using DTrace objects

How do you debug IPC between programs? E.g., for chromium (IPCTrace)

New libdtrace needed for this

Can libxo do streaming? Sort of.

How would we incorporate processor stats? Something like PAPI.

libxo does not have schemas, but it might be useful for D to have a schema

CTF has limitations that DWARF doesn't.


Where might we use D'Objects?

D'Objects requirements

DTrace and PMC

Current proposal

fbt::: / / {


Do we integrate stack() with our sampling infrastructure?

hwpmc table





- Lack of DTrace "D" expressions; poor model - PMC atomicity

BEGIN { pmc_alloc() }; ???

- Turn On/Off PMC when entering DIL (DVM)?

How much do we integrate hwpmc with DTrace?


DevSummit/201508/Tracing (last edited 2021-04-25T10:51:41+0000 by JethroNederhof)