#include "config.h"#include "system.h"#include "coretypes.h"#include "tm.h"#include "rtl.h"#include "tree.h"#include "flags.h"#include "output.h"#include "regs.h"#include "expr.h"#include "function.h"#include "toplev.h"#include "ggc.h"#include "coverage.h"#include "langhooks.h"#include "hashtab.h"#include "tree-iterator.h"#include "cgraph.h"#include "gcov-io.c"#include "gt-coverage.h"

Go to the source code of this file.
| #define GCOV_LINKAGE |
Definition at line 27 of file coverage.c.
| typedef struct counts_entry counts_entry_t |
Definition at line 663 of file coverage.c.
References build_decl, build_function_type_list(), build_pointer_type(), finish_builtin_struct(), get_gcov_type(), get_gcov_unsigned_t(), NULL_TREE, TREE_CHAIN, and void_type_node.
Definition at line 700 of file coverage.c.
References assemble_variable(), build1, build_array_type(), build_constructor_from_list(), build_decl, build_index_type(), build_int_cstu(), DECL_ARTIFICIAL, DECL_EXTERNAL, DECL_SIZE, DECL_SIZE_UNIT, get_gcov_unsigned_t(), get_identifier(), nreverse(), null_pointer_node, NULL_TREE, prg_n_ctrs, TREE_CHAIN, tree_cons, TREE_NOTHROW, TREE_PUBLIC, TREE_TYPE, TYPE_FIELDS, TYPE_SIZE, and TYPE_SIZE_UNIT.
| static tree build_fn_info_type | ( | unsigned int | counters | ) | [static] |
Definition at line 589 of file coverage.c.
References build_array_type(), build_decl, build_index_type(), build_int_cst(), finish_builtin_struct(), get_gcov_unsigned_t(), NULL_TREE, and TREE_CHAIN.
| static tree build_fn_info_value | ( | const struct function_list * | function, | |
| tree | type | |||
| ) | [static] |
Definition at line 622 of file coverage.c.
References build_constructor_from_list(), build_int_cstu(), function_list::checksum, GCOV_COUNTERS, get_gcov_unsigned_t(), function_list::ident, function_list::n_ctrs, nreverse(), NULL_TREE, prg_ctr_mask, TREE_CHAIN, tree_cons, TREE_TYPE, and TYPE_FIELDS.
Definition at line 758 of file coverage.c.
References build1, build_array_type(), build_constructor_from_list(), build_ctr_info_type(), build_ctr_info_value(), build_decl, build_fn_info_type(), build_fn_info_value(), build_index_type(), build_int_cst(), build_int_cstu(), build_pointer_type(), build_qualified_type(), build_string(), char_type_node, concat(), da_file_name, filename, finish_builtin_struct(), free(), GCOV_COUNTERS, get_gcov_unsigned_t(), getpwd(), local_tick, function_list::next, nreverse(), NULL, null_pointer_node, NULL_TREE, prg_ctr_mask, strlen(), TREE_CHAIN, tree_cons, TREE_TYPE, and TYPE_QUAL_CONST.
| static unsigned compute_checksum | ( | void | ) | [static] |
Definition at line 490 of file coverage.c.
References chksum, coverage_checksum_string(), current_function_decl, DECL_ASSEMBLER_NAME, DECL_SOURCE_LOCATION, expand_location, and IDENTIFIER_POINTER.
| int coverage_begin_output | ( | void | ) |
Definition at line 509 of file coverage.c.
References bbg_file_name, bbg_file_opened, bbg_function_announced, compute_checksum(), current_function_decl, current_function_funcdef_no, DECL_ASSEMBLER_NAME, DECL_SOURCE_LOCATION, error(), expand_location, gcov_is_error(), GCOV_NOTE_MAGIC, gcov_open(), GCOV_TAG_FUNCTION, gcov_write_length(), gcov_write_string(), gcov_write_tag(), gcov_write_unsigned(), IDENTIFIER_POINTER, local_tick, no_coverage, and offset.
| static unsigned coverage_checksum_string | ( | unsigned | chksum, | |
| const char * | string | |||
| ) | [static] |
| int coverage_counter_alloc | ( | unsigned | counter, | |
| unsigned | num | |||
| ) |
Definition at line 381 of file coverage.c.
References ASM_GENERATE_INTERNAL_LABEL, buf, build_array_type(), build_decl, build_index_type(), build_int_cst(), DECL_ALIGN, DECL_NAME, fn_b_ctrs, fn_ctr_mask, fn_n_ctrs, GCOV_TYPE_NODE, get_gcov_type(), get_identifier(), no_coverage, NULL_TREE, TREE_STATIC, and TYPE_ALIGN.
Definition at line 552 of file coverage.c.
References bbg_file_name, bbg_file_opened, bbg_function_announced, function_list::checksum, compute_checksum(), current_function_funcdef_no, fn_b_ctrs, fn_ctr_mask, fn_n_ctrs, GCOV_COUNTERS, gcov_is_error(), i, function_list::ident, function_list::n_ctrs, function_list::next, prg_ctr_mask, prg_n_ctrs, warning, xmalloc(), and XNEW.
Definition at line 964 of file coverage.c.
References bbg_file_name, bbg_file_opened, create_coverage(), da_file_name, error(), gcov_close(), local_tick, and unlink.
| void coverage_init | ( | const char * | filename | ) |
Definition at line 943 of file coverage.c.
References bbg_file_name, da_file_name, GCOV_DATA_SUFFIX, GCOV_NOTE_SUFFIX, len, read_counts_file(), strcat(), strcpy, strlen(), xmalloc(), and XNEWVEC.
Definition at line 899 of file coverage.c.
References append_to_statement_list(), ASM_GENERATE_INTERNAL_LABEL, assemble_variable(), build_decl, build_fold_addr_expr(), build_function_call_expr(), build_function_type_list(), build_gcov_info(), build_pointer_type(), cgraph_build_static_cdtor(), DECL_EXTERNAL, DECL_INITIAL, DECL_NAME, DEFAULT_INIT_PRIORITY, get_identifier(), no_coverage, NULL, NULL_TREE, prg_ctr_mask, tree_cons, TREE_PUBLIC, TREE_STATIC, TREE_TYPE, and void_type_node.
| gcov_type* get_coverage_counts | ( | unsigned | counter, | |
| unsigned | expected, | |||
| const struct gcov_ctr_summary ** | summary | |||
| ) |
Definition at line 324 of file coverage.c.
References counts_entry::checksum, compute_checksum(), counts_entry::counts, counts_hash, counts_entry::ctr, current_function_decl, current_function_funcdef_no, da_file_name, DECL_ASSEMBLER_NAME, error(), flag_guess_branch_prob, htab_find(), counts_entry::ident, IDENTIFIER_POINTER, inform(), NULL, gcov_ctr_summary::num, counts_entry::summary, and warning.
Definition at line 135 of file coverage.c.
Referenced by build_ctr_info_type(), build_ctr_info_value(), build_fn_info_type(), build_fn_info_value(), and build_gcov_info().
| static GTY | ( | () | ) | [static] |
Definition at line 141 of file coverage.c.
References counts_entry::ctr, GCOV_COUNTERS, and counts_entry::ident.
Referenced by read_counts_file().
Definition at line 169 of file coverage.c.
References counts_entry::chain, function_list::checksum, counts_entry::checksum, counts_entry::counts, counts_hash, counts_entry::ctr, gcov_summary::ctrs, da_file_name, error(), gcov_close(), GCOV_COUNTER_FOR_TAG, GCOV_COUNTERS_SUMMABLE, GCOV_DATA_MAGIC, gcov_is_error(), gcov_magic(), gcov_open(), gcov_position(), gcov_read_counter(), gcov_read_summary(), gcov_read_unsigned(), gcov_sync(), GCOV_TAG_COUNTER_NUM, GCOV_TAG_FUNCTION, GCOV_TAG_IS_COUNTER, GCOV_TAG_PROGRAM_SUMMARY, GCOV_UNSIGNED2STRING, htab_counts_entry_del(), htab_counts_entry_eq(), htab_counts_entry_hash(), htab_create(), htab_delete(), htab_find_slot(), counts_entry::ident, INSERT, length, NULL, gcov_ctr_summary::num, offset, gcov_ctr_summary::run_max, gcov_ctr_summary::runs, gcov_ctr_summary::sum_all, gcov_ctr_summary::sum_max, counts_entry::summary, tag, warning, XCNEW, and XCNEWVEC.
| tree tree_coverage_counter_ref | ( | unsigned | counter, | |
| unsigned | no | |||
| ) |
Definition at line 414 of file coverage.c.
References build4, build_int_cst(), fn_b_ctrs, fn_n_ctrs, fold_convert(), gcc_assert, GCOV_TYPE_NODE, get_gcov_type(), NULL, NULL_TREE, prg_n_ctrs, size_binop(), size_int, TREE_TYPE, TYPE_ALIGN_UNIT, TYPE_DOMAIN, TYPE_MIN_VALUE, and TYPE_SIZE_UNIT.
char* bbg_file_name [static] |
Definition at line 89 of file coverage.c.
unsigned bbg_file_opened [static] |
Definition at line 90 of file coverage.c.
int bbg_function_announced [static] |
Definition at line 91 of file coverage.c.
htab_t counts_hash = NULL [static] |
Definition at line 97 of file coverage.c.
char* da_file_name [static] |
Definition at line 94 of file coverage.c.
unsigned fn_b_ctrs[GCOV_COUNTERS] [static] |
Definition at line 86 of file coverage.c.
unsigned fn_ctr_mask [static] |
Definition at line 84 of file coverage.c.
unsigned fn_n_ctrs[GCOV_COUNTERS] [static] |
Definition at line 85 of file coverage.c.
struct function_list* functions_head = 0 [static] |
Definition at line 75 of file coverage.c.
struct function_list** functions_tail = &functions_head [static] |
Definition at line 76 of file coverage.c.
unsigned no_coverage = 0 [static] |
Definition at line 77 of file coverage.c.
unsigned prg_ctr_mask [static] |
Definition at line 80 of file coverage.c.
unsigned prg_n_ctrs[GCOV_COUNTERS] [static] |
Definition at line 81 of file coverage.c.
1.5.6