diff options
Diffstat (limited to 'gcc/gcov-io.h')
-rw-r--r-- | gcc/gcov-io.h | 36 |
1 files changed, 31 insertions, 5 deletions
diff --git a/gcc/gcov-io.h b/gcc/gcov-io.h index d21a43c..4dba01c 100644 --- a/gcc/gcov-io.h +++ b/gcc/gcov-io.h @@ -25,7 +25,13 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see <http://www.gnu.org/licenses/>. */ -/* Coverage information is held in two files. A notes file, which is +/* CAVEAT: Coverage information files should not be parsed directly, + instead use `gcov --json-format`, which provides + machine-readable coverage information. + + Note that the following file format documentation might be outdated. + + Coverage information is held in two files. A notes file, which is generated by the compiler, and a data file, which is generated by the program under test. Both files use a similar structure. We do not attempt to make these files backwards compatible with previous @@ -164,6 +170,17 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #ifndef GCC_GCOV_IO_H #define GCC_GCOV_IO_H +/* GCOV key-value pair linked list type. */ + +struct gcov_kvp; + +struct gcov_kvp +{ + gcov_type value; + gcov_type count; + struct gcov_kvp *next; +}; + #ifndef IN_LIBGCOV /* About the host */ @@ -266,11 +283,17 @@ GCOV_COUNTERS #define GCOV_N_VALUE_COUNTERS \ (GCOV_LAST_VALUE_COUNTER - GCOV_FIRST_VALUE_COUNTER + 1) -/* Number of top N value histogram. */ -#define GCOV_TOPN_VALUES 4 +/* Number of top N counters when being in memory. */ +#define GCOV_TOPN_MEM_COUNTERS 3 + +/* Number of top N counters in disk representation. */ +#define GCOV_TOPN_DISK_COUNTERS 2 + +/* Maximum number of tracked TOP N value profiles. */ +#define GCOV_TOPN_MAXIMUM_TRACKED_VALUES 32 -/* Total number of single value counters. */ -#define GCOV_TOPN_VALUES_COUNTERS (2 * GCOV_TOPN_VALUES + 1) +/* Number of pre-allocated gcov_kvp structures. */ +#define GCOV_PREALLOCATED_KVP 16 /* Convert a counter index to a tag. */ #define GCOV_TAG_FOR_COUNTER(COUNT) \ @@ -326,6 +349,9 @@ struct gcov_summary #if !IN_LIBGCOV GCOV_LINKAGE int gcov_open (const char */*name*/, int /*direction*/); +#endif + +#if !IN_LIBGCOV || defined (IN_GCOV_TOOL) GCOV_LINKAGE int gcov_magic (gcov_unsigned_t, gcov_unsigned_t); #endif |