]>
Commit | Line | Data |
---|---|---|
44359ced | 1 | /* coverage.h - Defines data exported from coverage.c |
fbd26352 | 2 | Copyright (C) 1998-2019 Free Software Foundation, Inc. |
880fd2c0 | 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 | |
8c4c00c1 | 8 | Software Foundation; either version 3, or (at your option) any later |
880fd2c0 | 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 | |
8c4c00c1 | 17 | along with GCC; see the file COPYING3. If not see |
18 | <http://www.gnu.org/licenses/>. */ | |
880fd2c0 | 19 | |
44359ced | 20 | #ifndef GCC_COVERAGE_H |
21 | #define GCC_COVERAGE_H | |
22 | ||
23 | #include "gcov-io.h" | |
880fd2c0 | 24 | |
44359ced | 25 | extern void coverage_init (const char *); |
26 | extern void coverage_finish (void); | |
cc563837 | 27 | extern void coverage_remove_note_file (void); |
015af757 | 28 | |
015af757 | 29 | /* Start outputting coverage information for the current |
6c56d3c9 | 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); | |
06306fd3 | 35 | |
a06672d4 | 36 | /* Compute the control flow checksum for the function FN given as argument. */ |
37 | extern unsigned coverage_compute_cfg_checksum (struct function *fn); | |
06306fd3 | 38 | |
fe37be54 | 39 | /* Compute the profile id of function N. */ |
40 | extern unsigned coverage_compute_profile_id (struct cgraph_node *n); | |
41 | ||
06306fd3 | 42 | /* Compute the line number checksum for the current function. */ |
43 | extern unsigned coverage_compute_lineno_checksum (void); | |
77a89ce1 | 44 | |
015af757 | 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. */ | |
4ee9c684 | 48 | extern tree tree_coverage_counter_ref (unsigned /*counter*/, unsigned/*num*/); |
a961cdc2 | 49 | /* Use a counter address from the most recent allocation. */ |
50 | extern tree tree_coverage_counter_addr (unsigned /*counter*/, unsigned/*num*/); | |
015af757 | 51 | |
52 | /* Get all the counters for the current function. */ | |
ab6a34f2 | 53 | extern gcov_type *get_coverage_counts (unsigned /*counter*/, |
06306fd3 | 54 | unsigned /*cfg_checksum*/, |
bed69f86 | 55 | unsigned /*lineno_checksum*/, |
56 | unsigned /*n_counts*/); | |
44359ced | 57 | |
b1b07349 | 58 | extern tree get_gcov_type (void); |
d9e50003 | 59 | extern bool coverage_node_map_initialized_p (void); |
b1b07349 | 60 | |
880fd2c0 | 61 | #endif |