From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5482 invoked by alias); 17 Sep 2011 18:16:21 -0000 Received: (qmail 5190 invoked by uid 22791); 17 Sep 2011 18:16:20 -0000 X-SWARE-Spam-Status: No, hits=-5.9 required=5.0 tests=AWL,BAYES_00,DATE_IN_PAST_03_06,RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD,SPF_HELO_PASS X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sat, 17 Sep 2011 18:16:00 +0000 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p8HIFZHW025616 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Sat, 17 Sep 2011 14:15:35 -0400 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id p8HIFZZo005367; Sat, 17 Sep 2011 14:15:35 -0400 Received: from [0.0.0.0] (ovpn-113-36.phx2.redhat.com [10.3.113.36]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id p8HIFXi7022897; Sat, 17 Sep 2011 14:15:33 -0400 Message-ID: <4E74AED3.4080201@redhat.com> Date: Sat, 17 Sep 2011 22:05:00 -0000 From: Jason Merrill User-Agent: Mozilla/5.0 (X11; Linux i686; rv:6.0.2) Gecko/20110906 Thunderbird/6.0.2 MIME-Version: 1.0 To: Dodji Seketeli CC: gcc-patches@gcc.gnu.org, tromey@redhat.com, gdr@integrable-solutions.net, joseph@codesourcery.com, burnus@net-b.de, charlet@act-europe.fr, bonzini@gnu.org Subject: Re: [PATCH 5/7] Add line map statistics to -fmem-report output References: <1291979498-1604-1-git-send-email-dodji@redhat.com> <944ff7fc2917a6c7972be491d5ae31094cd33b00.1310824121.git.dodji@redhat.com> <4E6E7CC0.4070201@redhat.com> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org X-SW-Source: 2011-09/txt/msg01026.txt.bz2 On 09/16/2011 04:13 AM, Dodji Seketeli wrote: >> It seems odd to add in the locations size here since it's also printed >> separately. > I wanted macro_maps_used_size to really reflect the total used size > for macro maps, without having to mentally do the addition of its two > components. But at the same time, I was interested in seeing how much > memory were the locations taking inside the macro map memory. As I > was suspecting them to take a lot of memory. Right. I suppose my complaint is that the information is oddly redundant. If you have two quantities A and B, is it more useful to print A and B, or A+B and B? I don't object to printing the total of the memory used by the maps and the locations, but I think all the components should be printed as well. It's hard to compare macro_maps_allocated_size with macro_maps_used_size since you have to do subtraction to discover both values from what is printed. And do the addition in dump_line_table_statistics rather than store sums in linemap_stats. Also, linemap_stats and linemap_get_statistics need comments. > +/* Display an integer amount as multiple of 1K or 1M (in base 2à). No UTF-8. Jason