#include "instr_reader.h"#include "instr_memory.h"

Go to the source code of this file.
| typedef hash_map<UINT64, char*, ihash<UINT64> > ADDRESS_NAME_MAP |
Definition at line 70 of file instr_reader.cxx.
| typedef hash_map<UINT64, INT32, ihash<UINT64> > ADDRESS_PUSIZE_MAP |
Definition at line 71 of file instr_reader.cxx.
| void Close_Feedback_Files | ( | ) |
Definition at line 125 of file instr_reader.cxx.
References fclose(), Feedback_Enabled, Feedback_File_Info, i, INT32, iter, PROFILE_PHASE_BEFORE_VHO, and PROFILE_PHASE_LAST.
Referenced by Cleanup_Files().
| FB_Info_Branch& Get_Branch_Profile | ( | PU_PROFILE_HANDLE | pu_handle, | |
| INT32 | id | |||
| ) |
Definition at line 433 of file instr_reader.cxx.
References PU_Profile_Handle::Get_Branch_Table().
Referenced by WN_INSTRUMENT_WALKER::Annotate_Branch(), and Dump_Fb_Data().
| size_t Get_Branch_Table_Size | ( | PU_PROFILE_HANDLE | pu_handle | ) |
| FB_Info_Call& Get_Call_Profile | ( | PU_PROFILE_HANDLE | pu_handle, | |
| INT32 | id | |||
| ) |
Definition at line 526 of file instr_reader.cxx.
References PU_Profile_Handle::Get_Call_Table().
Referenced by WN_INSTRUMENT_WALKER::Annotate_Call(), and Dump_Fb_Data().
| size_t Get_Call_Table_Size | ( | PU_PROFILE_HANDLE | pu_handle | ) |
| PU_PROFILE_HANDLE Get_CG_PU_Profile | ( | char * | srcfile_pu_name, | |
| FILE * | fp, | |||
| char * | fb_fname, | |||
| Fb_Hdr & | fb_hdr, | |||
| Pu_Hdr * | pu_hdr_table, | |||
| char * | str_table | |||
| ) |
Definition at line 272 of file instr_reader.cxx.
References CXX_NEW, Fb_Hdr::fb_profile_offset, Fb_Hdr::fb_pu_hdr_num, i, MEM_pu_nz_pool_ptr, NULL, Pu_Hdr::pu_checksum, Pu_Hdr::pu_file_offset, Pu_Hdr::pu_name_index, Pu_Hdr::pu_num_edge_entries, read_edge_profile(), and strcmp().
| PU_PROFILE_HANDLES Get_CG_PU_Profile | ( | char * | srcfile_pu_name, | |
| Fb_File_Info_Vector & | file_info_vector | |||
| ) |
Definition at line 252 of file instr_reader.cxx.
References Fb_File_Info::fb_hdr, Fb_File_Info::fp, Get_CG_PU_Profile(), handle, i, MEM_pu_nz_pool_ptr, Fb_File_Info::name, Fb_File_Info::pu_hdr_table, and Fb_File_Info::str_table.
Referenced by CG_Edge_Profile_Annotation(), and Get_CG_PU_Profile().
| PU_PROFILE_HANDLES Get_CG_PU_Value_Profile | ( | char * | srcfile_pu_name, | |
| Fb_File_Info_Vector & | file_info_vector | |||
| ) |
Definition at line 336 of file instr_reader.cxx.
References Fb_File_Info::fb_hdr, Fb_File_Info::fp, Get_CG_PU_Value_Profile(), handle, i, MEM_pu_nz_pool_ptr, Fb_File_Info::name, Fb_File_Info::pu_hdr_table, and Fb_File_Info::str_table.
Referenced by Get_CG_PU_Value_Profile().
| PU_PROFILE_HANDLE Get_CG_PU_Value_Profile | ( | char * | srcfile_pu_name, | |
| FILE * | fp, | |||
| char * | fb_fname, | |||
| Fb_Hdr & | fb_hdr, | |||
| Pu_Hdr * | pu_hdr_table, | |||
| char * | str_table | |||
| ) |
Definition at line 303 of file instr_reader.cxx.
References CXX_NEW, Fb_Hdr::fb_profile_offset, Fb_Hdr::fb_pu_hdr_num, i, MEM_pu_nz_pool_ptr, NULL, Pu_Hdr::pu_checksum, Pu_Hdr::pu_file_offset, Pu_Hdr::pu_name_index, read_stride_profile(), read_value_profile(), and strcmp().
| FB_Info_Switch& Get_Compgoto_Profile | ( | PU_PROFILE_HANDLE | pu_handle, | |
| INT32 | id | |||
| ) |
Definition at line 469 of file instr_reader.cxx.
References PU_Profile_Handle::Get_Compgoto_Table().
Referenced by WN_INSTRUMENT_WALKER::Annotate_Compgoto().
| size_t Get_Compgoto_Table_Size | ( | PU_PROFILE_HANDLE | pu_handle | ) |
Definition at line 459 of file instr_reader.cxx.
References PU_Profile_Handle::Get_Compgoto_Table().
| FB_Info_Edge& Get_Edge_Profile | ( | PU_PROFILE_HANDLE | pu_handle, | |
| INT32 | id | |||
| ) |
Definition at line 553 of file instr_reader.cxx.
References PU_Profile_Handle::Get_Edge_Table().
Referenced by EDGE_PROFILE::Annotate_Call_Branch(), EDGE_PROFILE::Annotate_Cloop_Branch(), EDGE_PROFILE::Annotate_Indirect_Cond_Branch(), EDGE_PROFILE::Annotate_Ip_Rel_Branch(), EDGE_PROFILE::Annotate_None_and_Other_Xfer(), EDGE_PROFILE::Annotate_Top_Branch(), and Dump_Fb_Data().
Definition at line 579 of file instr_reader.cxx.
References ERR_POS, FREAD, FSEEK, and SEEK_SET.
Referenced by Process_Feedback_File().
| FB_Info_Icall& Get_Icall_Profile | ( | PU_PROFILE_HANDLE | pu_handle, | |
| INT32 | id | |||
| ) |
Definition at line 544 of file instr_reader.cxx.
References PU_Profile_Handle::Get_Icall_Table().
Referenced by WN_INSTRUMENT_WALKER::Merge_Icall_Feedback().
| size_t Get_Icall_Table_Size | ( | PU_PROFILE_HANDLE | pu_handle | ) |
| FB_Info_Invoke& Get_Invoke_Profile | ( | PU_PROFILE_HANDLE | pu_handle, | |
| INT32 | id | |||
| ) |
Definition at line 382 of file instr_reader.cxx.
References PU_Profile_Handle::Get_Invoke_Table().
Referenced by WN_INSTRUMENT_WALKER::Annotate_Invoke(), and Dump_Fb_Data().
| size_t Get_Invoke_Table_Size | ( | PU_PROFILE_HANDLE | pu_handle | ) |
| FB_Info_Loop& Get_Loop_Profile | ( | PU_PROFILE_HANDLE | pu_handle, | |
| INT32 | id | |||
| ) |
Definition at line 487 of file instr_reader.cxx.
References PU_Profile_Handle::Get_Loop_Table().
Referenced by WN_INSTRUMENT_WALKER::Annotate_Loop().
| size_t Get_Loop_Table_Size | ( | PU_PROFILE_HANDLE | pu_handle | ) |
| PROFILE_PHASE Get_Phase_Num | ( | Fb_Hdr & | fb_hdr | ) |
Definition at line 144 of file instr_reader.cxx.
References Fb_Hdr::phase_num.
Referenced by Process_Feedback_File().
| INT32 Get_PU_Checksum | ( | PU_PROFILE_HANDLE | pu_handle | ) |
Definition at line 364 of file instr_reader.cxx.
References PU_Profile_Handle::checksum.
Referenced by WN_INSTRUMENT_WALKER::Tree_Walk().
Definition at line 591 of file instr_reader.cxx.
References ERR_POS, ERR_READ, Fb_Hdr::fb_pu_hdr_num, Fb_Hdr::fb_pu_hdr_offset, FREAD, FSEEK, and SEEK_SET.
Referenced by Process_Feedback_File().
| char* Get_PU_Name | ( | PU_PROFILE_HANDLE | pu_handle | ) |
| PU_PROFILE_HANDLE Get_PU_Profile | ( | char * | pu_name, | |
| char * | src_fname, | |||
| FILE * | fp, | |||
| char * | fb_fname, | |||
| Fb_Hdr & | fb_hdr, | |||
| Pu_Hdr * | pu_hdr_table, | |||
| char * | str_table | |||
| ) |
Definition at line 181 of file instr_reader.cxx.
References CXX_NEW, CXX_NEW_ARRAY, Fb_Hdr::fb_profile_offset, Fb_Hdr::fb_pu_hdr_num, i, malloc, MEM_pu_nz_pool_ptr, NULL, PU_Addr_Name_Map, PU_Addr_Pusize_Map, Pu_Hdr::pu_checksum, Pu_Hdr::pu_file_offset, Pu_Hdr::pu_name_index, Pu_Hdr::pu_size, PU_Profile_Handle::pu_size, read_branch_profile(), read_call_profile(), read_cgoto_profile(), read_icall_profile(), read_invoke_profile(), read_loop_profile(), read_scircuit_profile(), read_switch_profile(), read_value_profile(), PU_Profile_Handle::runtime_fun_address, Pu_Hdr::runtime_fun_address, s, strcat(), strcmp(), strcpy, and strlen().
| PU_PROFILE_HANDLES Get_PU_Profile | ( | char * | pu_name, | |
| char * | src_fname, | |||
| Fb_File_Info_Vector & | file_info_vector | |||
| ) |
Definition at line 151 of file instr_reader.cxx.
References Fb_File_Info::fb_hdr, Fb_File_Info::fp, Get_PU_Profile(), handle, i, MEM_pu_nz_pool_ptr, Fb_File_Info::name, Fb_File_Info::pu_hdr_table, and Fb_File_Info::str_table.
Referenced by Get_PU_Profile(), and WN_Annotate().
| FB_Info_Circuit& Get_Short_Circuit_Profile | ( | PU_PROFILE_HANDLE | pu_handle, | |
| INT32 | id | |||
| ) |
Definition at line 507 of file instr_reader.cxx.
References PU_Profile_Handle::Get_Short_Circuit_Table().
Referenced by WN_INSTRUMENT_WALKER::Annotate_Circuit().
| size_t Get_Short_Circuit_Table_Size | ( | PU_PROFILE_HANDLE | pu_handle | ) |
Definition at line 496 of file instr_reader.cxx.
References PU_Profile_Handle::Get_Short_Circuit_Table().
Definition at line 605 of file instr_reader.cxx.
References ERR_POS, ERR_READ, Fb_Hdr::fb_str_table_offset, Fb_Hdr::fb_str_table_size, FREAD, FSEEK, and SEEK_SET.
Referenced by Process_Feedback_File().
| FB_Info_Value& Get_Stride_Profile | ( | PU_PROFILE_HANDLE | pu_handle, | |
| INT32 | id | |||
| ) |
Definition at line 569 of file instr_reader.cxx.
References PU_Profile_Handle::Get_Stride_Table().
Referenced by Dump_Fb_Data().
| FB_Info_Switch& Get_Switch_Profile | ( | PU_PROFILE_HANDLE | pu_handle, | |
| INT32 | id | |||
| ) |
Definition at line 452 of file instr_reader.cxx.
References PU_Profile_Handle::Get_Switch_Table().
Referenced by WN_INSTRUMENT_WALKER::Annotate_Switch().
| size_t Get_Switch_Table_Size | ( | PU_PROFILE_HANDLE | pu_handle | ) |
| FB_Info_Value& Get_Value_Profile | ( | PU_PROFILE_HANDLE | pu_handle, | |
| INT32 | id | |||
| ) |
Definition at line 561 of file instr_reader.cxx.
References PU_Profile_Handle::Get_Value_Table().
Referenced by Dump_Fb_Data().
| void Process_Feedback_File | ( | char * | fb_name | ) |
Definition at line 87 of file instr_reader.cxx.
References CXX_NEW, CXX_NEW_ARRAY, Fb_Hdr::fb_pu_hdr_num, Fb_Hdr::fb_str_table_size, Fb_Hdr::fb_version, Feedback_Enabled, Feedback_File_Info, fopen, fp, Get_File_Header(), Get_Phase_Num(), Get_Pu_Hdr_Table(), Get_Str_Table(), INSTR_CURRENT, Is_True, MEM_pu_nz_pool_ptr, NULL, profile_error, str_table, and TRUE.
Referenced by Process_Feedback_Options().
| void read_branch_profile | ( | PU_PROFILE_HANDLE | pu_handle, | |
| Pu_Hdr & | pu_hdr_entry, | |||
| long | pu_ofst, | |||
| FILE * | fp, | |||
| char * | fname | |||
| ) |
Definition at line 787 of file instr_reader.cxx.
References ERR_POS, ERR_READ, FREAD, FSEEK, PU_Profile_Handle::Get_Branch_Table(), Is_True, Pu_Hdr::pu_br_offset, Pu_Hdr::pu_num_br_entries, and SEEK_SET.
Referenced by Get_PU_Profile().
| void read_call_profile | ( | PU_PROFILE_HANDLE | pu_handle, | |
| Pu_Hdr & | pu_hdr_entry, | |||
| long | pu_ofst, | |||
| FILE * | fp, | |||
| char * | fname | |||
| ) |
Definition at line 939 of file instr_reader.cxx.
References ERR_POS, ERR_READ, FREAD, FSEEK, PU_Profile_Handle::Get_Call_Table(), Is_True, Pu_Hdr::pu_call_offset, Pu_Hdr::pu_num_call_entries, and SEEK_SET.
Referenced by Get_PU_Profile().
| void read_cgoto_profile | ( | PU_PROFILE_HANDLE | pu_handle, | |
| Pu_Hdr & | pu_hdr_entry, | |||
| long | pu_ofst, | |||
| FILE * | fp, | |||
| char * | fname | |||
| ) |
Definition at line 850 of file instr_reader.cxx.
References _ffestd_stmt_::end, ERR_POS, ERR_READ, first, FREAD, FSEEK, PU_Profile_Handle::Get_Compgoto_Table(), INT32, Is_True, Pu_Hdr::pu_cgoto_offset, Pu_Hdr::pu_cgoto_target_offset, Pu_Hdr::pu_num_cgoto_entries, SEEK_SET, and target.
Referenced by Get_PU_Profile().
| void read_edge_profile | ( | PU_PROFILE_HANDLE | pu_handle, | |
| Pu_Hdr & | pu_hdr_entry, | |||
| long | pu_ofst, | |||
| FILE * | fp, | |||
| char * | fname | |||
| ) |
Definition at line 1022 of file instr_reader.cxx.
References ERR_POS, FREAD, FSEEK, PU_Profile_Handle::Get_Edge_Table(), Is_True, Pu_Hdr::pu_edge_offset, Pu_Hdr::pu_num_edge_entries, and SEEK_SET.
Referenced by Get_CG_PU_Profile().
| void read_icall_profile | ( | PU_PROFILE_HANDLE | pu_handle, | |
| Pu_Hdr & | pu_hdr_entry, | |||
| long | pu_ofst, | |||
| FILE * | fp, | |||
| char * | fname | |||
| ) |
Definition at line 964 of file instr_reader.cxx.
References ERR_POS, ERR_READ, FREAD, FSEEK, PU_Profile_Handle::Get_Icall_Table(), Is_True, Pu_Hdr::pu_icall_offset, Pu_Hdr::pu_num_icall_entries, and SEEK_SET.
Referenced by Get_PU_Profile().
| void read_invoke_profile | ( | PU_PROFILE_HANDLE | pu_handle, | |
| Pu_Hdr & | pu_hdr_entry, | |||
| long | pu_ofst, | |||
| FILE * | fp, | |||
| char * | fname | |||
| ) |
Definition at line 763 of file instr_reader.cxx.
References ERR_POS, ERR_READ, FREAD, FSEEK, PU_Profile_Handle::Get_Invoke_Table(), Is_True, Pu_Hdr::pu_inv_offset, Pu_Hdr::pu_num_inv_entries, and SEEK_SET.
Referenced by Get_PU_Profile().
| void read_loop_profile | ( | PU_PROFILE_HANDLE | pu_handle, | |
| Pu_Hdr & | pu_hdr_entry, | |||
| long | pu_ofst, | |||
| FILE * | fp, | |||
| char * | fname | |||
| ) |
Definition at line 890 of file instr_reader.cxx.
References ERR_POS, ERR_READ, FREAD, FSEEK, PU_Profile_Handle::Get_Loop_Table(), Is_True, Pu_Hdr::pu_loop_offset, Pu_Hdr::pu_num_loop_entries, and SEEK_SET.
Referenced by Get_PU_Profile().
| void read_scircuit_profile | ( | PU_PROFILE_HANDLE | pu_handle, | |
| Pu_Hdr & | pu_hdr_entry, | |||
| long | pu_ofst, | |||
| FILE * | fp, | |||
| char * | fname | |||
| ) |
Definition at line 914 of file instr_reader.cxx.
References ERR_POS, ERR_READ, FREAD, FSEEK, PU_Profile_Handle::Get_Short_Circuit_Table(), Is_True, Pu_Hdr::pu_num_scircuit_entries, Pu_Hdr::pu_scircuit_offset, and SEEK_SET.
Referenced by Get_PU_Profile().
| void read_stride_profile | ( | PU_PROFILE_HANDLE | pu_handle, | |
| Pu_Hdr & | pu_hdr_entry, | |||
| long | pu_ofst, | |||
| FILE * | fp, | |||
| char * | fname | |||
| ) |
Definition at line 1058 of file instr_reader.cxx.
References ERR_POS, FREAD, FSEEK, PU_Profile_Handle::Get_Stride_Table(), Is_True, Pu_Hdr::pu_ld_count, Pu_Hdr::pu_stride_offset, and SEEK_SET.
Referenced by Get_CG_PU_Value_Profile().
| void read_switch_profile | ( | PU_PROFILE_HANDLE | pu_handle, | |
| Pu_Hdr & | pu_hdr_entry, | |||
| long | pu_ofst, | |||
| FILE * | fp, | |||
| char * | fname | |||
| ) |
Definition at line 811 of file instr_reader.cxx.
References _ffestd_stmt_::end, ERR_POS, ERR_READ, first, FREAD, FSEEK, PU_Profile_Handle::Get_Switch_Table(), INT32, Is_True, Pu_Hdr::pu_num_switch_entries, Pu_Hdr::pu_switch_offset, Pu_Hdr::pu_switch_target_offset, SEEK_SET, and target.
Referenced by Get_PU_Profile().
| void read_value_profile | ( | PU_PROFILE_HANDLE | pu_handle, | |
| Pu_Hdr & | pu_hdr_entry, | |||
| long | pu_ofst, | |||
| FILE * | fp, | |||
| char * | fname | |||
| ) |
Definition at line 1040 of file instr_reader.cxx.
References ERR_POS, FREAD, FSEEK, PU_Profile_Handle::Get_Value_Table(), Is_True, Pu_Hdr::pu_instr_count, Pu_Hdr::pu_value_offset, and SEEK_SET.
Referenced by Get_CG_PU_Value_Profile(), and Get_PU_Profile().
Definition at line 76 of file instr_reader.cxx.
Referenced by Dump_all(), Dump_Fb_File_Header(), Get_File_Header(), Get_Pu_Hdr_Table(), Get_Str_Table(), read_branch_profile(), read_call_profile(), read_cgoto_profile(), read_edge_profile(), read_icall_profile(), read_invoke_profile(), read_loop_profile(), read_scircuit_profile(), read_stride_profile(), read_switch_profile(), read_value_profile(), and realign_file().
Definition at line 77 of file instr_reader.cxx.
Referenced by Get_Pu_Hdr_Table(), Get_Str_Table(), read_branch_profile(), read_call_profile(), read_cgoto_profile(), read_icall_profile(), read_invoke_profile(), read_loop_profile(), read_scircuit_profile(), and read_switch_profile().
Definition at line 79 of file instr_reader.cxx.
Referenced by Dump_Fb_File_Header(), Dump_Fb_File_Pu_Table(), Dump_Fb_File_Str_Table(), Dump_PU_Profile(), and Dump_PU_Switch_Profile().
| BOOL Feedback_Enabled[PROFILE_PHASE_LAST] = {FALSE,FALSE,FALSE,FALSE,FALSE} |
Definition at line 83 of file instr_reader.cxx.
Referenced by Backend_Processing(), Close_Feedback_Files(), Do_WOPT_and_CG_with_Regions(), Preprocess_PU(), Process_Feedback_File(), and SUMMARIZE< program >::Process_procedure().
| Fb_File_Info_Vector Feedback_File_Info[PROFILE_PHASE_LAST] |
Definition at line 84 of file instr_reader.cxx.
Referenced by CG_Edge_Profile_Annotation(), Close_Feedback_Files(), Process_Feedback_File(), and WN_Annotate().
1.5.6