From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 74010 invoked by alias); 15 Jun 2017 16:19:11 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 73965 invoked by uid 89); 15 Jun 2017 16:19:10 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.5 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.2 spammy= X-HELO: mail-wr0-f178.google.com Received: from mail-wr0-f178.google.com (HELO mail-wr0-f178.google.com) (209.85.128.178) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 15 Jun 2017 16:19:08 +0000 Received: by mail-wr0-f178.google.com with SMTP id q97so25108457wrb.2 for ; Thu, 15 Jun 2017 09:19:12 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:cc:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=HZr6XQB7337+gMyf0eC7qzDCNsw17YfjGUaryUgpA90=; b=s9fSsZjKz7in021zcWQvfoYlqSyf71UoDfa5nxoBt5MaO+yBxXBK/iFa+WyY+DfcMz lCsGH5WbzNPQazmz66FiL6Br4/SJoAamxqgsWYO2t90ECAIptDPCoTvJO45JvNie+cB4 Z8C2BOaccRtSaamG1AFeF96IB4JdxbMsyPjZF7NOsL9r9jD6dLZ6aq3jhVHYC7IFjv9C jNojbePlYsPxEVqhKokY8kjzP2i0XfgR7MwOLvkNb5ig6dwMqMRHtxOH35TvFU4cjprn EDatAMRDcqKm0/3gWkS6c2073R2Stze8+NhV44SiCDihlInY4GqOgjl+eOveExKoQ6A0 w5vA== X-Gm-Message-State: AKS2vOwTSeyJFoR5jjGbYUmQ7gEoR6f2LI+uNXPiGhxSoNQjN3RKVZ4x P9SVPll6ITyHsQTf+9jseQ== X-Received: by 10.223.134.196 with SMTP id 4mr4607463wry.127.1497543550755; Thu, 15 Jun 2017 09:19:10 -0700 (PDT) Received: from [192.168.0.113] ([37.189.166.198]) by smtp.gmail.com with ESMTPSA id g7sm556164wrb.52.2017.06.15.09.19.09 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 15 Jun 2017 09:19:09 -0700 (PDT) Subject: Re: [RFC] LONGEST and ULONGEST function template instantiation To: Yao Qi References: <1497353362-14441-1-git-send-email-yao.qi@linaro.org> <3038a7b4-d090-7614-1eb0-54c427f95169@redhat.com> <8660fxv4vi.fsf@gmail.com> Cc: Alan Hayward , gdb-patches@sourceware.org From: Pedro Alves Message-ID: Date: Thu, 15 Jun 2017 16:19:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 In-Reply-To: <8660fxv4vi.fsf@gmail.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-SW-Source: 2017-06/txt/msg00450.txt.bz2 On 06/15/2017 12:59 PM, Yao Qi wrote: > Pedro Alves writes: > > Hi Pedro, > I pick up your patch, and update the ChangeLog entry. Thanks. FAOD, fine with me to push it in. >> The version below has no impact on code size: >> >> $ size gdb.before gdb.after >> text data bss dec hex filename >> 7535236 125008 181184 7841428 77a694 gdb.before >> 7535236 125008 181184 7841428 77a694 gdb.after > > I can't reproduce your result with gcc 5.4.0 on Ubuntu 16.04. The > patched GDB size increased by 112, but it doesn't matter. > > before: > $ size ./gdb > text data bss dec hex filename > 7733505 144208 180768 8058481 7af671 ./gdb > > after: > $ size ./gdb > text data bss dec hex filename > 7733617 144208 180768 8058593 7af6e1 ./gdb Curious, I see the same too now. Dunno what I did before. Diffing "size -A" (and stripping addr column) shows: -gdb.before.stripped : +gdb.after.stripped : .rela.plt 16344 .init 26 .plt 10912 -.text 4239945 +.text 4239705 .fini 9 -.rodata 2280312 +.rodata 2280728 .stapsdt.base 1 -.eh_frame_hdr 126004 -.eh_frame 745124 +.eh_frame_hdr 125996 +.eh_frame 745084 So it results in less code after all. The increase is in .rodata. Maybe the result of longer mangled names or longer strings for __FUNCTION__. Thanks, Pedro Alves