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.
References crc32_byte(), edge_def::dest, basic_block_def::index, and basic_block_def::succs.
Referenced by branch_prob().
unsigned coverage_compute_lineno_checksum |
( |
void |
| ) |
|
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.
References bbg_file_name, coverage_obj_finish(), coverage_obj_fn(), coverage_obj_init(), da_file_name, coverage_data::fn_decl, functions_head, gcov_close(), local_tick, and coverage_data::next.
Referenced by ipa_passes().
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.
References counts_entry::cfg_checksum, counts_entry::counts, counts_hash, counts_entry::ctr, ctr_names, current_function_decl, da_file_name, counts_entry::ident, inform(), input_location, counts_entry::lineno_checksum, gcov_ctr_summary::num, seen_error(), counts_entry::summary, warning(), and warning_at().
Referenced by compute_value_histograms(), and get_exec_counts().
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.