Re: [PATCH net-next] udp: Add tracepoints to monitor skbs going in and out of a UDP socket

From: David Howells
Date: Fri Oct 05 2018 - 02:46:57 EST


Alexei Starovoitov <alexei.starovoitov@xxxxxxxxx> wrote:

> - kprobes at the top of the function don't use traps and they've been
> optimized over the years to have very low overhead

To quote kprobes.txt:

How Does a Kprobe Work?
-----------------------

When a kprobe is registered, Kprobes makes a copy of the probed
instruction and replaces the first byte(s) of the probed instruction
with a breakpoint instruction (e.g., int3 on i386 and x86_64).

Perhaps the docs need updating.

However, for my purposes, tracepoints are easier.

Anyway, as I said, I don't feel that strongly about the patch. It was useful
for me, and I thought it might be useful for other people.

David