Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp3548636imm; Tue, 29 May 2018 09:04:43 -0700 (PDT) X-Google-Smtp-Source: AB8JxZqRyyG2Fn2IpjAjwFDjrItc0iKtrOBg/CpeYuMQgmWPi378hwGtFIayVQP5RUxFwPwlyevB X-Received: by 2002:a62:a89:: with SMTP id 9-v6mr17671266pfk.112.1527609883661; Tue, 29 May 2018 09:04:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527609883; cv=none; d=google.com; s=arc-20160816; b=01ozSwLG70AOPQVTrSEtZXgRVw7WFrtOeMg476zndGAhv74NE+WWiT706GGLYLigHd mDj3gw/O3Kkay6m5MB6JecorB0kGiGbIWT6MVDB98YLo+HpGuO2el7lXzmTCo3cKIfv8 X9+pTCj39pvcdieXtq0DgCVnNdCyQjui0fF5v4gzvhDISDbbBXLg48CUbP0WQWzNG3Nq yfFWLCfDyd0WQCuoOjFQcF/2bv1OeRg1mAYBvpXe1cXhSNKvS4T+awFvdRmgYHD4Cr7H VaMDyyp8q5mJphJTzOZMKagor3Fkb9Urcpg2c1jImQ/bSAvev51EojOPwB0JeXZAVbUl ol+Q== 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:arc-authentication-results; bh=cmUBykIDXIuwsZ9+lcB3ErDRrWODgV+gmR5PwV3E5g8=; b=JrRQh8uChxs1PSK8Xgt8zQgB1LS1qwuXs66/7pfpxXFxUC/PKGYbad0bHZelOQaTvV wQu188s31ONikYuBj7vQ54scVetK0WU/gS7pujV1QHDTiESXnxg3DqxWX2i2ryj9KNpo jUuFsm6RKnb69u8xN7TmhkyoRTRg8kxWPa84haHs69BUssjutydEWJZq7zrqS56yYzCB wQvW0t28NhcElwH/ailalY3e86jOERmnJp4iNvu8M4QVlCjlnXYDgYNxF2v2uJsKNB4w QcgBV5hlu0zs1mMF0mpIBonz55MoeANs3G1BLiTSMIbPS1eB+RY1IqwE39SHdZXuTbhY a06Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=AOh5WaS/; 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 b67-v6si33252317plb.262.2018.05.29.09.04.29; Tue, 29 May 2018 09:04:43 -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=bombadil.20170209 header.b=AOh5WaS/; 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 S935627AbeE2QDl (ORCPT + 99 others); Tue, 29 May 2018 12:03:41 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:52752 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934933AbeE2QDj (ORCPT ); Tue, 29 May 2018 12:03:39 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.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=cmUBykIDXIuwsZ9+lcB3ErDRrWODgV+gmR5PwV3E5g8=; b=AOh5WaS/bDZmGIOQRb0KVz9AR cVW+7PGbAh+GGmlpXnyqLpHKg3tzhOiiMHJ3Cus7BNwmdJY0lCNFwB3kuxqbDBISO5L9wG3lx3fr8 v+W+kdTo+XCD7XgLZldPxZ6w07P+BJXgBl7xjB8SinD9Zp2opQGKkEX2c4MG81u/gSXK8yPci6w3N Uj1sVCiWcKKn/sUdC8DlHmUsjtcP8+jg3TL1IYJpyFXgIEvkdXYNBg3jDnSQUiLdMOeOyHYtReWhs 5EaX8z0dl6RlS6YXEJ4HNsMV2YgwIc/n09Zc37tHmLiGs+1maA00NZ+ojjDvO1ucWIBgXc78phEGc tH506wbIA==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=hirez.programming.kicks-ass.net) by bombadil.infradead.org with esmtpsa (Exim 4.90_1 #2 (Red Hat Linux)) id 1fNh5y-0008Ni-PJ; Tue, 29 May 2018 16:03:34 +0000 Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 9271C2029F1C1; Tue, 29 May 2018 18:03:32 +0200 (CEST) Date: Tue, 29 May 2018 18:03:32 +0200 From: Peter Zijlstra To: changbin.du@intel.com Cc: akpm@linux-foundation.org, tglx@linutronix.de, pombredanne@nexb.com, neilb@suse.com, linux-kernel@vger.kernel.org, jpoimboe@redhat.com Subject: Re: [PATCH] scripts/faddr2line: show the code context Message-ID: <20180529160332.GD12258@hirez.programming.kicks-ass.net> References: <1521444205-2259-1-git-send-email-changbin.du@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1521444205-2259-1-git-send-email-changbin.du@intel.com> User-Agent: Mutt/1.9.5 (2018-04-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Mar 19, 2018 at 03:23:25PM +0800, changbin.du@intel.com wrote: > From: Changbin Du > > Inspired by gdb command 'list', show the code context of target lines. > Here is a example: > > $ scripts/faddr2line vmlinux native_write_msr+0x6 > native_write_msr+0x6/0x20: > arch_static_branch at arch/x86/include/asm/msr.h:105 > 100 return EAX_EDX_VAL(val, low, high); > 101 } > 102 > 103 static inline void notrace __wrmsr(unsigned int msr, u32 low, u32 high) > 104 { > 105 asm volatile("1: wrmsr\n" > 106 "2:\n" > 107 _ASM_EXTABLE_HANDLE(1b, 2b, ex_handler_wrmsr_unsafe) > 108 : : "c" (msr), "a"(low), "d" (high) : "memory"); > 109 } > 110 > (inlined by) static_key_false at include/linux/jump_label.h:142 > 137 #define JUMP_TYPE_LINKED 2UL > 138 #define JUMP_TYPE_MASK 3UL > 139 > 140 static __always_inline bool static_key_false(struct static_key *key) > 141 { > 142 return arch_static_branch(key, false); > 143 } > 144 > 145 static __always_inline bool static_key_true(struct static_key *key) > 146 { > 147 return !arch_static_branch(key, true); > (inlined by) native_write_msr at arch/x86/include/asm/msr.h:150 > 145 static inline void notrace > 146 native_write_msr(unsigned int msr, u32 low, u32 high) > 147 { > 148 __wrmsr(msr, low, high); > 149 > 150 if (msr_tracepoint_active(__tracepoint_write_msr)) > 151 do_trace_write_msr(msr, ((u64)high << 32 | low), 0); > 152 } > 153 > 154 /* Can be uninlined because referenced by paravirt */ > 155 static inline int notrace Not a fan of this :-/ And you didn't even make it optional. Nor did you Cc the original author of the tool.