#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 669 of file coverage.c.
References build_decl, build_function_type_list(), build_pointer_type(), finish_builtin_struct(), GCOV_TYPE_NODE, NULL_TREE, TREE_CHAIN, unsigned_intSI_type_node, unsigned_type_node, and void_type_node.
Referenced by build_gcov_info().
Definition at line 706 of file coverage.c.
References assemble_variable(), build1, build_array_type(), build_constructor(), build_decl, build_index_type(), build_int_cstu(), DECL_ARTIFICIAL, DECL_EXTERNAL, DECL_SIZE, DECL_SIZE_UNIT, 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, TYPE_SIZE_UNIT, unsigned_intSI_type_node, and unsigned_type_node.
Referenced by build_gcov_info().
| static tree build_fn_info_type | ( | unsigned int | counters | ) | [static] |
Definition at line 598 of file coverage.c.
References build_array_type(), build_decl, build_index_type(), build_int_cst(), finish_builtin_struct(), NULL_TREE, TREE_CHAIN, unsigned_intSI_type_node, and unsigned_type_node.
Referenced by build_gcov_info().
| static tree build_fn_info_value | ( | const struct function_list * | function, | |
| tree | type | |||
| ) | [static] |
Definition at line 631 of file coverage.c.
References build_constructor(), build_int_cstu(), function_list::checksum, GCOV_COUNTERS, function_list::ident, function_list::n_ctrs, nreverse(), NULL_TREE, prg_ctr_mask, TREE_CHAIN, tree_cons, TREE_TYPE, TYPE_FIELDS, unsigned_intSI_type_node, and unsigned_type_node.
Referenced by build_gcov_info().
Definition at line 763 of file coverage.c.
References build1, build_array_type(), build_constructor(), 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, getpwd(), local_tick, function_list::next, nreverse(), NULL, null_pointer_node, NULL_TREE, prg_ctr_mask, strlen(), TREE_CHAIN, tree_cons, TREE_TYPE, TYPE_QUAL_CONST, unsigned_intSI_type_node, and unsigned_type_node.
Referenced by create_coverage().
| static unsigned compute_checksum | ( | void | ) | [static] |
Definition at line 499 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 | ) |
| static unsigned coverage_checksum_string | ( | unsigned | chksum, | |
| const char * | string | |||
| ) | [static] |
Definition at line 446 of file coverage.c.
References crc32_string(), dup(), flag_random_seed, free(), gcc_assert, i, NULL, scan(), sscanf(), strncmp(), xstrdup(), and is::y.
Referenced by compute_checksum().
| int coverage_counter_alloc | ( | unsigned | counter, | |
| unsigned | num | |||
| ) |
| void coverage_init | ( | const char * | filename | ) |
Definition at line 900 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.
Referenced by coverage_finish().
| gcov_type* get_coverage_counts | ( | unsigned | counter, | |
| unsigned | expected, | |||
| const struct gcov_ctr_summary ** | summary | |||
| ) |
Definition at line 309 of file coverage.c.
Referenced by compute_value_histograms(), and get_exec_counts().
| static GTY | ( | () | ) | [static] |
Definition at line 143 of file coverage.c.
References counts_entry::counts, and free().
Referenced by read_counts_file().
Definition at line 134 of file coverage.c.
References counts_entry::ctr, and counts_entry::ident.
Referenced by read_counts_file().
Definition at line 154 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, and xcalloc().
Referenced by coverage_init().
| rtx rtl_coverage_counter_ref | ( | unsigned | counter, | |
| unsigned | no | |||
| ) |
Definition at line 400 of file coverage.c.
References BITS_PER_UNIT, DECL_NAME, fn_b_ctrs, fn_n_ctrs, gcc_assert, GCOV_TYPE_NODE, gen_rtx_MEM(), gen_rtx_SYMBOL_REF, ggc_strdup, IDENTIFIER_POINTER, MEM_NOTRAP_P, mode, mode_for_size(), MODE_INT, new_alias_set(), plus_constant, Pmode, prg_n_ctrs, set_mem_alias_set(), SYMBOL_FLAG_LOCAL, SYMBOL_REF_FLAGS, tree_low_cst(), and TYPE_SIZE.
Referenced by rtl_gen_const_delta_profiler(), rtl_gen_edge_profiler(), rtl_gen_interval_profiler(), rtl_gen_one_value_profiler_no_edge_manipulation(), and rtl_gen_pow2_profiler().
| tree tree_coverage_counter_ref | ( | unsigned | counter, | |
| unsigned | no | |||
| ) |
Definition at line 426 of file coverage.c.
Referenced by tree_gen_edge_profiler(), tree_gen_interval_profiler(), tree_gen_one_value_profiler(), and tree_gen_pow2_profiler().
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.
Referenced by coverage_begin_output(), coverage_end_function(), and coverage_finish().
int bbg_function_announced [static] |
Definition at line 91 of file coverage.c.
Referenced by coverage_begin_output(), and coverage_end_function().
htab_t counts_hash = NULL [static] |
Definition at line 97 of file coverage.c.
Referenced by get_coverage_counts(), and read_counts_file().
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.
Referenced by coverage_counter_alloc(), coverage_end_function(), rtl_coverage_counter_ref(), and tree_coverage_counter_ref().
unsigned fn_ctr_mask [static] |
Definition at line 84 of file coverage.c.
Referenced by coverage_counter_alloc(), and coverage_end_function().
unsigned fn_n_ctrs[GCOV_COUNTERS] [static] |
Definition at line 85 of file coverage.c.
Referenced by coverage_counter_alloc(), coverage_end_function(), rtl_coverage_counter_ref(), and tree_coverage_counter_ref().
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.
Referenced by coverage_begin_output(), coverage_counter_alloc(), and create_coverage().
unsigned prg_ctr_mask [static] |
Definition at line 80 of file coverage.c.
Referenced by build_fn_info_value(), build_gcov_info(), coverage_end_function(), and create_coverage().
unsigned prg_n_ctrs[GCOV_COUNTERS] [static] |
Definition at line 81 of file coverage.c.
Referenced by build_ctr_info_value(), coverage_end_function(), rtl_coverage_counter_ref(), and tree_coverage_counter_ref().
1.5.6