• Geneviève Bastien's avatar
    perf data: Add mmap[2] events to CTF conversion · f9f6f2a9
    Geneviève Bastien authored
    This adds the mmap and mmap2 events to the CTF trace obtained from perf
    data.
    
    These events will allow CTF trace visualization tools like Trace Compass
    to automatically resolve the symbols of the callchain to the
    corresponding function or origin library.
    
    To include those events, one needs to convert with the --all option.
    Here follows an output of babeltrace:
    
      $ sudo perf data convert --all --to-ctf myctftrace
      $ babeltrace ./myctftrace
      [19:00:00.000000000] (+0.000000000) perf_mmap2: { cpu_id = 0 },
     { pid = 638, tid = 638, start = 0x7F54AE39E000, filename =
     "/usr/lib/ld-2.25.so" }
      [19:00:00.000000000] (+0.000000000) perf_mmap2: { cpu_id = 0 }, { pid =
     638, tid = 638, start = 0x7F54AE565000, filename =
     "/usr/lib/libudev.so.1.6.6" }
      [19:00:00.000000000] (+0.000000000) perf_mmap2: { cpu_id = 0 }, { pid =
     638, tid = 638, start = 0x7FFC093EA000, filename = "[vdso]" }
    Signed-off-by: default avatarGeneviève Bastien <gbastien@versatic.net>
    Acked-by: default avatarJiri Olsa <jolsa@kernel.org>
    Tested-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
    Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
    Cc: Francis Deslauriers <francis.deslauriers@efficios.com>
    Cc: Julien Desfossez <jdesfossez@efficios.com>
    Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
    Cc: Peter Zijlstra <peterz@infradead.org>
    Link: http://lkml.kernel.org/r/20170727181205.24843-2-gbastien@versatic.netSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
    f9f6f2a9
data-convert-bt.c 39.4 KB