Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp170249ybi; Fri, 24 May 2019 01:55:44 -0700 (PDT) X-Google-Smtp-Source: APXvYqzBxvZBQSt7WwvSbxdiRM5XR+ymv16NTmfK/ouA3YRy3Hbb4aYbz8RXaAz9l0NniY68wQpA X-Received: by 2002:a63:ff0f:: with SMTP id k15mr1017918pgi.407.1558688144273; Fri, 24 May 2019 01:55:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1558688144; cv=none; d=google.com; s=arc-20160816; b=zssSuBBBrgv8pmGhL+DstCo0cfvgnweDE5LNh+FoyZYw+YTkeI/4BYtXIFXKuqPLD+ FlAghmbfaIr4ESNIfVzhqyhtTVAijJ6uDyX6VsigVt/dxiDifhz0VDz+wlBY1K47YxhS gvnLT9vLbl+JGxx639d8gXU5N18dxaVALUz4QnvSv+5N8KYKUrgDxr3tdia/p2/TbbNH M9K0dQ4XU1CeCm/pRq4XU+TVBZHvByViOtxOc3NdCyufNy77joSy9tC1zvb+nd0ehhpS p+8Wgl2RlzxeTH+zkw6X1bucORj4SvvikrG4erExn2QoKMb6LYZ/HDOup3ykM9FIeh6g BG/g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=LXmpMTr3XlRy99COjSyRQeXMTTr9YPleMD/v1+k5tko=; b=Ca+Iy4F5BlOnT2pdZoKl3dM3qIu2oc7qYCkDOinsIj3N+DGA4x5z3FOM/qQz3041EM bZRB+EmPBb1GjD12D6Ty9vVZ+U20JU6XJkvLpTp1OLqJ+SR4/OdW3dEhmcHM/DzGkfvb mEDPhFFIW3auUXMR3Q1D1hVYJYzDVk1b9xiJVNRRJnghtJTyMqRHyRkd9itKeYyenWz3 3zvSEHXURD0S5ZKHPLtiAImepWpb0LB4bwqK2BENkAM2Ty86aPH0b7Ginj/1W+KaKY+v Xh1En2X9bj307zwdVu760R8uQeT5AZxijnLkhmwhTOw4fdbMmpvfDHOi1i9XDPsvSreI UNkw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=merlin.20170209 header.b=FFhzeP6k; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z16si2689241pjq.99.2019.05.24.01.55.25; Fri, 24 May 2019 01:55:44 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@infradead.org header.s=merlin.20170209 header.b=FFhzeP6k; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389674AbfEXIxl (ORCPT + 99 others); Fri, 24 May 2019 04:53:41 -0400 Received: from merlin.infradead.org ([205.233.59.134]:46692 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389276AbfEXIxl (ORCPT ); Fri, 24 May 2019 04:53:41 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=LXmpMTr3XlRy99COjSyRQeXMTTr9YPleMD/v1+k5tko=; b=FFhzeP6klPAGGecTbC7KSAl/S pN8lJ8PEZYEAdEN95JChOFyF98gYqQ4fIS7MUM1MK8ru4th8yMfJ6k5krhX/YvSCygYL2LHZzq4iE 4T+/ZuToRYQinZY6kIgbroXkTNZwgi6PGFlUgRuHrZN07UKGvjOMjgdDg4C/bea4ANH1wDhHPKdfh vST04O7Y+1y6+uA68szMemv9ngVx6m3V96y7YKc3aARR5Z7Yxu0zA9V0M3zNRSgmmsIyGFpRW8bZ7 LvYqjUddgy3A9wmNdBKyHijpMcWBp1qSF8UO3WA69QsPdPvt/RSF7ICTXiBx2xuuHIIZmNyZhpkof yy6DeQzBA==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=hirez.programming.kicks-ass.net) by merlin.infradead.org with esmtpsa (Exim 4.90_1 #2 (Red Hat Linux)) id 1hU5x4-00079T-5N; Fri, 24 May 2019 08:53:22 +0000 Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id D12CD201D3687; Fri, 24 May 2019 10:53:19 +0200 (CEST) Date: Fri, 24 May 2019 10:53:19 +0200 From: Peter Zijlstra To: Josh Poimboeuf Cc: Kairui Song , Alexei Starovoitov , Song Liu , lkml , Kernel Team , Alexei Starovoitov , Daniel Borkmann , "bpf@vger.kernel.org" Subject: Re: Getting empty callchain from perf_callchain_kernel() Message-ID: <20190524085319.GE2589@hirez.programming.kicks-ass.net> References: <20190517091044.GM2606@hirez.programming.kicks-ass.net> <20190522140233.GC16275@worktop.programming.kicks-ass.net> <20190522174517.pbdopvookggen3d7@treble> <20190522234635.a47bettklcf5gt7c@treble> <20190523133253.tad6ywzzexks6hrp@treble> <20190523152413.m2pbnamihu3s2c5s@treble> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190523152413.m2pbnamihu3s2c5s@treble> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, May 23, 2019 at 10:24:13AM -0500, Josh Poimboeuf wrote: > Here's the latest version which should fix it in all cases (based on > tip/master): > > https://git.kernel.org/pub/scm/linux/kernel/git/jpoimboe/linux.git/commit/?h=bpf-orc-fix That patch suffers an inconsitency, the comment states: 'if they have "jump_table" in the name' while the actual code implements: 'if the name starts with "jump_table"' Other than that, I suppose that works just fine ;-) > There's no need to put special cases in the FP unwinder when we can > instead just fix the frame pointer usage in the JIT code. > > For ORC, I'm thinking we may be able to just require that all generated > code (BPF and others) always use frame pointers. Then when ORC doesn't > recognize a code address, it could try using the frame pointer as a > fallback. Yes, this seems like a sensible approach. We'd also have to audit the ftrace and kprobe trampolines, IIRC they only do framepointer setup for CONFIG_FRAME_POINTER currently, which should be easy to fix (after the patches I have to fix the FP generation in the first place: https://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue.git/log/?h=x86/wip )