Go to the source code of this file.
Function Documentation
int coverage_begin_function |
( |
unsigned |
, |
|
|
unsigned |
|
|
) |
| |
Start outputting coverage information for the current
function.
unsigned coverage_compute_cfg_checksum |
( |
void |
| ) |
|
Compute the control flow checksum for the current function.
Compute cfg checksum for the current function.
The checksum is calculated carefully so that
source code changes that doesn't affect the control flow graph
won't change the checksum.
This is to make the profile data useable across source code change.
The downside of this is that the compiler may use potentially
wrong profile data - that the source code change has non-trivial impact
on the validity of profile data (e.g. the reversed condition)
but the compiler won't detect the change and use the wrong profile data.
unsigned coverage_compute_lineno_checksum |
( |
void |
| ) |
|
Compute the line number checksum for the current function.
Compute checksum for the current function. We generate a CRC32.
unsigned coverage_compute_profile_id |
( |
struct cgraph_node * |
n | ) |
|
Compute the profile id of function N.
int coverage_counter_alloc |
( |
unsigned |
, |
|
|
unsigned |
|
|
) |
| |
Allocate some counters. Repeatable per function.
void coverage_end_function |
( |
unsigned |
, |
|
|
unsigned |
|
|
) |
| |
Complete the coverage information for the current function.
void coverage_finish |
( |
void |
| ) |
|
Performs file-level cleanup. Close notes file, generate coverage
variables and constructor.
Only remove the da file, if we're emitting coverage code and
cannot uniquely stamp it. If we can stamp it, libgcov will DTRT.
void coverage_init |
( |
const char * |
| ) |
|
gcov_type* get_coverage_counts |
( |
unsigned |
counter, |
|
|
unsigned |
expected, |
|
|
unsigned |
cfg_checksum, |
|
|
unsigned |
lineno_checksum, |
|
|
const struct gcov_ctr_summary ** |
summary |
|
) |
| |
Get all the counters for the current function.
Returns the counters for a particular tag.
No hash table, no counts.
The function was not emitted, or is weak and not chosen in the
final executable. Silently fail, because there's nothing we
can do about it.
tree get_gcov_type |
( |
void |
| ) |
|
tree tree_coverage_counter_addr |
( |
unsigned |
, |
|
|
unsigned |
|
|
) |
| |
Use a counter address from the most recent allocation.
tree tree_coverage_counter_ref |
( |
unsigned |
, |
|
|
unsigned |
|
|
) |
| |
Use a counter from the most recent allocation.