Jiří Olša, Arnaldo Carvalho de Melo - News from perf land: probe, trace and scripting
Channel: RedHatCzech
Date: 2015-02-09

The Linux 'perf' tools continuously grows in scope as an observability toolchest, with more and more features being added.

In this talk the 'probe' and 'trace' tools will be showcased: the first allows adding dynamic probes in arbitrary points in the kernel and in userspace libraries and programs, collecting global and local variables, as well as callchains, that can then be used in conjunction with the other perf tools: record, top, trace, script, etc.

The later, trace, started as a super strace, one that allows stracing not just threads, but other targets such as the whole system, sets of CPUs, etc, in addition to threads. It also has a much lower overhead as it doesn't use the ptrace syscall. Support for tracing page faults and other events, as well as provide callchains leading to a syscall and other traced events are being planned and may even be ready by devconf'15 time!

An example of integration among perf tools, using 'probe' to allow capturing syscall arguments for pretty printing in 'trace', will be described, showcasing 'wannabe tracepoints', dynamic probes that may end up becoming real tracepoints.

How to use perf support in scripting languages. Explaning how perf interfaces scripting languages and showing practical examples of existing scripts and how to write your own.