lkml.org 
[lkml]   [2015]   [Mar]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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.



\
 
 \ /
  Last update: 2015-03-30 03:41    [W:0.081 / U:0.252 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site