Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752619AbcDUODI (ORCPT ); Thu, 21 Apr 2016 10:03:08 -0400 Received: from bombadil.infradead.org ([198.137.202.9]:50847 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752507AbcDUODG (ORCPT ); Thu, 21 Apr 2016 10:03:06 -0400 Date: Thu, 21 Apr 2016 16:02:55 +0200 From: Peter Zijlstra To: Alexei Starovoitov Cc: "David S . Miller" , Steven Rostedt , Ingo Molnar , Daniel Borkmann , Arnaldo Carvalho de Melo , Wang Nan , Josef Bacik , Brendan Gregg , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, kernel-team@fb.com Subject: Re: [PATCH net-next] perf, bpf: minimize the size of perf_trace_() tracepoint handler Message-ID: <20160421140255.GH3430@twins.programming.kicks-ass.net> References: <1461035510-2810305-1-git-send-email-ast@fb.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1461035510-2810305-1-git-send-email-ast@fb.com> User-Agent: Mutt/1.5.21 (2012-12-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1164 Lines: 29 On Mon, Apr 18, 2016 at 08:11:50PM -0700, Alexei Starovoitov wrote: > move trace_call_bpf() into helper function to minimize the size > of perf_trace_*() tracepoint handlers. > text data bss dec hex filename > 10541679 5526646 2945024 19013349 1221ee5 vmlinux_before > 10509422 5526646 2945024 18981092 121a0e4 vmlinux_after > > It may seem that perf_fetch_caller_regs() can also be moved, > but that is incorrect, since ip/sp will be wrong. > > bpf+tracepoint performance is not affected, since > perf_swevent_put_recursion_context() is now inlined. > export_symbol_gpl can also be dropped. > > No measurable change in normal perf tracepoints. > > Suggested-by: Steven Rostedt > Signed-off-by: Alexei Starovoitov > --- > include/linux/trace_events.h | 5 +++++ > include/trace/perf.h | 13 +++---------- > kernel/events/core.c | 20 +++++++++++++++++++- > 3 files changed, 27 insertions(+), 11 deletions(-) > Acked-by: Peter Zijlstra (Intel) David, please take through the net tree as this depends on prior patches by Alexei that are already in your tree.