From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1760873AbcBYQis (ORCPT ); Thu, 25 Feb 2016 11:38:48 -0500 Received: from mx0b-00082601.pphosted.com ([67.231.153.30]:59616 "EHLO mx0b-00082601.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757854AbcBYQiq (ORCPT ); Thu, 25 Feb 2016 11:38:46 -0500 Subject: Re: [PATCH net-next 1/3] perf: generalize perf_callchain To: Peter Zijlstra References: <1455767939-2700534-1-git-send-email-ast@fb.com> <1455767939-2700534-2-git-send-email-ast@fb.com> <20160225141859.GM6357@twins.programming.kicks-ass.net> CC: "David S. Miller" , Ingo Molnar , Steven Rostedt , Wang Nan , Daniel Borkmann , Brendan Gregg , , From: Alexei Starovoitov Message-ID: <56CF2DCE.5010501@fb.com> Date: Thu, 25 Feb 2016 08:37:34 -0800 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:38.0) Gecko/20100101 Thunderbird/38.6.0 MIME-Version: 1.0 In-Reply-To: <20160225141859.GM6357@twins.programming.kicks-ass.net> Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [192.168.52.123] X-Proofpoint-Spam-Reason: safe X-FB-Internal: Safe X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2016-02-25_06:,, signatures=0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2/25/16 6:18 AM, Peter Zijlstra wrote: > On Wed, Feb 17, 2016 at 07:58:57PM -0800, Alexei Starovoitov wrote: >> . avoid walking the stack when there is no room left in the buffer >> . generalize get_perf_callchain() to be called from bpf helper > > If it does two things it should be two patches. could have been two patches, but it will only add more churn to the same lines. what's the concern? >> Signed-off-by: Alexei Starovoitov >> --- >> arch/x86/include/asm/stacktrace.h | 2 +- >> arch/x86/kernel/cpu/perf_event.c | 4 ++-- >> arch/x86/kernel/dumpstack.c | 6 ++++-- >> arch/x86/kernel/stacktrace.c | 18 +++++++++++------- >> arch/x86/oprofile/backtrace.c | 3 ++- >> include/linux/perf_event.h | 13 +++++++++++-- >> kernel/events/callchain.c | 32 ++++++++++++++++++++------------ >> kernel/events/internal.h | 2 -- >> 8 files changed, 51 insertions(+), 29 deletions(-) > > And at the very least this should have had a note that it doesn't break > all the other archs that implement perf-callchain stuff. the cross-arch interface is two weak functions perf_callchain_kernel() and perf_callchain_user() and back into generic via perf_callchain_store(). Nothing changes there. The code speaks for itself. "non-x86 archs are not broken" would be a silly comment.