Overview

The sp-rtrace utility provides function tracing for different resource types and the traced data post-processing and visualization tools.

Trace data includes resource type, size and identification, optional application given context, timestamp and a backtrace for each resource allocation and free. Both the binary and ASCII trace formats are documented. It has plugins for tracking creation & destruction of many different types of objects like memory, file, memtransfer etc. See sp-rtrace -l for a detailed list.

Post-processing can merge identical backtraces, remove freed resources from the trace and has good resolving for backtrace addresses.

Visualization tools outputs resource usage callgraphs, histograms, timelines or (for memory allocation) fragmentation map.

Project Information

  • sp-rtrace is distributed under the terms of the GPLv2+ and LGPLv2+ license

  • the code is managed with git at: git://gitorious.org/maemo-tools/sp-rtrace.git

Installation Instructions

Available by default at the Linaro developer image, and also at the Overlay PPA. To install it at any Linaro image, just run:

sudo apt-get install sp-rtrace

Using sp-rtrace

Generate trace data:

$ sp-rtrace -s -e memory -o /tmp/ -x ls
INFO: Created binary log file /tmp//9798-0.rtrace

Post-process traced data:

$ sp-rtrace-postproc -i /tmp/9798-0.rtrace 
version=2.0, arch=armv7l, timestamp=2011.8.18 07:14:20, process=ls, pid=9798, backtrace depth=10, origin=sp-rtrace 1.8, 
## tracing module: [0] main (1.0)
: /bin/ls => 0x8000-0x19000
: /lib/arm-linux-gnueabi/libattr.so.1.1.0 => 0x40006000-0x40009000
: /lib/arm-linux-gnueabi/ld-2.13.so => 0x40033000-0x40049000
: /lib/arm-linux-gnueabi/librt-2.13.so => 0x40052000-0x40057000
: /lib/arm-linux-gnueabi/libselinux.so.1 => 0x4008b000-0x4009d000
: /lib/arm-linux-gnueabi/libdl-2.13.so => 0x400c2000-0x400c4000
: /lib/arm-linux-gnueabi/libacl.so.1.1.0 => 0x400eb000-0x400f0000

Pointers


CategoryHowTo

Platform/DevPlatform/Tools/Sp-rtrace (last modified 2011-09-21 11:17:59)