[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
[tracecompass-dev] CTF support merged in upstream perf
|
Hi all,
Just mentioning that the support for converting perf traces to the CTF
format was merged in Linux upstream, and should be part of Linux 4.1.
Cheers!
Such traces can then be opened in Trace Compass, and should display the
same kind of information as an LTTng kernel trace (Control Flow,
Resource View, CPU usage, etc.)
One caveat right now is that if you use "raw_syscalls" events, Trace
Compass will not show the system call names, only the blue state
"syscall". A potential improvement could be to import the
per-architecture system call tables in Trace Compass' code, so that we
could get the names from the IDs.
It might take a while to get into distros, so here's a quick guide if
you want to try it out:
Build and install libbabeltrace:
git clone http://git.linuxfoundation.org/diamon/babeltrace.git
cd babeltrace/
./bootstrap
./configure --prefix=/usr/local
make && sudo make install
Next grab the latest kernel code:
git clone
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git --depth
1000
cd linux/
make localmodconfig # or use an existing .config file, etc.
make deb-pkg # or "rpm-pkg", depending on your distro
(install the packages)
(reboot into the new kernel)
Then go back into the linux/ repository and compile perf:
cd tools/perf/
LIBBABELTRACE=1 LIBBABELTRACE_DIR=/usr/local make
You can now take traces and convert them to CTF:
sudo ./perf record -e 'sched:*,raw_syscalls:*' -a
(Ctrl+C)
sudo ./perf data convert --to-ctf=./ctf-trace
Finally, you can load "ctf-trace" into Trace Compass (you might have to
'chown' it to your user), and it should get recognized as a Linux Kernel
Trace.
Happy tracing!
Thanks,
Alexandre