[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAH0uvoj7s3V7qby7BxQ9Eby4G562MMsFtbonLJ2L3SF1N7CDng@mail.gmail.com>
Date: Fri, 22 Aug 2025 22:19:26 -0700
From: Howard Chu <howardchu95@...il.com>
To: Namhyung Kim <namhyung@...nel.org>
Cc: Arnaldo Carvalho de Melo <acme@...nel.org>, Ian Rogers <irogers@...gle.com>,
Kan Liang <kan.liang@...ux.intel.com>, Jiri Olsa <jolsa@...nel.org>,
Adrian Hunter <adrian.hunter@...el.com>, Peter Zijlstra <peterz@...radead.org>,
Ingo Molnar <mingo@...nel.org>, LKML <linux-kernel@...r.kernel.org>,
linux-perf-users@...r.kernel.org
Subject: Re: [PATCH] perf trace: Add --max-summary option
Hello Namhyung,
On Wed, Aug 20, 2025 at 5:32 PM Namhyung Kim <namhyung@...nel.org> wrote:
>
> The --max-summary option is to limit the number of output lines for
> syscall summary stats. The max applies to each entries like thread and
> cgroups. For total summary, it will just print up to the given number.
>
> For example,
>
> $ sudo perf trace -as --max-summary 3 sleep 0.1
>
> ThreadPoolServi (1011651), 114 events, 14.8%
>
> syscall calls errors total min avg max stddev
> (msec) (msec) (msec) (msec) (%)
> --------------- -------- ------ -------- --------- --------- --------- ------
> epoll_wait 38 0 95.589 0.000 2.515 11.153 28.98%
> futex 9 0 0.040 0.002 0.004 0.014 28.63%
> read 10 0 0.037 0.003 0.004 0.005 4.67%
>
> sleep (1050529), 250 events, 32.4%
>
> syscall calls errors total min avg max stddev
> (msec) (msec) (msec) (msec) (%)
> --------------- -------- ------ -------- --------- --------- --------- ------
> clock_nanosleep 1 0 100.156 100.156 100.156 100.156 0.00%
> execve 4 3 1.020 0.005 0.255 0.989 95.93%
> openat 36 17 0.416 0.003 0.012 0.029 10.58%
>
> ...
>
> And this is for per-cgroup summary using BPF.
>
> $ sudo perf trace -as --max-summary 3 --summary-mode=cgroup --bpf-summary sleep 0.1
>
> cgroup /user.slice/user-657345.slice/user@...345.service/session.slice/org.gnome.Shell@....service, 12 events
>
> syscall calls errors total min avg max stddev
> (msec) (msec) (msec) (msec) (%)
> --------------- -------- ------ -------- --------- --------- --------- ------
> recvmsg 8 7 0.016 0.001 0.002 0.006 39.73%
> ppoll 1 0 0.014 0.014 0.014 0.014 0.00%
> write 2 0 0.010 0.002 0.005 0.008 61.02%
>
> cgroup /user.slice/user-657345.slice/session-4.scope, 73 events
>
> syscall calls errors total min avg max stddev
> (msec) (msec) (msec) (msec) (%)
> --------------- -------- ------ -------- --------- --------- --------- ------
> epoll_wait 8 0 13.461 0.010 1.683 12.235 89.66%
> ioctl 20 0 0.204 0.001 0.010 0.113 54.01%
> writev 11 0 0.164 0.004 0.015 0.042 20.34%
>
> Signed-off-by: Namhyung Kim <namhyung@...nel.org>
Reviewed-by: Howard Chu <howardchu95@...il.com>
Thanks,
Haowei
Powered by blists - more mailing lists