]>
Commit | Line | Data |
---|---|---|
e53b6e56 | 1 | /* coverage.h - Defines data exported from coverage.cc |
a945c346 | 2 | Copyright (C) 1998-2024 Free Software Foundation, Inc. |
52015d87 JH |
3 | |
4 | This file is part of GCC. | |
5 | ||
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 | |
9dcd6f09 | 8 | Software Foundation; either version 3, or (at your option) any later |
52015d87 JH |
9 | version. |
10 | ||
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 | |
14 | for more details. | |
15 | ||
16 | You should have received a copy of the GNU General Public License | |
9dcd6f09 NC |
17 | along with GCC; see the file COPYING3. If not see |
18 | <http://www.gnu.org/licenses/>. */ | |
52015d87 | 19 | |
ca29da43 NS |
20 | #ifndef GCC_COVERAGE_H |
21 | #define GCC_COVERAGE_H | |
22 | ||
23 | #include "gcov-io.h" | |
52015d87 | 24 | |
ca29da43 NS |
25 | extern void coverage_init (const char *); |
26 | extern void coverage_finish (void); | |
4ebcdc23 | 27 | extern void coverage_remove_note_file (void); |
6d70e6be | 28 | |
6d70e6be | 29 | /* Start outputting coverage information for the current |
b724567e NS |
30 | function. */ |
31 | extern int coverage_begin_function (unsigned, unsigned); | |
32 | ||
33 | /* Complete the coverage information for the current function. */ | |
34 | extern void coverage_end_function (unsigned, unsigned); | |
10adac51 | 35 | |
a96bf0d3 ML |
36 | /* Compute the control flow checksum for the function FN given as argument. */ |
37 | extern unsigned coverage_compute_cfg_checksum (struct function *fn); | |
10adac51 | 38 | |
2fa3d31b JH |
39 | /* Compute the profile id of function N. */ |
40 | extern unsigned coverage_compute_profile_id (struct cgraph_node *n); | |
41 | ||
10adac51 XDL |
42 | /* Compute the line number checksum for the current function. */ |
43 | extern unsigned coverage_compute_lineno_checksum (void); | |
cb9e4555 | 44 | |
6d70e6be NS |
45 | /* Allocate some counters. Repeatable per function. */ |
46 | extern int coverage_counter_alloc (unsigned /*counter*/, unsigned/*num*/); | |
47 | /* Use a counter from the most recent allocation. */ | |
6de9cd9a | 48 | extern tree tree_coverage_counter_ref (unsigned /*counter*/, unsigned/*num*/); |
fc9161c1 RG |
49 | /* Use a counter address from the most recent allocation. */ |
50 | extern tree tree_coverage_counter_addr (unsigned /*counter*/, unsigned/*num*/); | |
6d70e6be NS |
51 | |
52 | /* Get all the counters for the current function. */ | |
cdb23767 | 53 | extern gcov_type *get_coverage_counts (unsigned /*counter*/, |
10adac51 | 54 | unsigned /*cfg_checksum*/, |
0418f237 JH |
55 | unsigned /*lineno_checksum*/, |
56 | unsigned /*n_counts*/); | |
ca29da43 | 57 | |
251e2ff2 | 58 | extern tree get_gcov_type (void); |
2243ba51 | 59 | extern bool coverage_node_map_initialized_p (void); |
251e2ff2 | 60 | |
52015d87 | 61 | #endif |