Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752530AbcDRUrT (ORCPT ); Mon, 18 Apr 2016 16:47:19 -0400 Received: from smtprelay0210.hostedemail.com ([216.40.44.210]:48643 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751386AbcDRUrQ (ORCPT ); Mon, 18 Apr 2016 16:47:16 -0400 X-Session-Marker: 726F737465647440676F6F646D69732E6F7267 X-Spam-Summary: 2,0,0,,d41d8cd98f00b204,rostedt@goodmis.org,:::::::::::::::::::::::,RULES_HIT:41:355:379:541:599:800:960:973:988:989:1260:1277:1311:1313:1314:1345:1359:1431:1437:1515:1516:1518:1534:1541:1593:1594:1711:1730:1747:1777:1792:2393:2553:2559:2562:2693:2740:3138:3139:3140:3141:3142:3353:3622:3865:3866:3867:3868:3870:3871:3872:3873:3874:5007:6119:6120:6261:6742:7875:7901:7903:8531:10004:10394:10400:10450:10455:10848:10967:11026:11232:11658:11914:12438:12517:12519:12663:12740:13069:13138:13161:13229:13231:13311:13357:13439:13618:14096:14097:14181:14659:14721:19904:19999:21080:30051:30054:30064:30070:30079:30090:30091,0,RBL:none,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:fn,MSBL:0,DNSBL:none,Custom_rules:0:0:0,LFtime:2,LUA_SUMMARY:none X-HE-Tag: hen61_3f2cd6554001b X-Filterd-Recvd-Size: 2714 Date: Mon, 18 Apr 2016 16:47:13 -0400 From: Steven Rostedt To: Alexei Starovoitov Cc: Peter Zijlstra , "David S . Miller" , Ingo Molnar , Daniel Borkmann , Arnaldo Carvalho de Melo , Wang Nan , Josef Bacik , Brendan Gregg , , , Subject: Re: [PATCH net-next 0/8] allow bpf attach to tracepoints Message-ID: <20160418164713.337cd66f@gandalf.local.home> In-Reply-To: <57153ACF.9090105@fb.com> References: <1459831974-2891931-1-git-send-email-ast@fb.com> <20160418121311.10c88768@gandalf.local.home> <57153ACF.9090105@fb.com> X-Mailer: Claws Mail 3.13.2 (GTK+ 2.24.30; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1470 Lines: 36 On Mon, 18 Apr 2016 12:51:43 -0700 Alexei Starovoitov wrote: > yeah, it could be added to ftrace as well, but it won't be as effective > as perf_trace, since the cost of trace_event_buffer_reserve() in > trace_event_raw_event_() handler is significantly higher than > perf_trace_buf_alloc() in perf_trace_(). Right, because ftrace optimizes the case where all traces make it into the ring buffer (zero copy). Of course, if a filter is a attached, it would be trivial to add a case to copy first into a per cpu context buffer, and only copy into the ring buffer if the filter succeeds. Hmm, that may actually be something I want to do regardless with the current filter system. > Then from the program point of view it wouldn't care how that memory > is allocated, so the user tools will just use perf_trace_() style. > The only use case I see for bpf with ftrace's tracepoint handler > is to work as an actual filter, but we already have filters there... But wasn't it shown that eBPF could speed up the current filters? If we hook into eBPF then we could replace what we have with a faster filter. > so not clear to me of the actual value of adding bpf to ftrace's > tracepoint handler. Well, you wouldn't because you don't use ftrace ;-) But I'm sure others might. > At the same time there is whole ftrace as function tracer. That is > very lucrative field for bpf to plug into ;) Which could get this as a side-effect of this change. -- Steve