From patchwork Tue May 14 09:59:36 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Biener X-Patchwork-Id: 243654 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]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "localhost", Issuer "www.qmailtoaster.com" (not verified)) by ozlabs.org (Postfix) with ESMTPS id 930342C009F for ; Tue, 14 May 2013 19:59:46 +1000 (EST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:date :from:to:cc:subject:message-id:mime-version:content-type; q=dns; s=default; b=qVoslhaYeg/i8n2XVU1JAkNySNK8G1ZiKT+2BxtGtM2r+18vJ0 fAYoEGARes+2g+T/hnLX00toWyP2RebFyxU/HLI0ttix3MjCWlUYSnoW+rjwXKub nQ7FMfAI+y0CQ7R/UDCJA1ofkI4O+gPzR4edMJ8Dd+ajfHq5GmnCWcSNU= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:date :from:to:cc:subject:message-id:mime-version:content-type; s= default; bh=hf1OUELTeb8v+hBdoHv0otxaluw=; b=QPMKKvCnwxY0RjsEJ+HJ az40EOiHniYhD1ZqZjAXIHqmPSslWIik+dtXomUtXJBTLQzb3pTgATLlCEGWRsUJ Tgs/8WsmgCWs/7UTv14FQUHbsJqENjE4ha2gqHMO92alBdOxn+OmUrFHcrfZ+CVb mAGUr4jWDSoJ/CXDRY8Dkug= Received: (qmail 17165 invoked by alias); 14 May 2013 09:59:39 -0000 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 Received: (qmail 17156 invoked by uid 89); 14 May 2013 09:59:39 -0000 X-Spam-SWARE-Status: No, score=-3.8 required=5.0 tests=AWL, BAYES_00, RP_MATCHES_RCVD, TW_CP autolearn=ham version=3.3.1 Received: from cantor2.suse.de (HELO mx2.suse.de) (195.135.220.15) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Tue, 14 May 2013 09:59:38 +0000 Received: from relay2.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 7B205A3B99; Tue, 14 May 2013 11:59:36 +0200 (CEST) Date: Tue, 14 May 2013 11:59:36 +0200 (CEST) From: Richard Biener To: gcc-patches@gcc.gnu.org Cc: nathan@acm.org Subject: [PATCH] Fix PR57269 Message-ID: User-Agent: Alpine 2.00 (LNX 1167 2008-08-23) MIME-Version: 1.0 This backports a piece of Nathans patch to avoid opening two gcov files at once (which ICEs). Profiledbootstrap / regtest ongoing on x86_64-unknown-linux-gnu. Richard. 2013-05-14 Richard Biener PR gcov-profile/57269 Backport from mainline 2012-06-30 Nathan Sidwell * coverage.c (coverage_init): Read counts file before writing graph header. Index: gcc/coverage.c =================================================================== --- gcc/coverage.c (revision 198575) +++ gcc/coverage.c (working copy) @@ -1099,6 +1099,9 @@ coverage_init (const char *filename) memcpy (da_file_name + prefix_len, filename, len); strcpy (da_file_name + prefix_len + len, GCOV_DATA_SUFFIX); + if (flag_branch_probabilities) + read_counts_file (); + /* Name of bbg file. */ if (flag_test_coverage && !flag_compare_debug) { @@ -1118,9 +1121,6 @@ coverage_init (const char *filename) gcov_write_unsigned (local_tick); } } - - if (flag_branch_probabilities) - read_counts_file (); } /* Performs file-level cleanup. Close graph file, generate coverage