linux-trace-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [ANNOUNCE] uftrace v0.18 is released
@ 2025-07-06  6:22 Namhyung Kim
  0 siblings, 0 replies; only message in thread
From: Namhyung Kim @ 2025-07-06  6:22 UTC (permalink / raw)
  To: uftrace, linux-trace-devel

Hello,

I'm excited to announce that uftrace v0.18 is just released!
This release comes with many bug fixes/updates and some new features.
You can get it from the below link:

https://github.com/namhyung/uftrace/releases/tag/v0.18

The main change in this version is filter condition support which controls
filter behaviors based on the value of an argument.  You can specify the
function and argument with C-style "if" condition.

For example, say you have a program that calculates the fibonacci number.
It'll call the 'fib' function multiple times with different .  You may want
to trace it (and its children) only when the first argument is 2.

    $ uftrace -a -F fib@if:arg1==2  progs/fibonacci
    # DURATION     TID      FUNCTION
                [   5446] | fib(2) {
       0.169 us [   5446] |   fib(1) = 1;
       0.056 us [   5446] |   fib(0) = 1;
       1.524 us [   5446] | } = 2; /* fib */
                [   5446] | fib(2) {
       0.056 us [   5446] |   fib(1) = 1;
       0.053 us [   5446] |   fib(0) = 1;
       0.452 us [   5446] | } = 2; /* fib */
                [   5446] | fib(2) {
       0.079 us [   5446] |   fib(1) = 1;
       0.053 us [   5446] |   fib(0) = 1;
       0.447 us [   5446] | } = 2; /* fib */

You can see `-F` (inclusive function filter) was applied to 'fib' with
condition that value of the first argument is equal to 2.  Of course,
other comparison operators can be used.  But the condition only works
for function name filters like `-F` and `-N`, and only handles integer
arguments as of now.  If the condition is not true, it'll ignore the
filter as if it was not there.

The `-a` option is used just for illustration purpose and it works
even if it doesn't save the arguments.

The next new feature is max/min/avg fields in the graph command.
Like in the report command, users can use `-f`/`--output-fields` option
to specify various fields for total and self times.  This also works in
TUI.

    $ uftrace record  progs/fibonacci
    
    $ uftrace graph -f total-avg,total-max
    # Function Call Graph for 'fibonacci' (session: 9dba9c6c4a0c958f)
    ========== FUNCTION CALL GRAPH ==========
    #  TOTAL AVG   TOTAL MAX   FUNCTION
        7.851 us    7.851 us : (1) fibonacci
        1.404 us    1.404 us :  +-(1) __monstartup
                             :  | 
        0.889 us    0.889 us :  +-(1) __cxa_atexit
                             :  | 
        5.558 us    5.558 us :  +-(1) main
        5.134 us    5.134 us :    (1) fib
        2.301 us    3.396 us :    (2) fib
        0.953 us    2.197 us :    (4) fib
        0.346 us    1.457 us :    (6) fib
        0.162 us    0.199 us :    (2) fib

Also it nows support LTO (Link-Time Optimization) build.  You can
override AR variable during `configure` if needed.

    $ ./configure CFLAGS=-flto AR=gcc-ar

And there are many bug fixes and improvements.  Thank you all for
making uftrace more useful, efficient and portable!

Namhyung

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2025-07-06  6:22 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-07-06  6:22 [ANNOUNCE] uftrace v0.18 is released Namhyung Kim

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).