Messages in this thread | | | From | Alexei Starovoitov <> | Date | Fri, 27 May 2022 07:13:54 -0700 | Subject | Re: [PATCH] procfs: add syscall statistics |
| |
On Fri, May 27, 2022 at 4:10 AM Zhang Yuchen <zhangyuchen.lcr@bytedance.com> wrote: > > Add /proc/syscalls to display percpu syscall count.
I second Peter's nack. We don't add debug features to the production kernel.
> We need a less resource-intensive way to count syscall per cpu > for system problem location. > > There is a similar utility syscount in the BCC project, but syscount > has a high performance cost.
There are two syscount tools in BCC: tools/syscount libbpf-tools/syscount
Which one has this 42% overhead?
The former tool is obsolete though. It was written in the days when bpf had 1/10 of the features it has today. Both tools can be optimized. They attach to raw_syscalls tracepoint. tracepoints are not cheap. In terms of overhead: tracepoint > raw_tracepoint > fentry. bpf can attach to all three.
Please profile libbpf-tools/syscount tool with perf and unixbench, understand where overhead comes from and then optimize the tool.
| |