From patchwork Mon Mar 5 21:17:27 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jason Merrill X-Patchwork-Id: 144773 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) by ozlabs.org (Postfix) with SMTP id 0D3EEB6FCB for ; Tue, 6 Mar 2012 08:17:55 +1100 (EST) Comment: DKIM? See http://www.dkim.org DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=gcc.gnu.org; s=default; x=1331587076; h=Comment: DomainKey-Signature:Received:Received:Received:Received:Received: Message-ID:Date:From:User-Agent:MIME-Version:To:CC:Subject: Content-Type:Mailing-List:Precedence:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:Sender:Delivered-To; bh=7w67448 pGCoGXLubdFo1NiR5ouw=; b=YaityyCasrZzPxbE37z1x+P3vH46IOfhjtYO0dP kxkuxy6pCCL66460defFFEIvdUPRzITeQvy45CryFFbw4SVXwAYFMmh9RCW5iS5y 5yK5qtkNphYXoYgySSC2JcPUi4SNntbxNS1BUwlYwmhBxiVQB5Rk0CG1ZSoS4/iY wkXE= Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=default; d=gcc.gnu.org; h=Received:Received:X-SWARE-Spam-Status:X-Spam-Check-By:Received:Received:Received:Message-ID:Date:From:User-Agent:MIME-Version:To:CC:Subject:Content-Type:Mailing-List:Precedence:List-Id:List-Unsubscribe:List-Archive:List-Post:List-Help:Sender:Delivered-To; b=FD/HLUkbXLC/LuSjVmNAtPnRvYWz69fUYHxnE8pL9j3TkzmSqC9JNWGY4LRqrw lec7r6orYQq7/kyqHZztafQofl1CbjkY2F0JwN3bi040Myss+8ppeId7IcDXUg7X 8/W8RDk5bnDA48D+KCfsubq+tSNTpb76G5qQASY/N7DxU=; Received: (qmail 20879 invoked by alias); 5 Mar 2012 21:17:50 -0000 Received: (qmail 20871 invoked by uid 22791); 5 Mar 2012 21:17:49 -0000 X-SWARE-Spam-Status: No, hits=-6.6 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_HI, SPF_HELO_PASS, TW_BJ, T_RP_MATCHES_RCVD 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, 05 Mar 2012 21:17:31 +0000 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q25LHT6l005074 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 5 Mar 2012 16:17:29 -0500 Received: from [10.3.113.56] (ovpn-113-56.phx2.redhat.com [10.3.113.56]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id q25LHRR0024041; Mon, 5 Mar 2012 16:17:28 -0500 Message-ID: <4F552D67.9040007@redhat.com> Date: Mon, 05 Mar 2012 16:17:27 -0500 From: Jason Merrill User-Agent: Mozilla/5.0 (X11; Linux i686; rv:10.0.1) Gecko/20120216 Thunderbird/10.0.1 MIME-Version: 1.0 To: gcc-patches List , Nicola Pero CC: Mike Stump Subject: C++ PATCH to objc-map.c to fix build with --enable-gather-detailed-mem-stats Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org objc-map.c has been calling _stat allocation functions without using MEM_STAT_INFO for passing the file location information to the allocator, which breaks bootstrap with --enable-gather-detailed-mem-stats. Fixed by calling the non-_stat variant instead. Applying as obvious. commit c70308c0c323642d823af0c4e7a6ed5e320b499f Author: Jason Merrill Date: Mon Mar 5 16:12:13 2012 -0500 * objc-map.c (objc_map_private_resize, objc_map_alloc_ggc): Don't call _stat functions without MEM_STAT_INFO. diff --git a/gcc/objc/objc-map.c b/gcc/objc/objc-map.c index 77a98c1..a4a1eec 100644 --- a/gcc/objc/objc-map.c +++ b/gcc/objc/objc-map.c @@ -56,7 +56,7 @@ next_power_of_two (size_t x) objc_map_t objc_map_alloc_ggc (size_t initial_capacity) { - objc_map_t map = (objc_map_t) ggc_internal_cleared_vec_alloc_stat (1, sizeof (struct objc_map_private)); + objc_map_t map = (objc_map_t) ggc_internal_cleared_vec_alloc (1, sizeof (struct objc_map_private)); if (map == NULL) OUT_OF_MEMORY; @@ -67,8 +67,8 @@ objc_map_alloc_ggc (size_t initial_capacity) map->maximum_load_factor = 70; map->max_number_of_non_empty_slots = (initial_capacity * map->maximum_load_factor) / 100; - map->slots = (tree *)ggc_internal_cleared_vec_alloc_stat (initial_capacity, sizeof (tree)); - map->values = (tree *)ggc_internal_cleared_vec_alloc_stat (initial_capacity, sizeof (tree)); + map->slots = (tree *)ggc_internal_cleared_vec_alloc (initial_capacity, sizeof (tree)); + map->values = (tree *)ggc_internal_cleared_vec_alloc (initial_capacity, sizeof (tree)); if (map->slots == NULL) OUT_OF_MEMORY; @@ -112,8 +112,8 @@ objc_map_private_resize (objc_map_t map, size_t new_number_of_slots) map->max_number_of_non_empty_slots = (map->number_of_slots * map->maximum_load_factor) / 100; - map->slots = (tree *)ggc_internal_cleared_vec_alloc_stat (map->number_of_slots, sizeof (tree)); - map->values = (tree *)ggc_internal_cleared_vec_alloc_stat (map->number_of_slots, sizeof (tree)); + map->slots = (tree *)ggc_internal_cleared_vec_alloc (map->number_of_slots, sizeof (tree)); + map->values = (tree *)ggc_internal_cleared_vec_alloc (map->number_of_slots, sizeof (tree)); if (map->slots == NULL) OUT_OF_MEMORY;