IA MCU psABI support: changes to libraries
[gcc.git] / gcc / gcov-io.h
index 1a9f07694e8f006caf45cffb322200a5ab1a0a1f..dcb29441f61e85e23005c1ef2808a0a86de3dfaf 100644 (file)
@@ -1,5 +1,5 @@
 /* File format for coverage information
-   Copyright (C) 1996-2014 Free Software Foundation, Inc.
+   Copyright (C) 1996-2015 Free Software Foundation, Inc.
    Contributed by Bob Manson <manson@cygnus.com>.
    Completely remangled by Nathan Sidwell <nathan@codesourcery.com>.
 
@@ -172,8 +172,8 @@ typedef unsigned gcov_position_t;
 /* gcov_type is typedef'd elsewhere for the compiler */
 #if IN_GCOV
 #define GCOV_LINKAGE static
-typedef HOST_WIDEST_INT gcov_type;
-typedef unsigned HOST_WIDEST_INT gcov_type_unsigned;
+typedef int64_t gcov_type;
+typedef uint64_t gcov_type_unsigned;
 #if IN_GCOV > 0
 #include <sys/types.h>
 #endif
@@ -199,7 +199,7 @@ typedef unsigned HOST_WIDEST_INT gcov_type_unsigned;
 #define gcov_nonruntime_assert(EXPR) ((void)(0 && (EXPR)))
 #else
 #define gcov_nonruntime_assert(EXPR) gcc_assert (EXPR)
-#define gcov_error(...) fatal_error (__VA_ARGS__)
+#define gcov_error(...) fatal_error (input_location, __VA_ARGS__)
 #endif
 
 /* File suffixes.  */
@@ -244,52 +244,40 @@ typedef unsigned HOST_WIDEST_INT gcov_type_unsigned;
 #define GCOV_TAG_PROGRAM_SUMMARY ((gcov_unsigned_t)0xa3000000)
 #define GCOV_TAG_SUMMARY_LENGTH(NUM)  \
         (1 + GCOV_COUNTERS_SUMMABLE * (10 + 3 * 2) + (NUM) * 5)
+#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)
 
 
 /* Counters that are collected.  */
-#define GCOV_COUNTER_ARCS      0  /* Arc transitions.  */
-#define GCOV_COUNTERS_SUMMABLE 1  /* Counters which can be
-                                     summaried.  */
-#define GCOV_FIRST_VALUE_COUNTER 1 /* The first of counters used for value
-                                     profiling.  They must form a consecutive
-                                     interval and their order must match
-                                     the order of HIST_TYPEs in
-                                     value-prof.h.  */
-#define GCOV_COUNTER_V_INTERVAL        1  /* Histogram of value inside an interval.  */
-#define GCOV_COUNTER_V_POW2    2  /* Histogram of exact power2 logarithm
-                                     of a value.  */
-#define GCOV_COUNTER_V_SINGLE  3  /* The most common value of expression.  */
-#define GCOV_COUNTER_V_DELTA   4  /* The most common difference between
-                                     consecutive values of expression.  */
-
-#define GCOV_COUNTER_V_INDIR   5  /* The most common indirect address */
-#define GCOV_COUNTER_AVERAGE   6  /* Compute average value passed to the
-                                     counter.  */
-#define GCOV_COUNTER_IOR       7  /* IOR of the all values passed to
-                                     counter.  */
-#define GCOV_TIME_PROFILER  8 /* Time profile collecting first run of a function */
-#define GCOV_LAST_VALUE_COUNTER 8  /* The last of counters used for value
-                                     profiling.  */
-#define GCOV_COUNTERS          9
+
+#define DEF_GCOV_COUNTER(COUNTER, NAME, MERGE_FN) COUNTER,
+enum {
+#include "gcov-counter.def"
+GCOV_COUNTERS
+};
+#undef DEF_GCOV_COUNTER
+
+/* Counters which can be summaried.  */
+#define GCOV_COUNTERS_SUMMABLE (GCOV_COUNTER_ARCS + 1)
+
+/* The first of counters used for value profiling.  They must form a
+   consecutive interval and their order must match the order of
+   HIST_TYPEs in value-prof.h.  */
+#define GCOV_FIRST_VALUE_COUNTER GCOV_COUNTERS_SUMMABLE
+
+/* The last of counters used for value profiling.  */
+#define GCOV_LAST_VALUE_COUNTER (GCOV_COUNTERS - 1)
 
 /* Number of counters used for value profiling.  */
 #define GCOV_N_VALUE_COUNTERS \
   (GCOV_LAST_VALUE_COUNTER - GCOV_FIRST_VALUE_COUNTER + 1)
 
-  /* A list of human readable names of the counters */
-#define GCOV_COUNTER_NAMES     {"arcs", "interval", "pow2", "single", \
-              "delta", "indirect_call", "average", "ior", "time_profiler"}
-
-  /* Names of merge functions for counters.  */
-#define GCOV_MERGE_FUNCTIONS   {"__gcov_merge_add",    \
-                                "__gcov_merge_add",    \
-                                "__gcov_merge_add",    \
-                                "__gcov_merge_single", \
-                                "__gcov_merge_delta",  \
-                                "__gcov_merge_single", \
-                                "__gcov_merge_add",    \
-                                "__gcov_merge_ior",  \
-         "__gcov_merge_time_profile" }
+/* The number of hottest callees to be tracked.  */
+#define GCOV_ICALL_TOPN_VAL  2
+
+/* The number of counter entries per icall callsite.  */
+#define GCOV_ICALL_TOPN_NCOUNTS (1 + GCOV_ICALL_TOPN_VAL * 4)
 
 /* Convert a counter index to a tag.  */
 #define GCOV_TAG_FOR_COUNTER(COUNT)                            \