aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/gcov-io.h
diff options
context:
space:
mode:
Diffstat (limited to 'gcc-4.9/gcc/gcov-io.h')
-rw-r--r--gcc-4.9/gcc/gcov-io.h43
1 files changed, 42 insertions, 1 deletions
diff --git a/gcc-4.9/gcc/gcov-io.h b/gcc-4.9/gcc/gcov-io.h
index 50ffa557a..e67bce4ea 100644
--- a/gcc-4.9/gcc/gcov-io.h
+++ b/gcc-4.9/gcc/gcov-io.h
@@ -129,7 +129,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
blocks they are for.
The data file contains the following records.
- data: {unit summary:object summary:program* function-data*}*
+ data: {unit summary:program* build_info zero_fixup function-data*}*
unit: header int32:checksum
function-data: announce_function present counts
announce_function: header int32:ident
@@ -141,6 +141,8 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
int64:max int64:sum_max histogram
histogram: {int32:bitvector}8 histogram-buckets*
histogram-buckets: int32:num int64:min int64:sum
+ build_info: string:info*
+ zero_fixup: int32:num int32:bitvector*
The ANNOUNCE_FUNCTION record is the same as that in the note file,
but without the source location. The COUNTS gives the
@@ -152,6 +154,17 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
zero. Note that the data file might contain information from
several runs concatenated, or the data might be merged.
+ BUILD_INFO record contains a list of strings that is used
+ to include in the data file information about the profile generate
+ build. For example, it can be used to include source revision
+ information that is useful in diagnosing profile mis-matches.
+
+ ZERO_FIXUP record contains a count of functions in the gcda file
+ and an array of bitvectors indexed by the function index's in the
+ function-data section. Each bit flags whether the function was a
+ COMDAT that had all-zero profiles that was fixed up by dyn-ipa
+ using profiles from functions with matching checksums in other modules.
+
This file is included by both the compiler, gcov tools and the
runtime support library libgcov. IN_LIBGCOV and IN_GCOV are used to
distinguish which case is which. If IN_LIBGCOV is nonzero,
@@ -164,6 +177,18 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
#ifndef GCC_GCOV_IO_H
#define GCC_GCOV_IO_H
+#ifndef __KERNEL__
+# define _GCOV_FILE FILE
+# define _GCOV_fclose fclose
+# define _GCOV_ftell ftell
+# define _GCOV_fseek fseek
+# define _GCOV_ftruncate ftruncate
+# define _GCOV_fread fread
+# define _GCOV_fwrite fwrite
+# define _GCOV_fread fread
+# define _GCOV_fileno fileno
+#endif
+
#ifndef IN_LIBGCOV
/* About the host */
@@ -255,8 +280,12 @@ typedef unsigned HOST_WIDEST_INT gcov_type_unsigned;
#define GCOV_TAG_COUNTER_NUM(LENGTH) ((LENGTH) / 2)
#define GCOV_TAG_OBJECT_SUMMARY ((gcov_unsigned_t)0xa1000000) /* Obsolete */
#define GCOV_TAG_PROGRAM_SUMMARY ((gcov_unsigned_t)0xa3000000)
+#define GCOV_TAG_COMDAT_ZERO_FIXUP ((gcov_unsigned_t)0xa9000000)
+/* Ceiling divide by 32 bit word size, plus one word to hold NUM. */
+#define GCOV_TAG_COMDAT_ZERO_FIXUP_LENGTH(NUM) (1 + (NUM + 31) / 32)
#define GCOV_TAG_SUMMARY_LENGTH(NUM) \
(1 + GCOV_COUNTERS_SUMMABLE * (10 + 3 * 2) + (NUM) * 5)
+#define GCOV_TAG_BUILD_INFO ((gcov_unsigned_t)0xa7000000)
#define GCOV_TAG_MODULE_INFO ((gcov_unsigned_t)0xab000000)
#define GCOV_TAG_AFDO_FILE_NAMES ((gcov_unsigned_t)0xaa000000)
#define GCOV_TAG_AFDO_FUNCTION ((gcov_unsigned_t)0xac000000)
@@ -434,9 +463,16 @@ GCOV_LINKAGE int gcov_close (void) ATTRIBUTE_HIDDEN;
GCOV_LINKAGE gcov_unsigned_t gcov_read_unsigned (void) ATTRIBUTE_HIDDEN;
GCOV_LINKAGE gcov_type gcov_read_counter (void) ATTRIBUTE_HIDDEN;
GCOV_LINKAGE void gcov_read_summary (struct gcov_summary *) ATTRIBUTE_HIDDEN;
+GCOV_LINKAGE int *gcov_read_comdat_zero_fixup (gcov_unsigned_t,
+ gcov_unsigned_t *)
+ ATTRIBUTE_HIDDEN;
+GCOV_LINKAGE char **gcov_read_build_info (gcov_unsigned_t, gcov_unsigned_t *)
+ ATTRIBUTE_HIDDEN;
GCOV_LINKAGE const char *gcov_read_string (void);
GCOV_LINKAGE void gcov_sync (gcov_position_t /*base*/,
gcov_unsigned_t /*length */);
+GCOV_LINKAGE gcov_unsigned_t gcov_read_string_array (char **, gcov_unsigned_t)
+ ATTRIBUTE_HIDDEN;
#if !IN_LIBGCOV && IN_GCOV != 1
@@ -447,6 +483,11 @@ GCOV_LINKAGE void gcov_read_module_info (struct gcov_module_info *mod_info,
#if !IN_GCOV
/* Available outside gcov */
GCOV_LINKAGE void gcov_write_unsigned (gcov_unsigned_t) ATTRIBUTE_HIDDEN;
+GCOV_LINKAGE gcov_unsigned_t gcov_compute_string_array_len (char **,
+ gcov_unsigned_t)
+ ATTRIBUTE_HIDDEN;
+GCOV_LINKAGE void gcov_write_string_array (char **, gcov_unsigned_t)
+ ATTRIBUTE_HIDDEN;
#endif
#if !IN_GCOV && !IN_LIBGCOV