uftrace v0.20
A new version of uftrace is out with a lot of new features and bug fixes.
New features
Now uftrace replay supports 'callsite' trigger action to display source location of the caller of the current function. This can be
useful when there are many calls to the same function in a single function.
$ uftrace -T getpid@callsite tests/t-abc
# DURATION TID FUNCTION
0.558 us [ 19501] | __monstartup();
0.281 us [ 19501] | __cxa_atexit();
[ 19501] | main() {
[ 19501] | a() {
[ 19501] | b() {
[ 19501] | c() {
0.596 us [ 19501] | getpid(); /* from tests/s-abc.c:23 */
1.083 us [ 19501] | } /* c */
1.279 us [ 19501] | } /* b */
1.403 us [ 19501] | } /* a */
1.583 us [ 19501] | } /* main */
And there are new output fields for uftrace report. They will help to find important information about the execution.
total-max-ts: Timestamp of function entry with maximum total timetotal-min-ts: Timestamp of function entry with minimum total timeself-max-ts: Timestamp of function entry with maximum self timeself-min-ts: Timestamp of function entry with minimum self timecpu-count: Number of CPUs that function ran oncpu-list: List of CPUs that function ran oncpu-mask: Bitmask of CPUs that function ran on
Also uftrace dump adds --format option to specify output instead of the dedicated options like --chrome or --flame-graph. These options was deprecated and will be removed in later version. So please use uftrace dump --format=chrome instead.
- available formats:
chrome,flame-graph,graphviz,mermaid
In addition, a couple of new scripts were added to generate data in other formats like:
- new script: dump-perfetto.py, dump-firefox.py
Other notable changes are improved dynamic tracing on RISC-V, Rust v0 demangler support, uftrace info --system option, Fedora minidebug format support and command-aware help message.
What's Changed
- symbol: Fix build error in elf_for_each_comment() by @junyeong0619 in #2034
- Report: Support max/min timestamp in report output by @junyeong0619 in #2032
- dump: Fix htmlLabels config value to use boolean true for mermaid ren… by @junyeong0619 in #2036
- live: Use $TMPDIR environment variable for temporary directory by @honggyukim in #2030
- dump: Fix chrome --time-range to emit synthetic B/E events at range boundaries by @honggyukim in #2031
- uftrace: allow to use realtime clock for recording by @p-b-o in #2037
- report: Support --format=csv option by @kangtegong in #2041
- info: Add --system option to show system info by @kangtegong in #1847
- demangle,session: Fix compiler warnings by @junyeong0619 in #2042
- dump: Unify output format options under --format=TYPE by @kangtegong in #2044
- report: Add cpu field to show per-function CPU execution info by @junyeong0619 in #2039
- github: Fix exit code of nightly check_commits step by @junyeong0619 in #2046
- mcount: Fix lost diff event from read trigger with argument tracing by @junyeong0619 in #2048
- fix: add bounds check before memcpy in symbol-rawelf.c by @orbisai0security in #2049
- replay: Show callsite location with --srcline by @junyeong0619 in #2047
- misc: Fix minor typos in comment, test and doc by @kangtegong in #2052
- python: Use HDRSZ macro in symtab header size warning by @junyeong0619 in #2053
- uftrace: Show command-specific options and commands in sub-command help by @kangtegong in #2051
- compiler: Implement memory barriers for RISC-V by @dlgus8648 in #2057
- arch/riscv64: Support dynamic tracing with -fpatchable-function-entry by @dlgus8648 in #2058
- misc: Print enum definitions in dbginfo by @kangtegong in #2061
- script: Support the Firefox Profiler by @kangtegong in #2062
- utils: fix asprintf return value check in Android uftrace_shmem_unlink by @MiliAxe in #2063
- uftrace: Fix debuginfod remote waiting by @honggyukim in #2068
- Release v0.20 by @namhyung in #2064
New Contributors
- @p-b-o made their first contribution in #2037
- @orbisai0security made their first contribution in #2049
- @dlgus8648 made their first contribution in #2057
- @MiliAxe made their first contribution in #2063
Full Changelog: v0.19...v0.20