From patchwork Wed Oct 5 12:04:01 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?J=C3=B8rgen_Kvalsvik?= X-Patchwork-Id: 45 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4ac7:0:0:0:0:0 with SMTP id y7csp563703wrs; Wed, 5 Oct 2022 05:05:41 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7I/k4C56BGBLfHNSs/AwoVJcLShegl5O/pbPHOsuT3t92lfk6t7y40TyiDRcXkrVJcu/IX X-Received: by 2002:a17:907:3f26:b0:78d:1b32:bf85 with SMTP id hq38-20020a1709073f2600b0078d1b32bf85mr5944994ejc.628.1664971541816; Wed, 05 Oct 2022 05:05:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1664971541; cv=none; d=google.com; s=arc-20160816; b=legLnRRw+7URgh77oimFJX9TrEQCI8wJZR1pZMU6hwJrdmS7Xg2+LYTXKc2AeLWqn8 etdkt4EV7klCfdFm2HeA4Jq62h0FKKk7yM00HTvBplqUp7P1w+5cd1aUvfkqJnmaQBDQ mkxPJMlHM5HoFpxppNR8NfFdO0VAvsFSLEWbuMP8f7zey0R6ImwqYUiNN49AjxMXAAwc aptOcDZM1JaJX3b1XusdXQCPA6tscm1p2T1Wj5D0XAIVGrPkB4tGcVCoHTdjtzHXpNUp FCLQuCL/sUuj5XMyFBPXYX94MZIj13OzfwIIzS1I00Ic4PF9SB9pK/jiazqfr52EO0Xo unIA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:reply-to:from:list-subscribe:list-help:list-post :list-archive:list-unsubscribe:list-id:precedence :content-transfer-encoding:mime-version:message-id:date:subject:to :dmarc-filter:delivered-to:dkim-signature:dkim-filter; bh=H0qTOu9qVCfO4xsg+NplrNrxroiaOlJSCNd8Ih1qoK8=; b=Xv7xh5nL+VNYM89I2iHkzpc1aNp/otZCKaYmAo9nK4Ko49vfsTai80MjIEBnJQZ98Z N/ljg81Pz/aXaBuLPGyArMrgoIGP+JiA52kvUSQsb3KWjL5kahJzdyImBrwXLvVjGbom sG+NXsIJgg1WMLQJgp4VgDhYn9qro3vb7ktyLg8aaoVmZKmDVgIRkoFwIrjj46b8vuKp pr60Dp8ll7B20dQiKjmk56gE1jBo83vO3BcEk5ScfuxOTFaNKsX/OZtQnfWqsJqvyFDN 17jF2ve1I9HJ0ZkYv6zN5R3hq5NJV25ZjelQT+ZjswtM0wi2xlWkMU/Ww0EX86BJXiIr ZsGQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=KzOAqMUO; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from sourceware.org (ip-8-43-85-97.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id r23-20020aa7d157000000b00458814a8852si12498717edo.591.2022.10.05.05.05.41 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 05 Oct 2022 05:05:41 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) client-ip=8.43.85.97; Authentication-Results: mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=KzOAqMUO; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 6B4E03851C0D for ; Wed, 5 Oct 2022 12:05:00 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 6B4E03851C0D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1664971500; bh=H0qTOu9qVCfO4xsg+NplrNrxroiaOlJSCNd8Ih1qoK8=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=KzOAqMUO0PmUYVANeclXMCvDq8ebNiyysP8T6BCi+X6or7XC/YgI7Oofzy5rx0nWH aYi2T+CPh2MZsPzt5UQsJFw62ZuazRyJ9RMnVt4ZG5EqC/M87h8R53PyDDFqXLJS8c cg4g/fblKKrrVdqJkqjZE9RR+I59cl6OYp/YZR34= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-pg1-x52c.google.com (mail-pg1-x52c.google.com [IPv6:2607:f8b0:4864:20::52c]) by sourceware.org (Postfix) with ESMTPS id C683B385828D for ; Wed, 5 Oct 2022 12:04:16 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org C683B385828D Received: by mail-pg1-x52c.google.com with SMTP id j71so8939729pge.2 for ; Wed, 05 Oct 2022 05:04:16 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=H0qTOu9qVCfO4xsg+NplrNrxroiaOlJSCNd8Ih1qoK8=; b=KcgruzsgFP2MZSxXXgSTD9uYmc674O7XhxtezcV6SxbQVbx54DvP9H2qABliM268q/ Txd3S1H3vM4TsZ+0Z7utS3peBPFBPMbewS6scbwPbLObyr9yooVAI9VwyVnvkOfmSsRU yvIBS6VqZzDkXUAsffLSM3g92HDnIX88ItoHOseYmgXPnnVzNczm5zyjjzd1i+7QZXlI HV3OvWm0IKgKxq11NzPdF/ZpPfGMSKa3xgKj7/Xz3D3SXQJ/CDUumthxZ+gBAz7KRlGX sxacp0dZLm5e/lo55E2I2SCGo6ZszHX4sD797bksMjqFaOqdOjE0nmZ7grabMpE3p3yE jazA== X-Gm-Message-State: ACrzQf04my4k8u7OvbJWsKVois5ZaFhkQp8/HCCVGXbOvncr+BuQcmFY uiPo7eQkAfn+LDnmgW3dE17cAvRuabcu0EVBBg9Oc620CQ6HlGdeYDZ4e1B+I50bsPutdayG+tM sieTo/09+zGXKXYtSA/WPG5LrW8LFTurUwK/D+jqUUEYgEE8d74gl2u6ojzCBVtLBHvf6FNTq9i Xu99ytmenlncP1b8cEHxI= X-Received: by 2002:a63:5415:0:b0:439:e932:e025 with SMTP id i21-20020a635415000000b00439e932e025mr26939481pgb.63.1664971455312; Wed, 05 Oct 2022 05:04:15 -0700 (PDT) Received: from FA21110339.ts.tri-ad.global ([103.175.111.222]) by smtp.gmail.com with ESMTPSA id rm10-20020a17090b3eca00b0020936894e76sm1054084pjb.10.2022.10.05.05.04.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 05 Oct 2022 05:04:14 -0700 (PDT) To: gcc-patches@gcc.gnu.org Subject: [PATCH 0/2] gcov: Split when edge locus differ from dest bb Date: Wed, 5 Oct 2022 14:04:01 +0200 Message-Id: <20221005120403.68935-1-jorgen.kvalsvik@woven-planet.global> X-Mailer: git-send-email 2.34.0 MIME-Version: 1.0 X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, KAM_SHORT, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, TXREP, T_SPF_PERMERROR autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: =?utf-8?q?J=C3=B8rgen_Kvalsvik_via_Gcc-patches?= From: =?utf-8?q?J=C3=B8rgen_Kvalsvik?= Reply-To: =?utf-8?q?J=C3=B8rgen_Kvalsvik?= Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org Sender: "Gcc-patches" X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1745849199166754081?= X-GMAIL-MSGID: =?utf-8?q?1745849199166754081?= Original discussion: https://gcc.gnu.org/pipermail/gcc/2022-October/239544.html Some tiny test additions as well as more accurate check for when to split edges for coverage. This patch preserves the edge splitting heuristic except using a slightly more precise comparison, but makes a huge difference for the condition profiling [1]. I compared the .gcov files for the gcc and g++ testsuites with and without this patch and found no differences, and bootstrapped on x86_64-linux. [1] https://gcc.gnu.org/pipermail/gcc-patches/2022-July/598165.html Jørgen Kvalsvik (2): gcov: test switch/break line counts Split edge when edge locus and dest don't match gcc/profile.cc | 18 +++++++++--------- gcc/testsuite/g++.dg/gcov/gcov-1.C | 8 ++++---- gcc/testsuite/gcc.misc-tests/gcov-4.c | 4 ++-- 3 files changed, 15 insertions(+), 15 deletions(-)