public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
From: Martin Liska <marxin@gcc.gnu.org>
To: gcc-cvs@gcc.gnu.org
Subject: [gcc r13-3248] gcov: rename gcov_write_summary
Date: Wed, 12 Oct 2022 08:53:33 +0000 (GMT)	[thread overview]
Message-ID: <20221012085333.E90B938582BC@sourceware.org> (raw)

https://gcc.gnu.org/g:a9c83fb79530ec58017d669e7a951e1b582ab0b4

commit r13-3248-ga9c83fb79530ec58017d669e7a951e1b582ab0b4
Author: Martin Liska <mliska@suse.cz>
Date:   Tue Oct 11 20:45:21 2022 +0200

    gcov: rename gcov_write_summary
    
    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.

Diff:
---
 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;

                 reply	other threads:[~2022-10-12  8:53 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20221012085333.E90B938582BC@sourceware.org \
    --to=marxin@gcc.gnu.org \
    --cc=gcc-cvs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).