196#define GCOV_LINKAGE static
200#include <sys/types.h>
204#if defined (HOST_HAS_F_SETLKW)
210#if defined (HOST_HAS_LK_LOCK)
211#define GCOV_LOCKED_WITH_LOCKING 1
213#define GCOV_LOCKED_WITH_LOCKING 0
216#define ATTRIBUTE_HIDDEN
221#define GCOV_LINKAGE extern
225#define gcov_nonruntime_assert(EXPR) ((void)(0 && (EXPR)))
227#define gcov_nonruntime_assert(EXPR) gcc_assert (EXPR)
228#define gcov_error(...) fatal_error (input_location, __VA_ARGS__)
232#define GCOV_DATA_SUFFIX ".gcda"
233#define GCOV_NOTE_SUFFIX ".gcno"
236#define GCOV_DATA_MAGIC ((gcov_unsigned_t)0x67636461)
237#define GCOV_NOTE_MAGIC ((gcov_unsigned_t)0x67636e6f)
238#define GCOV_FILENAME_MAGIC ((gcov_unsigned_t)0x6763666e)
243#define GCOV_UNSIGNED2STRING(ARRAY,VALUE) \
244 ((ARRAY)[0] = (char)((VALUE) >> 24), \
245 (ARRAY)[1] = (char)((VALUE) >> 16), \
246 (ARRAY)[2] = (char)((VALUE) >> 8), \
247 (ARRAY)[3] = (char)((VALUE) >> 0))
255#define GCOV_WORD_SIZE 4
257#define GCOV_TAG_FUNCTION ((gcov_unsigned_t)0x01000000)
258#define GCOV_TAG_FUNCTION_LENGTH (3 * GCOV_WORD_SIZE)
259#define GCOV_TAG_BLOCKS ((gcov_unsigned_t)0x01410000)
260#define GCOV_TAG_BLOCKS_LENGTH(NUM) (NUM)
261#define GCOV_TAG_ARCS ((gcov_unsigned_t)0x01430000)
262#define GCOV_TAG_ARCS_LENGTH(NUM) (1 + (NUM) * 2 * GCOV_WORD_SIZE)
263#define GCOV_TAG_ARCS_NUM(LENGTH) (((LENGTH / GCOV_WORD_SIZE) - 1) / 2)
264#define GCOV_TAG_CONDS ((gcov_unsigned_t)0x01470000)
265#define GCOV_TAG_CONDS_LENGTH(NUM) ((NUM) * 2 * GCOV_WORD_SIZE)
266#define GCOV_TAG_CONDS_NUM(LENGTH) (((LENGTH) / GCOV_WORD_SIZE) / 2)
267#define GCOV_TAG_LINES ((gcov_unsigned_t)0x01450000)
268#define GCOV_TAG_COUNTER_BASE ((gcov_unsigned_t)0x01a10000)
269#define GCOV_TAG_COUNTER_LENGTH(NUM) ((NUM) * 2 * GCOV_WORD_SIZE)
270#define GCOV_TAG_COUNTER_NUM(LENGTH) ((LENGTH / GCOV_WORD_SIZE) / 2)
271#define GCOV_TAG_OBJECT_SUMMARY ((gcov_unsigned_t)0xa1000000)
272#define GCOV_TAG_OBJECT_SUMMARY_LENGTH (2 * GCOV_WORD_SIZE)
273#define GCOV_TAG_PROGRAM_SUMMARY ((gcov_unsigned_t)0xa3000000)
274#define GCOV_TAG_AFDO_FILE_NAMES ((gcov_unsigned_t)0xaa000000)
275#define GCOV_TAG_AFDO_FUNCTION ((gcov_unsigned_t)0xac000000)
276#define GCOV_TAG_AFDO_WORKING_SET ((gcov_unsigned_t)0xaf000000)
281#define DEF_GCOV_COUNTER(COUNTER, NAME, MERGE_FN) COUNTER,
283#include "gcov-counter.def"
286#undef DEF_GCOV_COUNTER
291#define GCOV_FIRST_VALUE_COUNTER GCOV_COUNTER_V_INTERVAL
294#define GCOV_LAST_VALUE_COUNTER (GCOV_COUNTERS - 1)
297#define GCOV_N_VALUE_COUNTERS \
298 (GCOV_LAST_VALUE_COUNTER - GCOV_FIRST_VALUE_COUNTER + 1)
301#define GCOV_TOPN_MEM_COUNTERS 3
304#define GCOV_TOPN_DISK_COUNTERS 2
307#define GCOV_TOPN_MAXIMUM_TRACKED_VALUES 32
310#define GCOV_TAG_FOR_COUNTER(COUNT) \
311 (GCOV_TAG_COUNTER_BASE + ((gcov_unsigned_t)(COUNT) << 17))
313#define GCOV_COUNTER_FOR_TAG(TAG) \
314 ((unsigned)(((TAG) - GCOV_TAG_COUNTER_BASE) >> 17))
316#define GCOV_TAG_IS_COUNTER(TAG) \
317 (!((TAG) & 0xFFFF) && GCOV_COUNTER_FOR_TAG (TAG) < GCOV_COUNTERS)
322#define GCOV_TAG_MASK(TAG) (((TAG) - 1) ^ (TAG))
325#define GCOV_TAG_IS_SUBTAG(TAG,SUB) \
326 (GCOV_TAG_MASK (TAG) >> 8 == GCOV_TAG_MASK (SUB) \
327 && !(((SUB) ^ (TAG)) & ~GCOV_TAG_MASK (TAG)))
330#define GCOV_TAG_IS_SUBLEVEL(TAG,SUB) \
331 (GCOV_TAG_MASK (TAG) > GCOV_TAG_MASK (SUB))
334#define GCOV_BLOCK_UNEXPECTED (1 << 1)
337#define GCOV_ARC_ON_TREE (1 << 0)
338#define GCOV_ARC_FAKE (1 << 1)
339#define GCOV_ARC_FALLTHROUGH (1 << 2)
340#define GCOV_ARC_TRUE (1 << 3)
341#define GCOV_ARC_FALSE (1 << 4)
351#if !defined(inhibit_libc)
363#if !IN_LIBGCOV || defined (IN_GCOV_TOOL)
384#if !IN_GCOV && !IN_LIBGCOV
uint64_t gcov_type_unsigned
Definition coretypes.h:47
int64_t gcov_type
Definition coretypes.h:46
unsigned gcov_unsigned_t
Definition gcov-io.h:192
char * mangle_path(char const *base)
Definition gcov-io.cc:463
GCOV_LINKAGE void gcov_write_filename(const char *)
Definition gcov-io.cc:309
GCOV_LINKAGE gcov_position_t gcov_write_tag(gcov_unsigned_t)
Definition gcov-io.cc:347
#define GCOV_LINKAGE
Definition gcov-io.h:221
GCOV_LINKAGE void gcov_write_unsigned(gcov_unsigned_t) ATTRIBUTE_HIDDEN
Definition gcov-io.cc:275
GCOV_LINKAGE void gcov_read_summary(struct gcov_summary *) ATTRIBUTE_HIDDEN
Definition gcov-io.cc:529
GCOV_LINKAGE gcov_type gcov_read_counter(void) ATTRIBUTE_HIDDEN
Definition gcov-io.cc:442
GCOV_LINKAGE int gcov_close(void) ATTRIBUTE_HIDDEN
Definition gcov-io.cc:223
#define ATTRIBUTE_HIDDEN
Definition gcov-io.h:216
GCOV_LINKAGE void gcov_write_string(const char *)
Definition gcov-io.cc:287
GCOV_LINKAGE gcov_unsigned_t gcov_read_unsigned(void) ATTRIBUTE_HIDDEN
Definition gcov-io.cc:425
unsigned gcov_position_t
Definition gcov-io.h:193
GCOV_LINKAGE void gcov_sync(gcov_position_t, gcov_unsigned_t)
Definition gcov-io.cc:542
GCOV_LINKAGE int gcov_open(const char *, int) ATTRIBUTE_HIDDEN
Definition gcov-io.cc:114
@ GCOV_COUNTERS
Definition gcov-io.h:340
GCOV_LINKAGE void gcov_write(const void *, unsigned) ATTRIBUTE_HIDDEN
Definition gcov-io.cc:265
GCOV_LINKAGE void gcov_write_length(gcov_position_t)
Definition gcov-io.cc:362
GCOV_LINKAGE int gcov_magic(gcov_unsigned_t, gcov_unsigned_t)
Definition gcov-io.cc:247
GCOV_LINKAGE const char * gcov_read_string(void)
Definition gcov-io.cc:516
struct gcov_kvp * next
Definition gcov-io.h:186
gcov_type value
Definition gcov-io.h:184
gcov_type count
Definition gcov-io.h:185
gcov_type sum_max
Definition gcov-io.h:348
gcov_unsigned_t runs
Definition gcov-io.h:347