1 /* Definitions for the gcov counters in the GNU compiler.
2 Copyright (C
) 2001-2023 Free Software Foundation
, Inc.
4 This file is part of GCC.
6 GCC is free software
; you can redistribute it and
/or modify it under
7 the terms of the GNU General Public License as published by the Free
8 Software Foundation
; either version
3, or (at your option
) any later
11 GCC is distributed in the hope that it will be useful
, but WITHOUT ANY
12 WARRANTY
; without even the implied warranty of MERCHANTABILITY or
13 FITNESS
FOR A PARTICULAR PURPOSE. See the GNU General Public License
16 You should have received a copy of the GNU General Public License
17 along with GCC
; see the file COPYING3. If not see
18 <http
://www.gnu.org
/licenses
/>.
*/
20 /* Before including this file
, define a macro
:
22 DEF_GCOV_COUNTER(COUNTER
, NAME
, FN_TYPE
)
24 This macro will be expanded to all supported gcov counters
, their
25 names
, or the type of handler functions. FN_TYPE will be
26 expanded to a handler function
, like in gcov_merge
, it is
27 expanded to __gcov_merge ## FN_TYPE.
*/
29 /* Arc transitions.
*/
30 DEF_GCOV_COUNTER(GCOV_COUNTER_ARCS
, "arcs", _add
)
32 /* Histogram of value inside an interval.
*/
33 DEF_GCOV_COUNTER(GCOV_COUNTER_V_INTERVAL
, "interval", _add
)
35 /* Histogram of exact power2 logarithm of a value.
*/
36 DEF_GCOV_COUNTER(GCOV_COUNTER_V_POW2
, "pow2", _add
)
38 /* The most common value of expression.
*/
39 DEF_GCOV_COUNTER(GCOV_COUNTER_V_TOPN
, "topn", _topn
)
41 /* The most common indirect address.
*/
42 DEF_GCOV_COUNTER(GCOV_COUNTER_V_INDIR
, "indirect_call", _topn
)
44 /* Compute average value passed to the counter.
*/
45 DEF_GCOV_COUNTER(GCOV_COUNTER_AVERAGE
, "average", _add
)
47 /* IOR of the all values passed to counter.
*/
48 DEF_GCOV_COUNTER(GCOV_COUNTER_IOR
, "ior", _ior
)
50 /* Time profile collecting first run of a function
*/
51 DEF_GCOV_COUNTER(GCOV_TIME_PROFILER
, "time_profiler", _time_profile
)