Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[tracecompass-dev] How to use Trace Compass with perf record/trace

Hi,


I'm to to Trace Compass and I'm trying to use it to analyze traces collected on standard Linux kernel using perf. I'm particularly interested in visualizing the time each application thread spends in userspace, syscalls and when scheduled out of CPUs.

The first attempt I made was using perf record and then converting to CTF, however it seems Ubuntu did not compile CTF data conversion into perf:

$ sudo perf data convert
No conversion support compiled in.

Do you know if there are other distros that have included CTF conversion capabilities in perf packages?


The second question is related to importing text files into Trace Compass. I have a number of perf trace text outputs that I collected from live production systems that I would like to analyze. I've seen that Trace Compass has the capability to import arbitrary text files, however it is not clear from the guide what are the steps needed to actually import the file and which kind of analysis are supported.

The perf trace output has the following format:

5295.425 ( 2.302 ms): recvfrom(fd: 459<socket:[3282172773]>, ubuf: 0x7feedeff4e90, size: 8  ) = 8
  5295.586 ( 0.034 ms): recvfrom(fd: 459<socket:[3282172773]>, ubuf: 0x7feedeff4e90, size: 4  ) = 4
  5297.259 ( 0.069 ms): write(fd: 468<socket:[3282201926]>, buf: 0x7fedd62c1f68, count: 1954  ) = 1954
  5329.828 (32.545 ms): read(fd: 468<socket:[3282201926]>, buf: 0x7feedeff0900, count: 16384  ) = 16384
  5329.905 ( 0.018 ms): read(fd: 468<socket:[3282201926]>, buf: 0x7feedeff0900, count: 16384  ) = 16384
  5329.961 ( 0.022 ms): read(fd: 468<socket:[3282201926]>, buf: 0x7feedeff0900, count: 16384  ) = 16384
  5330.007 ( 0.018 ms): read(fd: 468<socket:[3282201926]>, buf: 0x7feedeff0900, count: 16384  ) = 16384
  5330.055 ( 0.017 ms): read(fd: 468<socket:[3282201926]>, buf: 0x7feedeff0900, count: 16384  ) = 13726

Interesting bits: first field is timestamp, syscall duration between brackets and then we have the syscall name. Here I have traced a single thread, but if a pid is traced we also have the thread id (tid) in the output.


Is it possible to import a perf trace output and analyze it to see different threads over time with syscall durations, similar to the Control Flow analysis?


Thanks a lot in advance!

Back to the top