From patchwork Tue Jun 4 08:39:14 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Martin_Li=C5=A1ka?= X-Patchwork-Id: 1109706 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=gcc.gnu.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=gcc-patches-return-502280-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=suse.cz Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="SwtEeiIg"; dkim-atps=neutral Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 45J57m4CW0z9s4Y for ; Tue, 4 Jun 2019 18:44:20 +1000 (AEST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :resent-from:resent-to:resent-date:resent-message-id:message-id :from:date:subject:to; q=dns; s=default; b=FjzIybn6J2Aar+YIbGtwB 9qPxfOAEE25KZxdGwDvjirKJgMIgAxbri111DBex8ZHAUDGi4UZbKICaP6MQLG+4 VlZu5NBM2BXUVY3zgCr/QEAI8tmAKrZV2SbLOl9ceU6qppxhpXOFODQQ41sXFL+7 J04JqSGBg0hJWRJPZ3JHaY= 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 :resent-from:resent-to:resent-date:resent-message-id:message-id :from:date:subject:to; s=default; bh=CLVupSzDZ/HaC6fZvfr3wz64lYI =; b=SwtEeiIgXTYiezkD7WqO2KqsFg9etbPK4qIcpo41jl/sVf/9rEadysLmS+3 PWKpzKaUQrk5FVRwS/gTQKD54JQM78nQuiJdIO1LbjPZYBFi6HsrkxEoi8XvPTrX BlTuAW8Dt7eBdjejKzXacP9jNzdxCOD1sp+rZr9y7jttG/sQ= Received: (qmail 75220 invoked by alias); 4 Jun 2019 08:43:41 -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 75153 invoked by uid 89); 4 Jun 2019 08:43:40 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-6.2 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_2, SPF_PASS autolearn=ham version=3.3.1 spammy=training X-HELO: mx1.suse.de Received: from mx2.suse.de (HELO mx1.suse.de) (195.135.220.15) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 04 Jun 2019 08:43:36 +0000 Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id CD3D4AEC8 for ; Tue, 4 Jun 2019 08:43:33 +0000 (UTC) Resent-From: =?utf-8?q?Martin_Li=C5=A1ka?= Resent-To: GCC Patches Resent-Date: Tue, 4 Jun 2019 10:43:33 +0200 Resent-Message-ID: <472f3584-84fd-df05-b62f-1e1e6588e33a@suse.cz> Resent-User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.7.0 Message-Id: From: Martin Liska Date: Tue, 4 Jun 2019 10:39:14 +0200 Subject: [PATCH 0/4] Store multiple values for single value profilers To: gcc-patches@gcc.gnu.org X-IsSubscribed: yes Hi. It's becoming more common that a training run happens in parallel environment. That can lead to a not reproducible builds caused by different order of merging of .gcda files. So that I'm suggesting to store up to 4 values for HIST_TYPE_SINGLE_VALUE and HIST_TYPE_INDIR_CALL on disk. If the capacity is exceeded the whole counter is marked as unstable (not reproducible). Patch can bootstrap on x86_64-linux-gnu and survives regression tests. Ready to be installed? Thanks, Martin marxin (4): Remove indirect call top N counter type. Implement N disk counters for single value and indirect call counters. Dump histograms only if present. Update a bit dump format. gcc/doc/invoke.texi | 3 - gcc/gcov-counter.def | 3 - gcc/gcov-io.h | 9 +- gcc/ipa-profile.c | 13 ++- gcc/params.def | 8 -- gcc/profile.c | 1 - gcc/tree-profile.c | 23 +--- gcc/value-prof.c | 224 ++++++++++++++++---------------------- gcc/value-prof.h | 4 +- libgcc/Makefile.in | 10 +- libgcc/libgcov-driver.c | 80 -------------- libgcc/libgcov-merge.c | 139 +++++++++-------------- libgcc/libgcov-profiler.c | 176 ++---------------------------- libgcc/libgcov-util.c | 19 ---- libgcc/libgcov.h | 12 +- 15 files changed, 179 insertions(+), 545 deletions(-)