[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <5518A00A.5090004@plumgrid.com>
Date: Sun, 29 Mar 2015 17:59:54 -0700
From: Alexei Starovoitov <ast@...mgrid.com>
To: Jovi Zhangwei <jovi.zhangwei@...il.com>
CC: Ingo Molnar <mingo@...nel.org>,
Steven Rostedt <rostedt@...dmis.org>,
Namhyung Kim <namhyung@...nel.org>,
Arnaldo Carvalho de Melo <acme@...radead.org>,
Jiri Olsa <jolsa@...hat.com>,
Masami Hiramatsu <masami.hiramatsu.pt@...achi.com>,
"David S. Miller" <davem@...emloft.net>,
Daniel Borkmann <daniel@...earbox.net>,
Peter Zijlstra <a.p.zijlstra@...llo.nl>,
linux-api@...r.kernel.org, netdev@...r.kernel.org,
LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v11 tip 6/9] samples: bpf: simple non-portable kprobe
filter example
On 3/29/15 5:34 PM, Jovi Zhangwei wrote:
>> + snprintf(buf, sizeof(buf),
>> + "echo '%c:%s %s' >> /sys/kernel/debug/tracing/kprobe_events",
>> + is_kprobe ? 'p' : 'r', event, event);
>> + err = system(buf);
>
> Maybe we need to remember cleanup the kprobe_events in debugfs?
the real tracing tool should be cleaning it up. This is sample code.
I didn't want to overcomplicate it with a chain of ctrl-c handlers.
Notice patch 7 is simply doing signal(SIGINT, int_exit) and prints
histogram when process is terminated. The kprobe cleaning logic would
have interfere with this and overall would have made these samples
unnecessary complex.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists