[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <157918598813.29301.14393624193409447045.stgit@devnote2>
Date: Thu, 16 Jan 2020 23:46:28 +0900
From: Masami Hiramatsu <mhiramat@...nel.org>
To: Brendan Gregg <brendan.d.gregg@...il.com>,
Steven Rostedt <rostedt@...dmis.org>,
Alexei Starovoitov <ast@...nel.org>
Cc: mhiramat@...nel.org, Ingo Molnar <mingo@...nel.org>,
bpf@...r.kernel.org, linux-kernel@...r.kernel.org,
Daniel Borkmann <daniel@...earbox.net>,
Arnaldo Carvalho de Melo <acme@...nel.org>,
"David S . Miller" <davem@...emloft.net>, paulmck@...nel.org,
joel@...lfernandes.org,
"Naveen N . Rao" <naveen.n.rao@...ux.ibm.com>,
Anil S Keshavamurthy <anil.s.keshavamurthy@...el.com>
Subject: [RFT PATCH 13/13] tracing/kprobe: perf_event: Remove local kprobe event asynchronously
Remove local kprobe event asynchronously. Note that this
can asynchronously remove a kprobe_event part, but the
perf_event needs to wait for all handlers finished before
removing the local kprobe event. So from the perf_event
(and eBPF) point of view, this shortens the trace termination
process a bit, but it still takes O(n) time to finish it.
To fix this issue, we need to change perf_event terminating
process by decoupling "disable events" and "destroy events"
as in ftrace.
Signed-off-by: Masami Hiramatsu <mhiramat@...nel.org>
---
kernel/trace/trace_kprobe.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/kernel/trace/trace_kprobe.c b/kernel/trace/trace_kprobe.c
index f7e0370b10ae..e8c4828c21ae 100644
--- a/kernel/trace/trace_kprobe.c
+++ b/kernel/trace/trace_kprobe.c
@@ -1707,9 +1707,7 @@ void destroy_local_trace_kprobe(struct trace_event_call *event_call)
return;
}
- __unregister_trace_kprobe(tk);
-
- free_trace_kprobe(tk);
+ __unregister_trace_kprobe_async(tk);
}
#endif /* CONFIG_PERF_EVENTS */
Powered by blists - more mailing lists