From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16847 invoked by alias); 12 Sep 2011 21:43:10 -0000 Received: (qmail 16822 invoked by uid 22791); 12 Sep 2011 21:43:08 -0000 X-SWARE-Spam-Status: No, hits=-6.7 required=5.0 tests=AWL,BAYES_00,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; Mon, 12 Sep 2011 21:42:52 +0000 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p8CLgSph032174 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 12 Sep 2011 17:42:28 -0400 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id p8CLgRka020661; Mon, 12 Sep 2011 17:42:27 -0400 Received: from [0.0.0.0] (ovpn-113-157.phx2.redhat.com [10.3.113.157]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id p8CLgO4P002444; Mon, 12 Sep 2011 17:42:25 -0400 Message-ID: <4E6E7CC0.4070201@redhat.com> Date: Mon, 12 Sep 2011 22:07: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, paolo@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> In-Reply-To: <944ff7fc2917a6c7972be491d5ae31094cd33b00.1310824121.git.dodji@redhat.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit 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/msg00750.txt.bz2 On 07/16/2011 10:37 AM, Dodji Seketeli wrote: > +#define ONE_M ONE_K * ONE_K Parenthesize this so that users don't need to. > + macro_maps_used_size = > + LINEMAPS_MACRO_USED (set) * sizeof (struct line_map) > + + macro_maps_locations_size; It seems odd to add in the locations size here since it's also printed separately. > + fprintf (stderr, "Total allocated maps size: %5lu%c\n", > + SCALE (s.total_allocated_map_size), > + STAT_LABEL (s.total_allocated_map_size)); > + fprintf (stderr, "Total used maps size: %5lu%c\n", > + SCALE (s.total_used_map_size), > + STAT_LABEL (s.total_used_map_size)); > + fprintf (stderr, "Ordinary map used size: %5lu%c\n", > + SCALE (s.ordinary_maps_used_size), > + STAT_LABEL (s.ordinary_maps_used_size)); > + fprintf (stderr, "Macro maps used size: %5lu%c\n", > + SCALE (s.macro_maps_used_size), > + STAT_LABEL (s.macro_maps_used_size)); > + fprintf (stderr, "Number of ordinary maps allocated: %5lu%c\n", > + SCALE (s.num_ordinary_maps_allocated), > + STAT_LABEL (s.num_ordinary_maps_allocated)); > + fprintf (stderr, "Number of ordinary maps used: %5lu%c\n", > + SCALE (s.num_ordinary_maps_used), > + STAT_LABEL (s.num_ordinary_maps_used)); > + fprintf (stderr, "Number of macro maps used: %5lu%c\n", > + SCALE (s.num_macro_maps_used), > + STAT_LABEL (s.num_macro_maps_used)); > + fprintf (stderr, "Ordinary maps allocated size: %5lu%c\n", > + SCALE (s.ordinary_maps_allocated_size), > + STAT_LABEL (s.ordinary_maps_allocated_size)); > + fprintf (stderr, "Macro maps locations size: %5lu%c\n", > + SCALE (s.macro_maps_locations_size), > + STAT_LABEL (s.macro_maps_locations_size)); > + fprintf (stderr, "Duplicated maps locations size: %5lu%c\n", > + SCALE (s.duplicated_macro_maps_locations_size), > + STAT_LABEL (s.duplicated_macro_maps_locations_size)); This seems oddly sorted. And why the difference between ordinary and macro maps in terms of what is printed? > +/* Counters defined in libcpp's macro.c. */ > +extern unsigned num_expanded_macros_counter; > +extern unsigned num_macro_tokens_counter; These should be part of struct linemap_stats. Jason