Re: [PATCH 1/8] perf: Allow to block process in syscall tracepoints

From: Steven Rostedt
Date: Sat Dec 08 2018 - 12:34:47 EST


On Sat, 8 Dec 2018 11:41:21 +0100
Peter Zijlstra <peterz@xxxxxxxxxxxxx> wrote:

> > [root@seventh bpf]# trace -e augmented_raw_syscalls.c --filter-pids 2279,1643
> > <SNIP>
> > 19766.027 ( 0.003 ms): gcc/27524 openat(dfd: CWD, filename: /lib64/libz.so.1, flags: CLOEXEC ) = 5
> > 19766.035 ( 0.001 ms): gcc/27524 fstat(fd: 5, statbuf: 0x7ffe9323e2a0 ) = 0
> > 19766.037 ( 0.003 ms): gcc/27524 mmap(len: 2187272, prot: EXEC|READ, flags: PRIVATE|DENYWRITE, fd: 5 ) = 0x7fa2df435000
> > 19766.042 ( 0.003 ms): gcc/27524 mprotect(start: 0x7fa2df44b000, len: 2093056 ) = 0
> > 19766.046 ( 0.004 ms): gcc/27524 mmap(addr: 0x7fa2df64a000, len: 4096, prot: READ|WRITE, flags: PRIVATE|FIXED|DENYWRITE, fd: 5, off: 86016) = 0x7fa2df64a000
> > 19766.051 ( 0.002 ms): gcc/27524 mmap(addr: 0x7fa2df64b000, len: 8, prot: READ|WRITE, flags: PRIVATE|FIXED|ANONYMOUS) = 0x7fa2df64b000
> > 19766.057 ( 0.001 ms): gcc/27524 close(fd: 5 ) = 0
> > 19766.062 ( 0.003 ms): gcc/27524 openat(dfd: CWD, filename: /lib64/libc.so.6, flags: CLOEXEC ) = 5
> > <SNIP>
>
> Right; and that is all nice. And exactly doesn't answer my question. Why
> do we care about those LOST entries so much that we have to do such
> horribly ugly things?
>
> Esp. as you point out, they're clearly marked in the output and easily
> avoided by using a slightly larger buffer.

For small cases like this a slightly larger buffer wont help. And it
would suck if you are tracing something to find out why there's some
kind of anomaly that takes hours to run, only to find out that the
anomaly happened in the lost events.

Yes, there is a use case for a guarantee of no lost events!


-- Steve