Subject: Re: [PATCH 1/2] udp: add tracepoints for queueing skb to rcvbuf

From: Hagen Paul Pfeifer <[email-masked]>
Date: Tue, 21 Jun 2011 16:48:39 +0200

On Tue, 21 Jun 2011 09:50:09 -0400, Neil Horman wrote:

> I hadn't really thought about that much, but yes, I suppose I could

migrate

> dropwatch to export kfree_skb data via perf.  Admittedly I don't know

much

> about

> the perf api.  Do you have any pointers on its use (to save me time in

> figuring

> out how it all works)?  If so I'll start looking into it.

http://git.kernel.org/?p=status/powertop/powertop.git;a=tree;f=perf;hb=HEAD

is probably a good starting point. Especially

perf_bundle.cpp:handle_trace_point(). But I am not sure if this is the most

clever way. The direct us of the perf api is somewhat dodgy (not sure if

the ABI will change). IIRC Steven Rostedt wrote about a user space library

(I CC'ed Steven). BUT: tracing via /sys/kernel/debug/tracing/* may be

enough, eventually there is no need for perf at all. Then trace-cmd may

provide some nice ideas how to wrap the /sys/kernel/debug/tracing interface

programmatically.

The idea behind dropwatch is great! There is currently to much

unconsolidated information. It takes a genius to understand where and later

why packets are dropped. A userspace tool where no kernel patch is required

is a big plus! ;-)

Hagen