Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp4472926imu; Tue, 18 Dec 2018 15:51:11 -0800 (PST) X-Google-Smtp-Source: AFSGD/WgIf7E3nXYhTFpr6MnhkPYm518fCGV2Ai3o+4BLM9+LjXcJUYr9bseKLZNN43t9qbUh6ha X-Received: by 2002:a62:6e07:: with SMTP id j7mr19036822pfc.135.1545177071897; Tue, 18 Dec 2018 15:51:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1545177071; cv=none; d=google.com; s=arc-20160816; b=sEBk69ARa2zWM5f0KN16dbuHieF+xavrv1+FupQrbPdacwhYZmPDoqsZOAjDmcj63x EAkaenmUQEKiEkK/OrmTmdclMxZ9VMnZqFVAC6Z0j7Ju+ZWluxj+ybG/A+RAk5vglwRa ZClcURcASgNFlLVVCTIE0ogeEXG333bzRP0nGGUCLxtzs1YEpoOU3f9NpYfeZjrLoc1Z LHp+aDPMAblpOkRYvXa3eEoJYJtBi+Ec+rvlyT39lHr2qVrjsTvBxN4ZeGdYbxd31Tkn rWd53hZFt9hvuoQFHM3GHUHoRllB3gt04QXZio+3eX/HYHNII67res5iQEuMx5X3KXh6 y6CQ== 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-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=oUMf+cwHfHWWbowmNXu6xzYNslYjcdb7yif2FL2UAEY=; b=V68gDMX9DqvInwO6Fjt11ErsFodm6Fzuaac2JBsX6Ud7UUtP6fJTSERxRBuoJQ3RmJ llGE0revdQqWl649Bzrl76xVJT3BZUE5zqUAZlSI7Dwe6JViqHHwWrv1gQwLS+QYR/BX nnJ3NDYqzgWHsYKCxuDfe+DOGX2NglPE3Ckg+owHyuEm6x0UP8m5r7xDvzvOmZwMlij1 2e87FJUuDM2Hykq0JMWjCxdJWtYyiXd7WCFwb5KDM03xqh+ptgEY7gDuVpT3kiTm13An nfI6gE0XQ9ToBdI2D/LrBZMCcJwpbJRUdNWDdopj3Vx1gBdvZuLnb7qJ/bYB4JK3QXWn vPzA== ARC-Authentication-Results: i=1; mx.google.com; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y12si13922511plk.174.2018.12.18.15.50.56; Tue, 18 Dec 2018 15:51:11 -0800 (PST) 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; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727991AbeLRX0h (ORCPT + 99 others); Tue, 18 Dec 2018 18:26:37 -0500 Received: from mga03.intel.com ([134.134.136.65]:1157 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727639AbeLRX0h (ORCPT ); Tue, 18 Dec 2018 18:26:37 -0500 X-Amp-Result: UNSCANNABLE X-Amp-File-Uploaded: False Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 18 Dec 2018 15:26:36 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.56,370,1539673200"; d="scan'208";a="110495523" Received: from tassilo.jf.intel.com (HELO tassilo.localdomain) ([10.7.201.137]) by fmsmga008.fm.intel.com with ESMTP; 18 Dec 2018 15:26:36 -0800 Received: by tassilo.localdomain (Postfix, from userid 1000) id 30519300B49; Tue, 18 Dec 2018 15:26:36 -0800 (PST) Date: Tue, 18 Dec 2018 15:26:36 -0800 From: Andi Kleen To: Steven Rostedt Cc: Martin Jambor , Miroslav Benes , Josh Poimboeuf , Peter Zijlstra , Arnd Bergmann , Linux Kernel Mailing List , the arch/x86 maintainers Subject: Re: objtool warnings for kernel/trace/trace_selftest_dynamic.o Message-ID: <20181218232636.GM25620@tassilo.jf.intel.com> References: <20181217213126.lsqhyszoulel6uq6@treble> <20181217173644.391c2070@gandalf.local.home> <20181218000618.GA25620@tassilo.jf.intel.com> <20181218024916.vmfnyqzouhfxhyvc@treble> <20181218211501.GD25620@tassilo.jf.intel.com> <20181218165713.4309797a@gandalf.local.home> <20181218221338.GK25620@tassilo.jf.intel.com> <20181218171620.365c1c51@gandalf.local.home> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20181218171620.365c1c51@gandalf.local.home> 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 Tue, Dec 18, 2018 at 05:16:20PM -0500, Steven Rostedt wrote: > On Tue, 18 Dec 2018 14:13:38 -0800 > Andi Kleen wrote: > > > > Again, that's not the ftrace case. It doesn't care about more than one > > > out of line instance. Thus, for this particular use, "used" should be > > > good enough. > > > > You mean noinline used? > > I thought that someone said that "used" would also prevent inlining. that's not correct. You need noinline -Andi [ak@tassilo tsrc]$ cat tinline.c int i; inline __attribute__((used)) int finline(void) { i++; } main() { finline(); } [ak@tassilo tsrc]$ gcc -O2 -S tinline.c tinline.c:10:1: warning: return type defaults to ‘int’ [-Wimplicit-int] main() ^~~~ [ak@tassilo tsrc]$ [ak@tassilo tsrc]$ cat tinline.s .file "tinline.c" .text .section .text.startup,"ax",@progbits .p2align 4,,15 .globl main .type main, @function main: .LFB1: .cfi_startproc addl $1, i(%rip) xorl %eax, %eax ret .cfi_endproc .LFE1: .size main, .-main .comm i,4,4 .ident "GCC: (GNU) 8.2.1 20181105 (Red Hat 8.2.1-5)" .section .note.GNU-stack,"",@progbits [ak@tassilo tsrc]$