From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1241 invoked by alias); 30 May 2012 04:52:36 -0000 Received: (qmail 1222 invoked by uid 22791); 30 May 2012 04:52:34 -0000 X-SWARE-Spam-Status: No, hits=-4.3 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00,KHOP_THREADED,TW_GM X-Spam-Check-By: sourceware.org Received: from localhost (HELO gcc.gnu.org) (127.0.0.1) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 30 May 2012 04:52:21 +0000 From: "jimis at gmx dot net" To: gcc-bugs@gcc.gnu.org Subject: [Bug preprocessor/53525] Performance regression due to enabling track-macro-expansion Date: Wed, 30 May 2012 05:24:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: preprocessor X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: jimis at gmx dot net X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2012-05/txt/msg02805.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53525 --- Comment #3 from jimis 2012-05-30 04:52:20 UTC --- Another simple one that my eye caught but does not effect performance. Generally I don't get many things in macro.c, but am I correct to assume that the following stands? === modified file 'libcpp/macro.c' --- libcpp/macro.c 2012-05-02 16:55:19 +0000 +++ libcpp/macro.c 2012-05-27 06:55:37 +0000 @@ -1897,10 +1897,9 @@ tokens_buff_new (cpp_reader *pfile, size source_location **virt_locs) { size_t tokens_size = len * sizeof (cpp_token *); - size_t locs_size = len * sizeof (source_location); if (virt_locs != NULL) - *virt_locs = XNEWVEC (source_location, locs_size); + *virt_locs = XNEWVEC (source_location, len); return _cpp_get_buff (pfile, tokens_size); }