From patchwork Wed Oct 12 08:52:47 2022 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: 1953 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4ac7:0:0:0:0:0 with SMTP id y7csp2501431wrs; Wed, 12 Oct 2022 01:53:17 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4bhn1ptdanX4uENlm0klqgtE8kY2ajA0TVjtCETFst5l8QH136hmQKdFUzT67XH1OM9XyM X-Received: by 2002:a17:906:7193:b0:78d:b87e:6aa5 with SMTP id h19-20020a170906719300b0078db87e6aa5mr10472088ejk.580.1665564797296; Wed, 12 Oct 2022 01:53:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1665564797; cv=none; d=google.com; s=arc-20160816; b=tq1/iZHXu0lB01uX7iJl662002Ah5jvIHNqsEUQlty187XPk40IZMLrMq7C6U45WLC wQYYg8Vvkp5ymLHbm31xN3h16SJSaG2qOYznOYDxlsAJqzJCtSgnCl+o80LOks0apWw2 OdtjFhHR7lXxM8NPG+BQQMjBVukDXiG3t98xLyOasN372f+c+nH4Cqr49Qzhq5RsY1dd 1GnSYQIcEHhm7rKyxR2fomrMW3VIvxDInWasMNO5pCNzcgPD0rZ7/6MMWJEuYfQywDlo RAhOn1s5nU03z/Y7T03HBkxhFCmS09zt7tcas9RKcDsu513BqNXecfF7QzYNPfJuBgNP GJ2Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :content-language:to:subject:from:user-agent:mime-version:date :message-id:dkim-signature:dkim-signature:dmarc-filter:delivered-to; bh=WhbJ8IZmDhiuJcvLohvompcTsAxDR5gLcoiywA76VOs=; b=ELv+GgKcTJrpW/4teTz9t9IgFu9MwXDZxQtzSPpYZTQ7HBOh8BrI/YaLGjJf9RYLAp FYovXfDXotfTk8T2cE2+5lXpyknLvbHfHH14UvRsZ0iLkKs/tdUEAJdB/TrKD9NAbMf7 X7fbQdi+wGZFQY3tx+E1n8dg+uruxbf0DelWJ7/VYK2UsdvNWGKWfghMB5F9bCh2ysQY JNRxniW4Y49pr6P3/5rNZbynRD3LyF2WP3tZD0rbEB89xske5MzeMHam3miFRH8bB6Nh SKOQabajkRYg/r3luAMH/DrI+mMlVxO5KZfci3sPpT8sJ02ETykh2duxQ1UtbtqF8ry2 h7lQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b="H3/U8ZiY"; dkim=neutral (no key) header.i=@suse.cz; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org" Received: from sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id gb38-20020a170907962600b0078dcf11ccf7si5628307ejc.802.2022.10.12.01.53.17 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 12 Oct 2022 01:53:17 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) client-ip=2620:52:3:1:0:246e:9693:128c; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b="H3/U8ZiY"; dkim=neutral (no key) header.i=@suse.cz; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org" Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 601503851153 for ; Wed, 12 Oct 2022 08:53:13 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from smtp-out1.suse.de (smtp-out1.suse.de [IPv6:2001:67c:2178:6::1c]) by sourceware.org (Postfix) with ESMTPS id 7AE043856DD6 for ; Wed, 12 Oct 2022 08:52:49 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 7AE043856DD6 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=suse.cz Authentication-Results: sourceware.org; spf=fail smtp.mailfrom=suse.cz Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 6FE9221994 for ; Wed, 12 Oct 2022 08:52:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1665564768; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=WhbJ8IZmDhiuJcvLohvompcTsAxDR5gLcoiywA76VOs=; b=H3/U8ZiYKj4HXaFPynyjuJt867TnCxOoeeN+VsoEK9NI9cLTFxd7NO5M04WzUshUAkdc+3 vHKSRPheKkNdkzAZCe7UwJHqGMvO6nyvnJS6IUw4hRHXwNKBGbGfqmIG4mAZ6TeVRR6TKB l7mieN99Ce5hz3uQCJIKw/TwVKzs/9Y= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1665564768; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=WhbJ8IZmDhiuJcvLohvompcTsAxDR5gLcoiywA76VOs=; b=kkUVJgLcw1RVFZd0yFCNl1uUaffYrzNG2bg6jB8qUoFfWjID6hSlwLndBl4kUumZTYA/qD kj7M3ahTA6+Jw4AQ== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 58B6D13ACD for ; Wed, 12 Oct 2022 08:52:48 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id HYV6FGCARmP4ZgAAMHmgww (envelope-from ) for ; Wed, 12 Oct 2022 08:52:48 +0000 Message-ID: <75cc66bb-b74c-e1ea-ca23-85cf555d6359@suse.cz> Date: Wed, 12 Oct 2022 10:52:47 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.3.1 From: =?utf-8?q?Martin_Li=C5=A1ka?= Subject: [COMMITTED] gcov: rename gcov_write_summary To: gcc-patches@gcc.gnu.org Content-Language: en-US X-Spam-Status: No, score=-12.2 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_LOW, SPF_HELO_NONE, SPF_SOFTFAIL, TXREP 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: , 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?1746471272800095386?= X-GMAIL-MSGID: =?utf-8?q?1746471272800095386?= Patch can bootstrap on x86_64-linux-gnu and survives regression tests. I'm going to install it. Martin gcc/ChangeLog: * gcov-io.cc (gcov_write_summary): Rename to ... (gcov_write_object_summary): ... this. * gcov-io.h (GCOV_TAG_OBJECT_SUMMARY_LENGTH): Rename from ... (GCOV_TAG_SUMMARY_LENGTH): ... this. libgcc/ChangeLog: * libgcov-driver.c: Use new function. * libgcov.h (gcov_write_summary): Rename to ... (gcov_write_object_summary): ... this. --- gcc/gcov-io.cc | 8 ++++---- gcc/gcov-io.h | 2 +- libgcc/libgcov-driver.c | 2 +- libgcc/libgcov.h | 5 ++--- 4 files changed, 8 insertions(+), 9 deletions(-) diff --git a/gcc/gcov-io.cc b/gcc/gcov-io.cc index 62032ccfa18..af5b13c2cf9 100644 --- a/gcc/gcov-io.cc +++ b/gcc/gcov-io.cc @@ -372,13 +372,13 @@ gcov_write_length (gcov_position_t position) #else /* IN_LIBGCOV */ -/* Write a summary structure to the gcov file. */ +/* Write an object summary structure to the gcov file. */ GCOV_LINKAGE void -gcov_write_summary (gcov_unsigned_t tag, const struct gcov_summary *summary) +gcov_write_object_summary (const struct gcov_summary *summary) { - gcov_write_unsigned (tag); - gcov_write_unsigned (GCOV_TAG_SUMMARY_LENGTH); + gcov_write_unsigned (GCOV_TAG_OBJECT_SUMMARY); + gcov_write_unsigned (GCOV_TAG_OBJECT_SUMMARY_LENGTH); gcov_write_unsigned (summary->runs); gcov_write_unsigned (summary->sum_max); } diff --git a/gcc/gcov-io.h b/gcc/gcov-io.h index 30947634d73..e91cd736556 100644 --- a/gcc/gcov-io.h +++ b/gcc/gcov-io.h @@ -266,8 +266,8 @@ typedef uint64_t gcov_type_unsigned; #define GCOV_TAG_COUNTER_LENGTH(NUM) ((NUM) * 2 * GCOV_WORD_SIZE) #define GCOV_TAG_COUNTER_NUM(LENGTH) ((LENGTH / GCOV_WORD_SIZE) / 2) #define GCOV_TAG_OBJECT_SUMMARY ((gcov_unsigned_t)0xa1000000) +#define GCOV_TAG_OBJECT_SUMMARY_LENGTH (2 * GCOV_WORD_SIZE) #define GCOV_TAG_PROGRAM_SUMMARY ((gcov_unsigned_t)0xa3000000) /* Obsolete */ -#define GCOV_TAG_SUMMARY_LENGTH (2 * GCOV_WORD_SIZE) #define GCOV_TAG_AFDO_FILE_NAMES ((gcov_unsigned_t)0xaa000000) #define GCOV_TAG_AFDO_FUNCTION ((gcov_unsigned_t)0xac000000) #define GCOV_TAG_AFDO_WORKING_SET ((gcov_unsigned_t)0xaf000000) diff --git a/libgcc/libgcov-driver.c b/libgcc/libgcov-driver.c index aba62d588b8..e1b74c81e07 100644 --- a/libgcc/libgcov-driver.c +++ b/libgcc/libgcov-driver.c @@ -520,7 +520,7 @@ write_one_data (const struct gcov_info *gi_ptr, #ifdef NEED_L_GCOV /* Generate whole program statistics. */ - gcov_write_summary (GCOV_TAG_OBJECT_SUMMARY, prg_p); + gcov_write_object_summary (prg_p); #endif /* Write execution counts for each function. */ diff --git a/libgcc/libgcov.h b/libgcc/libgcov.h index c7545cc746e..5e7bd0e3454 100644 --- a/libgcc/libgcov.h +++ b/libgcc/libgcov.h @@ -118,7 +118,7 @@ typedef unsigned gcov_type_unsigned __attribute__ ((mode (QI))); #define gcov_rewrite __gcov_rewrite #define gcov_is_error __gcov_is_error #define gcov_write_unsigned __gcov_write_unsigned -#define gcov_write_summary __gcov_write_summary +#define gcov_write_object_summary __gcov_write_object_summary #define gcov_read_unsigned __gcov_read_unsigned #define gcov_read_counter __gcov_read_counter #define gcov_read_summary __gcov_read_summary @@ -342,8 +342,7 @@ extern int __gcov_execve (const char *, char *const [], char *const []) ATTRIBUTE_HIDDEN; /* Functions that only available in libgcov. */ -GCOV_LINKAGE void gcov_write_summary (gcov_unsigned_t /*tag*/, - const struct gcov_summary *) +GCOV_LINKAGE void gcov_write_object_summary (const struct gcov_summary *) ATTRIBUTE_HIDDEN; GCOV_LINKAGE void gcov_rewrite (void) ATTRIBUTE_HIDDEN;