trace-cmd 3.4 has been released!
What’s new? The biggest change is that if you record with function or function graph tracer and enable the func-args or funcgraph-args then trace-cmd will save the BTF file (/sys/kernel/btf/vmlinux) in the trace.dat and use it for trace-cmd report to show the functions:
function: mutex_unlock(lock=0xffffffff831dbbe0)
function: __mutex_unlock_slowpath(lock=0xffffffff831dbbe0, ip=0xffffffff814a7154)
function: __f_unlock_pos(f=0xffff8881538de000)
function: mutex_unlock(lock=0xffff8881538de090)
function: __mutex_unlock_slowpath(lock=0xffff8881538de090, ip=0xffffffff816e8ed1)
function: mem_cgroup_handle_over_high(gfp_mask=0xcc0)
Also, if you run trace-cmd extract on a persistent ring buffer, it will save the last_boot_info file (and /proc/modules) and use it to properly calculate the addresses of the functions from the previous boot to the addresses of the same functions of the current boot so that it can properly get their names from the saved kallsyms. This way you can even see all the functions that did the reboot!
boot_mapped: <...>-1 [000] d..1. 6869.910269: function: native_machine_emergency_restart()
boot_mapped: <...>-1 [000] d..1. 6869.910269: function: tboot_shutdown(shutdown_type=0x0)
boot_mapped: <...>-1 [000] d..1. 6869.910269: function: machine_real_restart(type=0x0)
boot_mapped: <...>-1 [000] d..1. 6869.910269: function: _raw_spin_lock(lock=0xffffffff95d03214)
boot_mapped: <...>-1 [000] d..2. 6869.910269: function: rtc_cmos_write(val=0x0, addr=0x8f)
boot_mapped: <...>-1 [000] d..2. 6869.910276: function: _raw_spin_unlock(lock=0xffffffff95d03214)
boot_mapped: <...>-1 [000] d..1. 6869.910277: function: load_trampoline_pgtable()
boot_mapped: <...>-1 [000] d..1. 6869.910277: function: __flush_tlb_all()
boot_mapped: <...>-1 [000] d..1. 6869.910278: function: native_flush_tlb_global()