#include "bb.h"#include "cg.h"#include "cg_region.h"#include "cg_flags.h"#include "cgexp.h"#include "cgexp_internals.h"#include "cxx_memory.h"#include "data_layout.h"#include "defs.h"#include "flags.h"#include "gcov-io.h"#include "glob.h"#include "ir_reader.h"#include "label_util.h"#include "mempool.h"#include "stblock.h"#include "symtab.h"#include "symtab_access.h"#include "unistd.h"

Go to the source code of this file.
Definition at line 74 of file cg_gcov.cxx.
Referenced by branch_prob(), CG_Compute_Checksum(), CG_Gcov_Generation(), compute_checksum(), and output_location().
| #define CHSUM_HASH 500000003 |
Referenced by CG_Compute_Checksum(), and compute_checksum().
| #define CHSUM_SHIFT 2 |
Referenced by CG_Compute_Checksum(), and compute_checksum().
| #define DIR_SEPARATOR '/' |
Definition at line 119 of file cg_gcov.cxx.
Referenced by abspath(), add_entry(), add_path(), choose_tmpdir(), DEFUN(), do_processing(), ffecom_open_include_(), is_directory(), jcf_path_extdirs_arg(), jcf_path_init(), main(), make_class_file_name(), make_relative_prefix(), open_include_file(), prefix_from_string(), process_aux_info_file(), process_command(), process_include(), shortpath(), trim_filename(), and update_path().
| #define IS_DIR_SEPARATOR | ( | ch | ) | ((ch) == DIR_SEPARATOR) |
Definition at line 120 of file cg_gcov.cxx.
Referenced by abspath(), apply_vpath(), basename(), directory_specified_p(), do_processing(), do_spec_path(), file_excluded_p(), find_separate_debug_file(), general_init(), get_file_basename(), get_output_file_with_visibility(), give_switch(), in_system_include_dir(), is_abspath(), is_directory(), is_sysrooted_pathname(), lbasename(), main(), make_relative_prefix(), output_file_directive(), prefix_from_string(), process_aux_info_file(), process_command(), referenced_file_is_newer(), save_def_or_dec(), set_input(), shortpath(), spec_path(), split_directories(), translate_name(), trim_filename(), and update_path().
| #define MAX_COUNTER_SECTIONS 4 |
Definition at line 73 of file cg_gcov.cxx.
| #define MAXPATHLEN 100 |
Definition at line 75 of file cg_gcov.cxx.
Referenced by _PXFGETCWD(), create_file(), directory_path(), Get_Annotation_Filename_With_Path(), Get_Current_Working_Directory(), get_cwd(), get_executable_dir(), get_executable_dir_from_path(), getcwd(), getcwd_(), getpwd(), init_phase_names(), ipa_compile_init(), process(), quoted_file_exists(), and server_setup().
Definition at line 1245 of file cg_gcov.cxx.
References BB_Is_Unique_Predecessor(), BBLIST_item, BBLIST_on_tree, FALSE, FmtAssert, FOR_ALL_BB_PREDS, Indirect_Branch(), and TRUE.
Referenced by CG_Instrument_Arcs().
Definition at line 1173 of file cg_gcov.cxx.
References BB_first_op, BB_Prepend_Op(), BB_Remove_Op(), FmtAssert, i, Is_BB_Empty(), NULL, OP_next, OP_opnd, OP_opnds, TN_register, and TN_register_class.
Referenced by Move_Save_Regs_OP().
| void CG_Compute_Checksum | ( | ) |
Definition at line 639 of file cg_gcov.cxx.
References BB_next, BB_succs, BB_TO_GCOV_INDEX, BBLIST_item, BBLIST_on_tree, function_list::cfg_checksum, chksum, CHSUM_HASH, CHSUM_SHIFT, function_list::count_edges, Cur_PU_Name, CXX_NEW_ARRAY, FOR_ALL_BBLIST_ITEMS, local_n_a_edges, local_n_basic_blocks, local_n_edges, n_instr_edges, function_list::name, new_item(), function_list::next, REGION_First_BB, strcpy, strlen(), and strncmp().
Referenced by CG_Gcov_Generation().
| void CG_End_Final | ( | ) |
Definition at line 372 of file cg_gcov.cxx.
References aggregate_inito, Allocate_Object(), Append_INITV(), CG_Init_Func_Infos(), CLASS_VAR, Clear_ST_is_not_used, cwd, CXX_NEW_ARRAY, EXPORT_LOCAL, filename, FmtAssert, Gen_Read_Only_Symbol(), get_symbol(), getpwd(), GLOBAL_SYMTAB, i, INITO_IDX_ZERO, INITV_IDX_ZERO, INITV_Init_Integer(), INITV_Init_Pad(), INITV_Init_String(), INITV_Init_Symoff(), INT, INT32, Is_Target_32bit, KIND_STRUCT, last_aggregate_initv, lbasename(), Make_Array_Type(), MTYPE_I4, MTYPE_M, MTYPE_U2, MTYPE_U4, MTYPE_U8, n_instr_edges, New_INITO(), New_INITV(), New_ST(), New_TY(), bb::next, function_list::next, NULL, Save_Str(), SCLASS_FSTATIC, SCLASS_PSTATIC, Set_ST_is_initialized, Set_TY_align, Src_File_Name, ST_Init(), ST_is_not_used, STR_IDX_ZERO, strcat(), strcpy, strlen(), TY_Init(), TYPE_ID, and UINT32.
Referenced by CG_Fini().
| void CG_End_Gcov | ( | ) |
Definition at line 874 of file cg_gcov.cxx.
References bb_file, bbg_file, FALSE, fclose(), flag_test_coverage, MEM_POOL_Delete(), MEM_POOL_Pop, and NULL.
Referenced by CG_Fini().
| void CG_Gcov_Generation | ( | ) |
Definition at line 890 of file cg_gcov.cxx.
References __write_gcov_string(), __write_long(), BB_Fall_Thru_Successor(), bb_file, BB_first_op, BB_next, BB_succs, BB_TO_GCOV_INDEX, bbg_file, bbg_file_name, BBLIST_item, BBlist_Len(), BBLIST_on_tree, CG_Compute_Checksum(), chksum, count, Cur_PU_Name, FALSE, fclose(), find_spanning_tree(), flag_test_coverage, FmtAssert, FOR_ALL_BBLIST_ITEMS, GCOV_ARC_FALLTHROUGH, GCOV_ARC_ON_TREE, GCOV_TAG_ARCS, GCOV_TAG_BLOCKS, GCOV_TAG_FUNCTION, GCOV_TAG_LINES, gcov_write_length(), gcov_write_string(), gcov_write_unsigned(), i, IR_Srcpos_Filename(), last_bb_file_num, last_bb_line_num, local_n_a_edges, local_n_basic_blocks, NULL, offset, OP_next, OP_srcpos, output_gcov_string(), REGION_First_BB, SRCPOS_filenum, Srcpos_To_Line, strlen(), strncmp(), unsigned, and x1.
Referenced by CG_Generate_Code().
Definition at line 214 of file cg_gcov.cxx.
References Allocate_Object(), Append_INITV(), function_list::cfg_checksum, CLASS_VAR, function_list::count_edges, EXPORT_LOCAL, Gen_Read_Only_Symbol(), GLOBAL_SYMTAB, i, INITO_IDX_ZERO, INITV_IDX_ZERO, INITV_Init_Integer(), INITV_Init_Pad(), INITV_Init_String(), INITV_Init_Symoff(), INT, Is_Target_32bit, Is_Target_64bit, KIND_STRUCT, last_aggregate_initv, Make_Array_Type(), MTYPE_I4, MTYPE_I8, MTYPE_M, MTYPE_U2, function_list::name, New_INITO(), New_INITV(), New_ST(), New_TY(), function_list::next, SCLASS_FSTATIC, Set_ST_is_initialized, Set_TY_align, ST_Init(), STR_IDX_ZERO, strlen(), TY_Init(), TYPE_ID, and UINT32.
Referenced by CG_End_Final().
| void CG_Init_Gcov | ( | ) |
Definition at line 824 of file cg_gcov.cxx.
References bb_file, bbg_file, bbg_file_name, CXX_NEW_ARRAY, FALSE, fclose(), flag_test_coverage, FmtAssert, fopen, GCOV_GRAPH_SUFFIX, gcov_write_unsigned(), i, last_bb_file_num, lbasename(), len, MEM_POOL_Initialize, MEM_POOL_Push, Src_File_Name, strcat(), strcpy, and strlen().
Referenced by CG_Init().
| void CG_Instrument_Arcs | ( | ) |
Definition at line 1281 of file cg_gcov.cxx.
References BB_branch_op(), BB_call, BB_exit, BB_Fall_Thru_Successor(), BB_Is_Unique_Instr_Predecessor(), BB_next, BB_preds, BB_succs, BBlist_Add_BB(), BBLIST_item, BBLIST_next, BBLIST_on_tree, begin_id, Build_OP(), Build_TN_Of_Mtype(), CLASS_VAR, count, Cur_PU_Name, end_id, Exp_Load(), Exp_OP2, Expand_Load(), Expand_Store(), EXPORT_PREEMPTIBLE, FmtAssert, func_name, Gcov_BB_Prepend_Ops(), Gen_And_Insert_BB_After(), Gen_Enum_TN(), Gen_Label_For_BB(), Gen_Label_TN(), Gen_Literal_TN(), Get_Float_Return_Reg_Sum(), Get_Return_Reg_Sum(), get_symbol(), GLOBAL_SYMTAB, i, INT, Is_Target_32bit, lbasename(), Link_Pred_Succ(), Move_Save_Regs_OP(), MTYPE_To_TY, MTYPE_U4, MTYPE_U8, MTYPE_V, new_label, New_ST(), NULL, OP_opnd, OP_opnds, OPC_U4ADD, OPCODE_desc(), OPCODE_make_op(), OPR_LDID, OPR_STID, OPS_Init(), Pointer_type, Process_Arc_Profile_Region_Options(), pu_flag, REGION_First_BB, Save_Str(), SCLASS_PSTATIC, Set_BBLIST_on_tree, Set_ST_is_initialized, Set_ST_is_not_used, Set_TN_label, sprintf(), Src_File_Name, ST_Init(), strlen(), strncmp(), TN_is_label, TYPE_ID, TYPE_MEM_POOL_ALLOC_N, and Unlink_Pred_Succ().
Referenced by CG_Generate_Code().
Definition at line 708 of file cg_gcov.cxx.
References NULL.
Referenced by find_spanning_tree(), and union_groups().
| static void find_spanning_tree | ( | ) | [static] |
Definition at line 751 of file cg_gcov.cxx.
References BB_call, BB_entry, BB_exit, BB_Find_Pred(), BB_next, BB_succs, BBLIST_item, EDGE_CRITICAL_P, find_group(), FOR_ALL_BBLIST_ITEMS, NULL, REGION_First_BB, Set_BBLIST_on_tree, and union_groups().
Referenced by branch_prob(), and CG_Gcov_Generation().
Definition at line 152 of file cg_gcov.cxx.
References BB_first_op, BB_Insert_Ops_After(), BB_Prepend_Ops(), NULL, OP_opnd, OP_opnds, OPS_first, RAX, TN_is_register, and TN_register.
Referenced by CG_Instrument_Arcs().
Definition at line 1152 of file cg_gcov.cxx.
References i, Opnd_Tn_In_BB(), and XMM0.
Referenced by CG_Instrument_Arcs(), EDGE_PROFILE::Instrument_Entry(), and EDGE_PROFILE::Instrument_None_and_Other_Xfer().
Definition at line 1137 of file cg_gcov.cxx.
References Opnd_Tn_In_BB(), RAX, and RDX.
Referenced by CG_Instrument_Arcs(), EDGE_PROFILE::Instrument_Entry(), and EDGE_PROFILE::Instrument_None_and_Other_Xfer().
| static ST* get_symbol | ( | const char * | sym_name | ) | [static] |
Definition at line 139 of file cg_gcov.cxx.
References CLASS_VAR, FOREACH_SYMBOL, GLOBAL_SYMTAB, i, NULL, ST_class, ST_name, strlen(), and strncmp().
Referenced by CG_End_Final(), CG_Instrument_Arcs(), and ieee_slurp_external_symbols().
| char * getpwd | ( | void | ) |
Definition at line 132 of file cg_gcov.cxx.
Referenced by build_gcov_info(), CG_End_Final(), end_final(), finish_repo(), get_src_pwd(), and main().
Definition at line 1232 of file cg_gcov.cxx.
References BB_branch_op(), CGTARG_Branch_Info(), FALSE, INT, and TRUE.
Referenced by BB_Is_Unique_Instr_Predecessor().
Definition at line 1164 of file cg_gcov.cxx.
References BB_first_op, FALSE, NULL, OP_next, OP_Real_Ops(), and TRUE.
Referenced by BB_Mov_Ops(), Determine_Candidate_Blocks(), Fill_From_Successor(), GCM_Fill_Branch_Delay_Slots(), GCM_For_Loop(), and LOOP_INVAR_CODE_MOTION::Loop_Is_Zdl().
| char* lbasename | ( | char * | name | ) |
Definition at line 122 of file cg_gcov.cxx.
References base, and IS_DIR_SEPARATOR.
Referenced by auto_export(), begin_class_definition(), bfd_create_gnu_debuglink_section(), bfd_fill_in_gnu_debuglink_section(), CG_End_Final(), CG_Init_Gcov(), CG_Instrument_Arcs(), check_excluded_libs(), cxx_make_type(), deps_add_default_target(), dir_name_of_file(), do_compile(), get_base_filename(), handle_pragma_implementation(), handle_pragma_interface(), make_relative_prefix(), make_rtl_for_nonlocal_decl(), open_repo_file(), process_options(), search_from(), and start_preparsed_function().
| static void Move_Save_Regs_OP | ( | BB * | instr_bb, | |
| BB * | bb, | |||
| INT32 | ret_reg_num, | |||
| INT32 | f_ret_reg_num | |||
| ) | [static] |
Definition at line 1194 of file cg_gcov.cxx.
References BB_Mov_Ops(), FmtAssert, i, RAX, RDX, and XMM0.
Referenced by CG_Instrument_Arcs().
Definition at line 1117 of file cg_gcov.cxx.
References FALSE, ops::first, i, NULL, OP_next, OP_opnd, OP_opnds, opcode, bb::ops, TN_register, TN_register_class, and TRUE.
Referenced by Get_Float_Return_Reg_Sum(), and Get_Return_Reg_Sum().
Definition at line 796 of file cg_gcov.cxx.
References __write_long(), bb_file, c, fwrite, and strlen().
Referenced by branch_prob(), and CG_Gcov_Generation().
Definition at line 1215 of file cg_gcov.cxx.
References atoi(), begin_id, Cur_PU_Name, end_id, NULL, OLIST_next, OLIST_opt, OLIST_val, pu_flag, and strcmp().
Referenced by CG_Instrument_Arcs().
Definition at line 726 of file cg_gcov.cxx.
References find_group(), and FmtAssert.
Referenced by find_spanning_tree().
Definition at line 99 of file cg_gcov.cxx.
Referenced by branch_prob(), CG_End_Gcov(), CG_Gcov_Generation(), CG_Init_Gcov(), end_branch_prob(), init_branch_prob(), open_files(), output_gcov_string(), and read_files().
Definition at line 95 of file cg_gcov.cxx.
Referenced by branch_prob(), CG_End_Gcov(), CG_Gcov_Generation(), CG_Init_Gcov(), create_program_flow_graph(), end_branch_prob(), init_branch_prob(), open_files(), and read_files().
char* bbg_file_name [static] |
Definition at line 96 of file cg_gcov.cxx.
Referenced by add_line_counts(), CG_Gcov_Generation(), CG_Init_Gcov(), coverage_begin_output(), coverage_end_function(), coverage_finish(), coverage_init(), create_file_names(), init_branch_prob(), open_files(), output_lines(), process_file(), read_graph_file(), release_structures(), and solve_flow_graph().
int begin_id = -1 [static] |
Definition at line 116 of file cg_gcov.cxx.
Referenced by CG_Instrument_Arcs(), and Process_Arc_Profile_Region_Options().
Definition at line 117 of file cg_gcov.cxx.
Referenced by CG_Compute_Checksum(), CG_Gcov_Generation(), compute_checksum(), get_exec_counts(), ihex_scan(), ihex_write_record(), and read_profile().
Definition at line 104 of file cg_gcov.cxx.
Referenced by end_branch_prob(), get_exec_counts(), init_branch_prob(), open_files(), read_files(), and read_profile().
int end_id = -1 [static] |
Definition at line 116 of file cg_gcov.cxx.
Referenced by ANL_PRAGMA_CONSTRUCT::_Find_Pragma_End_Stmt(), CG_Instrument_Arcs(), Process_Arc_Profile_Region_Options(), and Transform_Parallel_Block().
struct function_list* functions_head = 0 [static] |
Definition at line 90 of file cg_gcov.cxx.
struct function_list** functions_tail = &functions_head [static] |
Definition at line 91 of file cg_gcov.cxx.
int last_bb_file_num [static] |
int last_bb_line_num [static] |
int local_n_a_edges = 0 [static] |
Definition at line 110 of file cg_gcov.cxx.
Referenced by CG_Compute_Checksum(), and CG_Gcov_Generation().
int local_n_basic_blocks = 0 [static] |
Definition at line 111 of file cg_gcov.cxx.
Referenced by CG_Compute_Checksum(), and CG_Gcov_Generation().
int local_n_edges = 0 [static] |
int n_instr_edges = 0 [static] |
Definition at line 112 of file cg_gcov.cxx.
Referenced by CG_Compute_Checksum(), and CG_End_Final().
Definition at line 72 of file cg_gcov.cxx.
Referenced by attr_link_resolution(), cif_send_attr(), compress_tbls(), create_mod_info_file(), cvrt_exp_to_pdg(), cvrt_proc_to_pdg(), free_tables(), init_parse_prog_unit(), make_in_parent_string(), minval_intrinsic(), output_mod_info_file(), read_in_module_tbl(), read_sytb_from_module_file(), send_mod_file_name(), send_procedure(), srch_hidden_name_tbl(), srch_kwd_name(), srch_linked_sn(), srch_stor_blk_tbl(), srch_sym_tbl(), and struct_opr_handler().
| MEM_POOL * name_pool_ptr = NULL |
Definition at line 72 of file cg_gcov.cxx.
int pu_flag = -1 [static] |
Definition at line 115 of file cg_gcov.cxx.
Referenced by CG_Instrument_Arcs(), and Process_Arc_Profile_Region_Options().
1.5.6