From patchwork Fri Nov 16 00:35:52 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Teresa Johnson X-Patchwork-Id: 199458 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 A00252C050B for ; Fri, 16 Nov 2012 11:36:04 +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=1353630966; h=Comment: DomainKey-Signature:Received:Received:Received:Received:Received: Received:Received:Received:To:Subject:Message-Id:Date:From: Mailing-List:Precedence:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:Sender:Delivered-To; bh=EvGfRQ5m0Q4PsRNe03C3 g/yQHas=; b=wKwYxcMSdhdXnlEl98IunjMKviJIe2VktKMS1VRhCwVKIBk4KK/U VYpMS53xZ9gTNEd1GYIfCEMI7mSa1rodkCuRQKzOp5wZzmQ0TYE/vETU/OblxVRh 39fuMwVs7buQ2gCISSLUhVIRJymIFwWd1wqym2SYDl0X3xhazyBlXqk= 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:X-Google-DKIM-Signature:Received:Received:Received:Received:To:Subject:Message-Id:Date:From:X-Gm-Message-State:X-IsSubscribed:Mailing-List:Precedence:List-Id:List-Unsubscribe:List-Archive:List-Post:List-Help:Sender:Delivered-To; b=PlXGtvwaDCIdhEm+g3cVDQ8f6rmPXD2CL/SXjGuQ9mieImSJvaF1MbJi/xo2WJ rl1xa8mXQ6eo/rnDjFuPeaqFqfvofprZ0wTarInjY7TB9FwVBLPyazOPUrk/X8/o 8PVko1RiJHD6mbpA1dOVxNEMFaswyiaWIl9+O+PmT5fIQ=; Received: (qmail 13040 invoked by alias); 16 Nov 2012 00:36:00 -0000 Received: (qmail 12974 invoked by uid 22791); 16 Nov 2012 00:36:00 -0000 X-SWARE-Spam-Status: No, hits=-4.2 required=5.0 tests=AWL, BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, KHOP_RCVD_TRUST, RCVD_IN_DNSWL_LOW, RCVD_IN_HOSTKARMA_YE, RP_MATCHES_RCVD, TW_CP X-Spam-Check-By: sourceware.org Received: from mail-vb0-f73.google.com (HELO mail-vb0-f73.google.com) (209.85.212.73) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 16 Nov 2012 00:35:54 +0000 Received: by mail-vb0-f73.google.com with SMTP id fs19so246246vbb.2 for ; Thu, 15 Nov 2012 16:35:53 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=to:subject:message-id:date:from:x-gm-message-state; bh=+XrjNZFUe68+KUuArytTuEoC50aw40H6Cg8gtDDzSyw=; b=CKT/P8PA5+Vfkwj1pizB9sxAmr3UsZ83PyYK7khgIk0hD5/sb8+tQL/rYMdFrFE7xl Ra4TTwBIMeLxpyWemu6ua9nzKS+xsLi1AkmriJ0hYo7PPu7y55EyR35vjJRCeJhScflG hOlBxU8Xa5uOlIZkC9Ha6RCXD810daiRGX/V5RTJ/idmLftJgPEWnAa5Ebu3nLf+Qo00 rcwvgCFm8wQHk/rDPFlcuDsD8aVDzaG/aoIBX3WE/j0uOtiy4fb2bq1edeYgULDGwLac blmugRGHwWRup/Pv0V/juX1ryzq2+PiH54Loqpl/rsrIgYu8zCzH4NFvQ1ZqFu2Se2Nf 1hgw== Received: by 10.236.144.200 with SMTP id n48mr1881465yhj.1.1353026153569; Thu, 15 Nov 2012 16:35:53 -0800 (PST) Received: from wpzn3.hot.corp.google.com (216-239-44-65.google.com [216.239.44.65]) by gmr-mx.google.com with ESMTPS id h50si5395yhi.3.2012.11.15.16.35.53 (version=TLSv1/SSLv3 cipher=AES128-SHA); Thu, 15 Nov 2012 16:35:53 -0800 (PST) Received: from tjsboxrox.mtv.corp.google.com (tjsboxrox.mtv.corp.google.com [172.17.129.49]) by wpzn3.hot.corp.google.com (Postfix) with ESMTP id 67021100047; Thu, 15 Nov 2012 16:35:53 -0800 (PST) Received: by tjsboxrox.mtv.corp.google.com (Postfix, from userid 147431) id F236361423; Thu, 15 Nov 2012 16:35:52 -0800 (PST) To: reply@codereview.appspotmail.com,hubicka@ucw.cz,gcc-patches@gcc.gnu.org Subject: [PATCH] Fix part of PR bootstrap/55051 (issue6846063) Message-Id: <20121116003552.F236361423@tjsboxrox.mtv.corp.google.com> Date: Thu, 15 Nov 2012 16:35:52 -0800 (PST) From: tejohnson@google.com (Teresa Johnson) X-Gm-Message-State: ALoCoQmYqlQ/vahPrqRTvWqOuozAYGGEzIGHHCPMMRXkUzb6mQWulQFQ2Q6K2802GXpOBelRzZgz7GLHwMOz42jDdNuYAh8x1nVQbTn+wXdzh8TvYRuFTgwz1D8igGo/wDVyGijARgzhRy0n3+LjKWG1/STY6kAhiVAkeZ4CdctX/NK20vzyQdgIqes/6kxIodCgRqHXSS/c X-IsSubscribed: yes 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 This patch addresses the bogus "Invocation mismatch" messages seen in parallel profiledbootstrap builds of gcc. See PR bootstrap/55051 for a discussion of why this is occurring and why this checking is inaccurate. Profilebootstrapped and tested on x86_64-unknown-linux-gnu. Ok for trunk? 2012-11-15 Teresa Johnson PR bootstrap/55051 * libgcov.c (gcov_exit): Remove checking against first merged summary for program, as multiple simultaneous processes attempting to update gcda files may cause summaries to temporarily differ. --- This patch is available for review at http://codereview.appspot.com/6846063 Index: libgcov.c =================================================================== --- libgcov.c (revision 193522) +++ libgcov.c (working copy) @@ -365,7 +365,6 @@ gcov_exit (void) struct gcov_info *gi_ptr; const struct gcov_fn_info *gfi_ptr; struct gcov_summary this_prg; /* summary for program. */ - struct gcov_summary all_prg; /* summary for all instances of program. */ struct gcov_ctr_summary *cs_ptr; const struct gcov_ctr_info *ci_ptr; unsigned t_ix; @@ -382,7 +381,6 @@ gcov_exit (void) if (gcov_dump_complete) return; - memset (&all_prg, 0, sizeof (all_prg)); /* Find the totals for this execution. */ memset (&this_prg, 0, sizeof (this_prg)); for (gi_ptr = gcov_list; gi_ptr; gi_ptr = gi_ptr->next) @@ -469,7 +467,7 @@ gcov_exit (void) unsigned n_counts; struct gcov_summary prg; /* summary for this object over all program. */ - struct gcov_ctr_summary *cs_prg, *cs_tprg, *cs_all; + struct gcov_ctr_summary *cs_prg, *cs_tprg; int error = 0; gcov_unsigned_t tag, length; gcov_position_t summary_pos = 0; @@ -684,7 +682,6 @@ gcov_exit (void) { cs_prg = &prg.ctrs[t_ix]; cs_tprg = &this_prg.ctrs[t_ix]; - cs_all = &all_prg.ctrs[t_ix]; if (gi_ptr->merge[t_ix]) { @@ -702,24 +699,6 @@ gcov_exit (void) } else if (cs_prg->runs) goto read_mismatch; - - if (!cs_all->runs && cs_prg->runs) - memcpy (cs_all, cs_prg, sizeof (*cs_all)); - else if (!all_prg.checksum - && (!GCOV_LOCKED || cs_all->runs == cs_prg->runs) - /* Don't compare the histograms, which may have slight - variations depending on the order they were updated - due to the truncating integer divides used in the - merge. */ - && memcmp (cs_all, cs_prg, - sizeof (*cs_all) - (sizeof (gcov_bucket_type) - * GCOV_HISTOGRAM_SIZE))) - { - fprintf (stderr, "profiling:%s:Invocation mismatch - some data files may have been removed%s\n", - gi_filename, GCOV_LOCKED - ? "" : " or concurrently updated without locking support"); - all_prg.checksum = ~0u; - } } prg.checksum = crc32;