From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.2 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 333D8C4CEC4 for ; Mon, 23 Sep 2019 16:13:39 +0000 (UTC) Received: from dpdk.org (dpdk.org [92.243.14.124]) by mail.kernel.org (Postfix) with ESMTP id B7D9D2089F for ; Mon, 23 Sep 2019 16:13:37 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B7D9D2089F Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=intel.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=dev-bounces@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 89F8F1BF0F; Mon, 23 Sep 2019 18:13:36 +0200 (CEST) Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id 112631BF0A for ; Mon, 23 Sep 2019 18:13:34 +0200 (CEST) X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 23 Sep 2019 09:13:33 -0700 X-IronPort-AV: E=Sophos;i="5.64,541,1559545200"; d="scan'208";a="182592844" Received: from bricha3-mobl.ger.corp.intel.com ([10.237.221.95]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 23 Sep 2019 09:13:30 -0700 Date: Mon, 23 Sep 2019 18:13:26 +0200 From: Bruce Richardson To: Andrzej Ostruszka Cc: Thomas Monjalon , Ray Kinsella , dev@dpdk.org, Aaron Conole , Michael Santana , John McNamara , Marko Kovacevic , David Hunt , Vladimir Medvedkin , Robert Sanford , Erik Gabriel Carrillo , mattias.ronnblom@ericsson.com, stephen@networkplumber.org, Andrzej Ostruszka Message-ID: <20190923161326.GB2003@bricha3-MOBL.ger.corp.intel.com> References: <20190917075754.8310-1-amo@semihalf.com> <20190919151624.GA1999@bricha3-MOBL.ger.corp.intel.com> <1873473.QF300kEeir@xps> <20190923120658.GA2003@bricha3-MOBL.ger.corp.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.11.4 (2019-03-13) Subject: Re: [dpdk-dev] [PATCH v2 01/10] build: add an option to enable LTO build X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Mon, Sep 23, 2019 at 03:02:25PM +0200, Andrzej Ostruszka wrote: > On 9/23/19 2:06 PM, Bruce Richardson wrote: > > On Mon, Sep 23, 2019 at 02:03:35PM +0200, Andrzej Ostruszka wrote: > [...] > >> So it is similar ~5x increase as Mattias has reported. Have not > >> measured it, but the lion share of that increase is due to linking of > >> 'test' apps. > >> > > > > Interesting. Do we want to explicitly not use lto for the test app? > > It is the linking of these apps where LTO really kicks in. During > compilation of objects compiler just additionally generates internal > representation (in extra sections of ELF object). Linking these objects > into library does not do much - so the actual optimization is done when > producing final executable. > > It might be so that when using dedicated user app the penalty would be > much smaller since the amount of code used would be much smaller - but > FWIW all the warnings that I was fixing were produced by the linking of > app/test* binaries. > I wasn't suggesting removing it for testpmd test-acl etc., just for the autotest "test" binary since it's the one with the most .o files. However, testing on my system with the meson build, I'm getting lots of link errors [See below]. Any suggestions? /Bruce /usr/bin/ld: /tmp/dpdk-testpmd.hncbtE.ltrans93.ltrans.o: in function `ena_stop': :(.text+0x9ed6): undefined reference to `rte_timer_stop' /usr/bin/ld: /tmp/dpdk-testpmd.hncbtE.ltrans93.ltrans.o: in function `ena_start': :(.text+0xae23): undefined reference to `rte_timer_reset' /usr/bin/ld: /tmp/dpdk-testpmd.hncbtE.ltrans93.ltrans.o: in function `eth_ena_dev_init.cold': :(.text.unlikely+0x224a): undefined reference to `rte_timer_subsystem_init' /usr/bin/ld: /tmp/dpdk-testpmd.hncbtE.ltrans119.ltrans.o: in function `rte_distributor_flush_v1705': :(.text+0xa229): undefined reference to `rte_distributor_process' /usr/bin/ld: :(.text+0xa256): undefined reference to `rte_distributor_process' /usr/bin/ld: /tmp/dpdk-testpmd.hncbtE.ltrans119.ltrans.o: in function `rte_distributor_get_pkt_v1705': :(.text+0xd24b): undefined reference to `rte_distributor_request_pkt' /usr/bin/ld: :(.text+0xd259): undefined reference to `rte_distributor_poll_pkt' /usr/bin/ld: /tmp/dpdk-testpmd.hncbtE.ltrans122.ltrans.o: in function `rte_table_lpm_ipv6_lookup.lto_priv.0': :(.text+0x810c): undefined reference to `rte_lpm6_lookup' /usr/bin/ld: /tmp/dpdk-testpmd.hncbtE.ltrans122.ltrans.o: in function `rte_table_lpm_ipv6_entry_delete.lto_priv.0': :(.text+0x81bb): undefined reference to `rte_lpm6_is_rule_present' /usr/bin/ld: /tmp/dpdk-testpmd.hncbtE.ltrans122.ltrans.o: in function `rte_table_lpm_ipv6_entry_add.lto_priv.0': :(.text+0x8e13): undefined reference to `rte_lpm6_is_rule_present' /usr/bin/ld: :(.text+0x8e79): undefined reference to `rte_lpm6_add' /usr/bin/ld: /tmp/dpdk-testpmd.hncbtE.ltrans122.ltrans.o: in function `rte_table_lpm_entry_delete.lto_priv.0': :(.text+0x9b15): undefined reference to `rte_lpm_is_rule_present' /usr/bin/ld: :(.text+0x9b4c): undefined reference to `rte_lpm_delete' /usr/bin/ld: /tmp/dpdk-testpmd.hncbtE.ltrans122.ltrans.o: in function `rte_table_lpm_entry_add.lto_priv.0': :(.text+0x9c06): undefined reference to `rte_lpm_is_rule_present' /usr/bin/ld: :(.text+0x9c73): undefined reference to `rte_lpm_add' /usr/bin/ld: /tmp/dpdk-testpmd.hncbtE.ltrans122.ltrans.o: in function `rte_table_lpm_free.lto_priv.0': :(.text+0x9d12): undefined reference to `rte_lpm_free' /usr/bin/ld: /tmp/dpdk-testpmd.hncbtE.ltrans122.ltrans.o: in function `rte_table_lpm_create.lto_priv.0': :(.text+0x9e01): undefined reference to `rte_lpm_create' collect2: error: ld returned 1 exit status ninja: build stopped: subcommand failed.