Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp4401020imu; Tue, 18 Dec 2018 14:16:11 -0800 (PST) X-Google-Smtp-Source: AFSGD/Vvmzrtt792HuLWrIdb5rlGRMrmBdTD2LAMAWgAocQojidOfotE/WYQ5XQ299OaAEa4JcC1 X-Received: by 2002:a63:e247:: with SMTP id y7mr13386663pgj.84.1545171370977; Tue, 18 Dec 2018 14:16:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1545171370; cv=none; d=google.com; s=arc-20160816; b=ghqbtQPHFLrtD4BSXbYKmJz1oYWov4Nnvqcg9PPl9X6MG10aEMUpmlFopt6NixW3wA Z7R61xEQpJ2sLvbQw0WkP2MHC7pPpmZyTwwr9QYchoEffMaJUl5yfSk6y3kXjq7fsD81 iLy9Hky5sXlPpI9miRoNM/fHHb7XnzWp5UrGWhe3XBTjXEU9dzA3KXadQjKBmvQGT2vc 0jK+hozxy78VAiQZB6skRCWmmJmj2RayH/QDitHBhDLrdGX3+b2l0TK7p4361khKkEJt Zh/GYEzoTHD9yuqhh1I5T4W4jJhyYHnIIMHllWd26H/29u9zMNqcaK77vNrstwvCal0O c/+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; bh=85zxGoGc/e92fEIzBAdUhDphhBxBmRon020KlBxruDA=; b=Q8KQ++iFz3DnSSDGReLMx7LdotgM98W1iVQt/oJInbFAJMbAPMi48J2G3h7OOZMxxo QPSGO/CYBbynIeNUseF7DP2u/aX8ImBRHfqoVrP4dg8hywTAg6OJKeTy9gm8llgvNPmz q6L8hRh98jjsHXQYyHSXqmhqwxpn4Ejin90VjHrsKnijY1FYDXZP2p69m1LLbsZFs9sn RUJjHJ1YgmQH7uaF/ZuOjBkwmRzLxl5zkcHh3bjfUs3u7xO8CS3vjckwx8cN0pcad5RB OMbjJB5hM4LHJInxYdsNNwAeE/2spI2G5wME9B2cv9bqfCExcBSQnQqgB13oJNAdBduh /U1g== 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 be11si13636376plb.134.2018.12.18.14.15.55; Tue, 18 Dec 2018 14:16:10 -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 S1727869AbeLRWNk (ORCPT + 99 others); Tue, 18 Dec 2018 17:13:40 -0500 Received: from mga18.intel.com ([134.134.136.126]:17399 "EHLO mga18.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727743AbeLRWNj (ORCPT ); Tue, 18 Dec 2018 17:13:39 -0500 X-Amp-Result: UNSCANNABLE X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 18 Dec 2018 14:13:39 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.56,370,1539673200"; d="scan'208";a="284746829" Received: from tassilo.jf.intel.com (HELO tassilo.localdomain) ([10.7.201.137]) by orsmga005.jf.intel.com with ESMTP; 18 Dec 2018 14:13:38 -0800 Received: by tassilo.localdomain (Postfix, from userid 1000) id C08A7300B49; Tue, 18 Dec 2018 14:13:38 -0800 (PST) Date: Tue, 18 Dec 2018 14:13:38 -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: <20181218221338.GK25620@tassilo.jf.intel.com> References: <20181217181638.dfexg6mkmbfyzfli@treble> <20181217192938.GF2218@hirez.programming.kicks-ass.net> <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> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20181218165713.4309797a@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 04:57:13PM -0500, Steven Rostedt wrote: > Hmm, how does that work? When does LTO do its linker magic? Because the > fentry/mcounts are added when the object is created. Are they removed > if the compiler sees that it can be inlined? Or does LTO just compile > everything in one go? LTO compiles everything in one go at link time. The objects just contain immediate code. Also in principle it should track command line options from the command line and apply them by function, but there were bugs regarding this in older gcc versions so it may not always work. > 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? Inlining would certainly break the test. -Andi