Home | History | Annotate | Download | only in gcov-src

Lines Matching refs:counters

31    corresponding counter in COUNTERS.  If the VALUE is above or below
32 the interval, COUNTERS[STEPS] or COUNTERS[STEPS + 1] is increased
36 __gcov_interval_profiler (gcov_type *counters, gcov_type value,
41 counters[steps + 1]++;
43 counters[steps]++;
45 counters[delta]++;
50 /* If VALUE is a power of two, COUNTERS[1] is incremented. Otherwise
51 COUNTERS[0] is incremented. */
54 __gcov_pow2_profiler (gcov_type *counters, gcov_type value)
57 counters[0]++;
59 counters[1]++;
64 value stored in COUNTERS[0] matches VALUE. If this is the case, COUNTERS[1]
65 is incremented. If this is not the case and COUNTERS[1] is not zero,
66 COUNTERS[1] is decremented. Otherwise COUNTERS[1] is set to one and
67 VALUE is stored to COUNTERS[0]. This algorithm guarantees that if this
69 will be in COUNTERS[0] in the end.
71 In any case, COUNTERS[2] is incremented. */
74 __gcov_one_value_profiler_body (gcov_type *counters, gcov_type value)
76 if (value == counters[0])
77 counters[1]++;
78 else if (counters[1] == 0)
80 counters[1] = 1;
81 counters[0] = value;
84 counters[1]--;
85 counters[2]++;
90 __gcov_one_value_profiler_body_atomic (gcov_type *counters, gcov_type value)
92 if (value == counters[0])
93 GCOV_TYPE_ATOMIC_FETCH_ADD_FN (&counters[1], 1, MEMMODEL_RELAXED);
94 else if (counters[1] == 0)
96 counters[1] = 1;
97 counters[0] = value;
100 GCOV_TYPE_ATOMIC_FETCH_ADD_FN (&counters[1], -1, MEMMODEL_RELAXED);
101 GCOV_TYPE_ATOMIC_FETCH_ADD_FN (&counters[2], 1, MEMMODEL_RELAXED);
107 __gcov_one_value_profiler (gcov_type *counters, gcov_type value)
109 __gcov_one_value_profiler_body (counters, value);
113 __gcov_one_value_profiler_atomic (gcov_type *counters, gcov_type value)
115 __gcov_one_value_profiler_body_atomic (counters, value);
247 /* Tries to keep track the most frequent N values in the counters where
251 in the counters gets evicted/replaced due to limited capacity.
259 __gcov_topn_value_profiler_body (gcov_type *counters, gcov_type value,
265 gcov_type *lfu_entry = &counters[1];
266 gcov_type *value_array = &counters[1];
267 gcov_type *num_eviction = &counters[0];
445 /* Sets corresponding COUNTERS if there is no value. */
448 __gcov_time_profiler (gcov_type* counters)
450 if (!counters[0])
451 counters[0] = ++function_counter;
460 __gcov_average_profiler (gcov_type *counters, gcov_type value)
462 counters[0] += value;
463 counters[1] ++;
471 __gcov_ior_profiler (gcov_type *counters, gcov_type value)
473 *counters |= value;