Instr Module Reference


Data Types

module  pair
type  _Hash_map_iterator
type  _Hash_node
module  hash_map
type  Invoke_Profile
type  Branch_Profile
type  Compgoto_Profile
type  Short_Circuit_Profile
type  Call_Profile
type  Icall_Profile
type  Loop_Profile
type  Switch_Profile
type  PU_Profile_Handle
module  vector

Typedefs

typedef INT64 FB_NUM_TYPE
typedef UINT64 FB_VALUE_TYPE
typedef vector< Invoke_ProfileInvoke_Profile_Vector
typedef vector< Branch_ProfileBranch_Profile_Vector
typedef vector< Switch_ProfileSwitch_Profile_Vector
typedef vector< Compgoto_ProfileCompgoto_Profile_Vector
typedef vector< Loop_ProfileLoop_Profile_Vector
typedef vector
< Short_Circuit_Profile
Short_Circuit_Profile_Vector
typedef vector< Call_ProfileCall_Profile_Vector
typedef vector< Icall_ProfileIcall_Profile_Vector
typedef PU_Profile_HandlePU_PROFILE_HANDLE
typedef hash_map< long,
PU_PROFILE_HANDLE
HASH_MAP

Functions/Subroutines

static ULONG align (ULONG offset, UINT32 alignment)
static void realign_file (FILE *fp, ULONG &offset, UINT32 alignment, char *fname)
void Dump_all (FILE *fp, char *output_filename)
void Dump_Fb_File_Header (FILE *fp, char *output_filename, Fb_Hdr &fb_hdr)
static void Convert_Invoke_Profile (vector< FB_Info_Invoke > &dest, const Invoke_Profile_Vector &src)
static void Convert_Branch_Profile (vector< FB_Info_Branch > &dest, const Branch_Profile_Vector &src)
template<class T>
static void Convert_Switch_Profile (FB_Info_Switch &dest, T &src)
static void Convert_Loop_Profile (vector< FB_Info_Loop > &dest, const Loop_Profile_Vector &src)
static void Convert_Short_Circuit_Profile (vector< FB_Info_Circuit > &dest, const Short_Circuit_Profile_Vector &src)
static void Convert_Call_Profile (vector< FB_Info_Call > &dest, const Call_Profile_Vector &src)
template<class T>
POSITION Dump_PU_Profile (FILE *fp, ULONG &offset, const T &profile, char *fname)
template<class T>
POSITION Dump_PU_Switch_Profile (FILE *fp, ULONG &offset, T &profile, ULONG &target_offset, char *fname)
void Dump_PU_Profile (FILE *fp, PU_PROFILE_HANDLE pu_handle, char *fname, vector< Pu_Hdr > &Pu_Hdr_Table, vector< char * > &Str_Table)
void Dump_Fb_File_Pu_Table (FILE *fp, char *fname, vector< Pu_Hdr > &Pu_Hdr_Table, Fb_Hdr &fb_hdr)
void Dump_Fb_File_Str_Table (FILE *fp, char *fname, vector< char * > &Str_Table, Fb_Hdr &fb_hdr)
void Dump_PU_Profile (FILE *fp, PU_PROFILE_HANDLE pu_handle, char *fname, vector< Pu_Hdr > &Pu_Hdr_Table, vector< char * > &Str_Table)
ULONG Dump_PU_Invoke_Profile (FILE *fp, PU_PROFILE_HANDLE handle, char *fname, INT32 *num)
ULONG Dump_PU_Branch_Profile (FILE *fp, PU_PROFILE_HANDLE handle, char *fname, INT32 *num)
ULONG Dump_PU_Switch_Profile (FILE *fp, PU_PROFILE_HANDLE handle, char *fname, INT32 *num)
ULONG Dump_PU_Compgoto_Profile (FILE *fp, PU_PROFILE_HANDLE handle, char *fname, INT32 *num)
ULONG Dump_PU_Loop_Profile (FILE *fp, PU_PROFILE_HANDLE handle, char *fname, INT32 *num)
ULONG Dump_PU_Short_Circuit_Profile (FILE *fp, PU_PROFILE_HANDLE handle, char *fname, INT32 *num)
ULONG Dump_PU_Call_Profile (FILE *fp, PU_PROFILE_HANDLE handle, char *fname, INT32 *num)
PU_PROFILE_HANDLE Get_PU_Handle (char *file_name, char *pu_name, long current_pc, INT32 pu_size, INT32 checksum)
void Profile_Invoke_Init (PU_PROFILE_HANDLE pu_handle, INT32 num_invokes)
void Profile_Invoke (PU_PROFILE_HANDLE pu_handle, INT32 invoke_id)
void Profile_Branch_Init (PU_PROFILE_HANDLE pu_handle, INT32 num_branches)
void Profile_Branch (PU_PROFILE_HANDLE pu_handle, INT32 branch_id, bool taken)
void Incr_Branch_Taken (PU_PROFILE_HANDLE pu_handle, INT32 id)
void Incr_Branch_Not_Taken (PU_PROFILE_HANDLE pu_handle, INT32 id)
void Profile_Switch_Init (PU_PROFILE_HANDLE pu_handle, INT32 num_switches, INT32 *switch_num_targets, INT32 num_case_values, FB_NUM_TYPE *case_values)
void Profile_Switch (PU_PROFILE_HANDLE pu_handle, INT32 switch_id, INT32 case_value, INT32 num_targets)
void Profile_Compgoto_Init (PU_PROFILE_HANDLE pu_handle, INT32 num_compgotos, INT32 *compgoto_num_targets)
void Profile_Compgoto (PU_PROFILE_HANDLE pu_handle, INT32 compgoto_id, INT32 target, INT32 num_targets)
void Profile_Loop_Init (PU_PROFILE_HANDLE pu_handle, INT32 num_loops)
void Profile_Loop (PU_PROFILE_HANDLE pu_handle, INT32 loop_id)
void Profile_Loop_Iter (PU_PROFILE_HANDLE pu_handle, INT32 loop_id)
void Profile_Short_Circuit_Init (PU_PROFILE_HANDLE pu_handle, INT32 num_short_circuit_ops)
void Profile_Short_Circuit (PU_PROFILE_HANDLE pu_handle, INT32 short_circuit_id, bool taken)
void Incr_Right_Taken (PU_PROFILE_HANDLE pu_handle, INT32 id)
void Incr_Neither_Taken (PU_PROFILE_HANDLE pu_handle, INT32 id)
void Profile_Call_Init (PU_PROFILE_HANDLE pu_handle, INT32 num_calls)
void Profile_Icall_Init (PU_PROFILE_HANDLE pu_handle, INT32 num_icalls)
void Profile_Call_Entry (PU_PROFILE_HANDLE pu_handle, INT32 call_id)
void Profile_Call_Exit (PU_PROFILE_HANDLE pu_handle, INT32 call_id)
void Profile_Icall (PU_PROFILE_HANDLE pu_handle, INT32 icall_id, void *called_fun_address)
void Set_Instrumentation_Phase_Num (PROFILE_PHASE phase_num)
PROFILE_PHASE Instrumentation_Phase_Num ()
void __profile_init (char *fname, int phase_num, BOOL unique_name)
void__profile_pu_init (char *file_name, char *pu_name, long current_pc, INT32 pusize, INT32 checksum)
void __profile_invoke_init (void *pu_handle, INT32 num_invokes)
void __profile_invoke (void *pu_handle, INT32 invoke_id)
void __profile_branch_init (void *pu_handle, INT32 num_branches)
void __profile_branch (void *pu_handle, INT32 branch_id, bool taken)
void __profile_switch_init (void *pu_handle, INT32 num_switches, INT32 *switch_num_targets, INT32 num_case_values, FB_NUM_TYPE *case_values)
void __profile_switch (void *pu_handle, INT32 switch_id, INT32 target, INT32 num_targets)
void __profile_compgoto_init (void *pu_handle, INT32 num_compgotos, INT32 *compgoto_num_targets)
void __profile_compgoto (void *pu_handle, INT32 compgoto_id, INT32 target, INT32 num_targets)
void __profile_loop_init (void *pu_handle, INT32 num_loops)
void __profile_loop (void *pu_handle, INT32 loop_id)
void __profile_loop_iter (void *pu_handle, INT32 loop_id)
void __profile_short_circuit_init (void *pu_handle, INT32 num_short_circuit_ops)
void __profile_short_circuit (void *pu_handle, INT32 short_circuit_id, bool taken)
void __profile_call_init (void *pu_handle, int num_calls)
void __profile_icall_init (void *pu_handle, int num_icalls)
void __profile_call_entry (void *pu_handle, int call_id)
void __profile_call_exit (void *pu_handle, int call_id)
void __profile_icall (void *pu_handle, int icall_id, void *called_fun_address)
void __profile_finish (void)
void __profile_compgoto_init (void *pu_handle, int num_compgoto, int *num_targets)
void __profile_loop_init (void *pu_handle, int num_loops)
void __profile_short_circuit_init (void *pu_handle, int num_short_circuit_ops)
template<class T>
const Tmin (const T &a, const T &b)
template<class T>
const Tmax (const T &a, const T &b)

Variables

static char * ERR_POS = "Error in positioning within %s"
static char * ERR_WRITE = "Error in writing to %s"
HASH_MAP PU_Profile_Handle_Table
static PROFILE_PHASE instrumentation_phase_num = PROFILE_PHASE_NONE
static char * output_filename = NULL
static BOOL unique_output_filename = FALSE


Typedef Documentation

Definition at line 226 of file profile_aux.h.

Definition at line 231 of file profile_aux.h.

Definition at line 228 of file profile_aux.h.

Definition at line 67 of file profile_aux.h.

Definition at line 68 of file profile_aux.h.

Definition at line 340 of file profile_aux.h.

Definition at line 232 of file profile_aux.h.

Definition at line 225 of file profile_aux.h.

Definition at line 229 of file profile_aux.h.

Definition at line 335 of file profile_aux.h.

Definition at line 230 of file profile_aux.h.

Definition at line 227 of file profile_aux.h.


Function/Subroutine Documentation

void Instr::__profile_branch ( void pu_handle,
INT32  branch_id,
bool  taken 
)

Definition at line 176 of file profile_interface.cxx.

References DISABLEDEV, ENABLEDEV, Profile_Branch(), and Profile_Branch().

void Instr::__profile_branch_init ( void pu_handle,
INT32  num_branches 
)

void Instr::__profile_call_entry ( void pu_handle,
int  call_id 
)

void Instr::__profile_call_exit ( void pu_handle,
int  call_id 
)

Definition at line 379 of file profile_interface.cxx.

References DISABLEDEV, ENABLEDEV, Profile_Call_Exit(), and Profile_Call_Exit().

void Instr::__profile_call_init ( void pu_handle,
int  num_calls 
)

Definition at line 347 of file profile_interface.cxx.

References DISABLEDEV, ENABLEDEV, Profile_Call_Init(), and Profile_Call_Init().

void Instr::__profile_compgoto ( void pu_handle,
INT32  compgoto_id,
INT32  target,
INT32  num_targets 
)

Definition at line 230 of file profile_interface.cxx.

References DISABLEDEV, ENABLEDEV, Profile_Compgoto(), and Profile_Compgoto().

void Instr::__profile_compgoto_init ( void pu_handle,
int  num_compgoto,
int *  num_targets 
)

void Instr::__profile_compgoto_init ( void pu_handle,
INT32  num_compgotos,
INT32 compgoto_num_targets 
)

Definition at line 217 of file profile_interface.cxx.

References DISABLEDEV, ENABLEDEV, and Profile_Compgoto_Init().

void Instr::__profile_finish ( void   ) 

void Instr::__profile_icall ( void pu_handle,
int  icall_id,
void called_fun_address 
)

Definition at line 387 of file profile_interface.cxx.

References DISABLEDEV, ENABLEDEV, Profile_Icall(), and Profile_Icall().

void Instr::__profile_icall_init ( void pu_handle,
int  num_icalls 
)

void Instr::__profile_init ( char *  fname,
int  phase_num,
BOOL  unique_name 
)

void Instr::__profile_invoke ( void pu_handle,
INT32  invoke_id 
)

Definition at line 153 of file profile_interface.cxx.

References DISABLEDEV, ENABLEDEV, Profile_Invoke(), and Profile_Invoke().

void Instr::__profile_invoke_init ( void pu_handle,
INT32  num_invokes 
)

void Instr::__profile_loop ( void pu_handle,
INT32  loop_id 
)

Definition at line 299 of file profile_interface.cxx.

References DISABLEDEV, ENABLEDEV, Profile_Loop(), and Profile_Loop().

void Instr::__profile_loop_init ( void pu_handle,
int  num_loops 
)

void Instr::__profile_loop_init ( void pu_handle,
INT32  num_loops 
)

Definition at line 288 of file profile_interface.cxx.

References DISABLEDEV, ENABLEDEV, and Profile_Loop_Init().

void Instr::__profile_loop_iter ( void pu_handle,
INT32  loop_id 
)

Definition at line 310 of file profile_interface.cxx.

References DISABLEDEV, ENABLEDEV, Profile_Loop_Iter(), and Profile_Loop_Iter().

void * Instr::__profile_pu_init ( char *  file_name,
char *  pu_name,
long  current_pc,
INT32  pusize,
INT32  checksum 
)

void Instr::__profile_short_circuit ( void pu_handle,
INT32  short_circuit_id,
bool  taken 
)

void Instr::__profile_short_circuit_init ( void pu_handle,
int  num_short_circuit_ops 
)

void Instr::__profile_short_circuit_init ( void pu_handle,
INT32  num_short_circuit_ops 
)

Definition at line 322 of file profile_interface.cxx.

References DISABLEDEV, ENABLEDEV, and Profile_Short_Circuit_Init().

void Instr::__profile_switch ( void pu_handle,
INT32  switch_id,
INT32  target,
INT32  num_targets 
)

Definition at line 203 of file profile_interface.cxx.

References DISABLEDEV, ENABLEDEV, Profile_Switch(), and Profile_Switch().

void Instr::__profile_switch_init ( void pu_handle,
INT32  num_switches,
INT32 switch_num_targets,
INT32  num_case_values,
FB_NUM_TYPE case_values 
)

Definition at line 188 of file profile_interface.cxx.

References DISABLEDEV, ENABLEDEV, and Profile_Switch_Init().

static ULONG Instr::align ( ULONG  offset,
UINT32  alignment 
) [inline, static]

Definition at line 76 of file dump.cxx.

Referenced by Dump_all(), and realign_file().

static void Instr::@3026::Convert_Branch_Profile ( vector< FB_Info_Branch > &  dest,
const Branch_Profile_Vector src 
) [static]

static void Instr::@3026::Convert_Call_Profile ( vector< FB_Info_Call > &  dest,
const Call_Profile_Vector src 
) [static]

static void Instr::@3026::Convert_Invoke_Profile ( vector< FB_Info_Invoke > &  dest,
const Invoke_Profile_Vector src 
) [static]

static void Instr::@3026::Convert_Loop_Profile ( vector< FB_Info_Loop > &  dest,
const Loop_Profile_Vector src 
) [static]

static void Instr::@3026::Convert_Short_Circuit_Profile ( vector< FB_Info_Circuit > &  dest,
const Short_Circuit_Profile_Vector src 
) [static]

template<class T>
static void Instr::@3026::Convert_Switch_Profile ( FB_Info_Switch dest,
T src 
) [inline, static]

Definition at line 218 of file dump.cxx.

References _ffestd_stmt_::end, first, and FB_Info_Switch::freq_targets.

Referenced by Dump_PU_Switch_Profile().

void Instr::Dump_all ( FILE fp,
char *  output_filename 
)

void Instr::Dump_Fb_File_Header ( FILE fp,
char *  output_filename,
Fb_Hdr fb_hdr 
)

Definition at line 139 of file dump.cxx.

References ERR_POS, ERR_POS, ERR_WRITE, ERR_WRITE, FSEEK, FWRITE, SEEK_END, and SEEK_SET.

Referenced by Dump_all().

void Instr::Dump_Fb_File_Pu_Table ( FILE fp,
char *  fname,
vector< Pu_Hdr > &  Pu_Hdr_Table,
Fb_Hdr fb_hdr 
)

void Instr::Dump_Fb_File_Str_Table ( FILE fp,
char *  fname,
vector< char * > &  Str_Table,
Fb_Hdr fb_hdr 
)

ULONG Instr::Dump_PU_Branch_Profile ( FILE fp,
PU_PROFILE_HANDLE  handle,
char *  fname,
INT32 num 
)

ULONG Instr::Dump_PU_Call_Profile ( FILE fp,
PU_PROFILE_HANDLE  handle,
char *  fname,
INT32 num 
)

ULONG Instr::Dump_PU_Compgoto_Profile ( FILE fp,
PU_PROFILE_HANDLE  handle,
char *  fname,
INT32 num 
)

ULONG Instr::Dump_PU_Invoke_Profile ( FILE fp,
PU_PROFILE_HANDLE  handle,
char *  fname,
INT32 num 
)

ULONG Instr::Dump_PU_Loop_Profile ( FILE fp,
PU_PROFILE_HANDLE  handle,
char *  fname,
INT32 num 
)

void Instr::Dump_PU_Profile ( FILE fp,
PU_PROFILE_HANDLE  pu_handle,
char *  fname,
vector< Pu_Hdr > &  Pu_Hdr_Table,
vector< char * > &  Str_Table 
)

void Instr::Dump_PU_Profile ( FILE fp,
PU_PROFILE_HANDLE  pu_handle,
char *  fname,
vector< Pu_Hdr > &  Pu_Hdr_Table,
vector< char * > &  Str_Table 
)

template<class T>
POSITION Instr::@3026::Dump_PU_Profile ( FILE fp,
ULONG offset,
const T profile,
char *  fname 
) [inline, static]

Definition at line 303 of file dump.cxx.

References ERR_WRITE, FWRITE, mINT64, pos(), and realign_file().

Referenced by Dump_all(), and Dump_PU_Profile().

ULONG Instr::Dump_PU_Short_Circuit_Profile ( FILE fp,
PU_PROFILE_HANDLE  handle,
char *  fname,
INT32 num 
)

ULONG Instr::Dump_PU_Switch_Profile ( FILE fp,
PU_PROFILE_HANDLE  handle,
char *  fname,
INT32 num 
)

template<class T>
POSITION Instr::@3026::Dump_PU_Switch_Profile ( FILE fp,
ULONG offset,
T profile,
ULONG target_offset,
char *  fname 
) [inline, static]

PU_PROFILE_HANDLE Instr::Get_PU_Handle ( char *  file_name,
char *  pu_name,
long  current_pc,
INT32  pu_size,
INT32  checksum 
)

Definition at line 74 of file profile.cxx.

References NULL, PU_Profile_Handle_Table, and PU_Profile_Handle_Table.

Referenced by __profile_pu_init().

void Instr::Incr_Branch_Not_Taken ( PU_PROFILE_HANDLE  pu_handle,
INT32  id 
)

void Instr::Incr_Branch_Taken ( PU_PROFILE_HANDLE  pu_handle,
INT32  id 
)

void Instr::Incr_Neither_Taken ( PU_PROFILE_HANDLE  pu_handle,
INT32  id 
)

void Instr::Incr_Right_Taken ( PU_PROFILE_HANDLE  pu_handle,
INT32  id 
)

PROFILE_PHASE Instr::Instrumentation_Phase_Num (  ) 

Definition at line 626 of file profile.cxx.

References instrumentation_phase_num.

Referenced by __profile_init(), and Dump_all().

template<class T>
const T& Instr::max ( const T a,
const T b 
) [inline]

Definition at line 46 of file utils.h.

template<class T>
const T& Instr::min ( const T a,
const T b 
) [inline]

Definition at line 41 of file utils.h.

void Instr::Profile_Branch ( PU_PROFILE_HANDLE  pu_handle,
INT32  branch_id,
bool  taken 
)

Definition at line 157 of file profile.cxx.

References Incr_Branch_Not_Taken(), and Incr_Branch_Taken().

Referenced by __profile_branch().

void Instr::Profile_Branch_Init ( PU_PROFILE_HANDLE  pu_handle,
INT32  num_branches 
)

void Instr::Profile_Call_Entry ( PU_PROFILE_HANDLE  pu_handle,
INT32  call_id 
)

void Instr::Profile_Call_Exit ( PU_PROFILE_HANDLE  pu_handle,
INT32  call_id 
)

void Instr::Profile_Call_Init ( PU_PROFILE_HANDLE  pu_handle,
INT32  num_calls 
)

void Instr::Profile_Compgoto ( PU_PROFILE_HANDLE  pu_handle,
INT32  compgoto_id,
INT32  target,
INT32  num_targets 
)

void Instr::Profile_Compgoto_Init ( PU_PROFILE_HANDLE  pu_handle,
INT32  num_compgotos,
INT32 compgoto_num_targets 
)

void Instr::Profile_Icall ( PU_PROFILE_HANDLE  pu_handle,
INT32  icall_id,
void called_fun_address 
)

void Instr::Profile_Icall_Init ( PU_PROFILE_HANDLE  pu_handle,
INT32  num_icalls 
)

void Instr::Profile_Invoke ( PU_PROFILE_HANDLE  pu_handle,
INT32  invoke_id 
)

void Instr::Profile_Invoke_Init ( PU_PROFILE_HANDLE  pu_handle,
INT32  num_invokes 
)

void Instr::Profile_Loop ( PU_PROFILE_HANDLE  pu_handle,
INT32  loop_id 
)

void Instr::Profile_Loop_Init ( PU_PROFILE_HANDLE  pu_handle,
INT32  num_loops 
)

void Instr::Profile_Loop_Iter ( PU_PROFILE_HANDLE  pu_handle,
INT32  loop_id 
)

void Instr::Profile_Short_Circuit ( PU_PROFILE_HANDLE  pu_handle,
INT32  short_circuit_id,
bool  taken 
)

Definition at line 400 of file profile.cxx.

References Incr_Neither_Taken(), and Incr_Right_Taken().

Referenced by __profile_short_circuit().

void Instr::Profile_Short_Circuit_Init ( PU_PROFILE_HANDLE  pu_handle,
INT32  num_short_circuit_ops 
)

void Instr::Profile_Switch ( PU_PROFILE_HANDLE  pu_handle,
INT32  switch_id,
INT32  case_value,
INT32  num_targets 
)

void Instr::Profile_Switch_Init ( PU_PROFILE_HANDLE  pu_handle,
INT32  num_switches,
INT32 switch_num_targets,
INT32  num_case_values,
FB_NUM_TYPE case_values 
)

static void Instr::realign_file ( FILE fp,
ULONG offset,
UINT32  alignment,
char *  fname 
) [inline, static]

Definition at line 84 of file dump.cxx.

References align(), ERR_POS, FSEEK, SEEK_CUR, and ULONG.

Referenced by Dump_Fb_File_Pu_Table(), Dump_PU_Profile(), and Dump_PU_Switch_Profile().

void Instr::Set_Instrumentation_Phase_Num ( PROFILE_PHASE  phase_num  ) 

Definition at line 618 of file profile.cxx.

References instrumentation_phase_num.

Referenced by __profile_init().


Variable Documentation

char* Instr::ERR_POS = "Error in positioning within %s" [static]

Definition at line 70 of file dump.cxx.

Referenced by Dump_all(), Dump_Fb_File_Header(), and realign_file().

char* Instr::ERR_WRITE = "Error in writing to %s" [static]

PROFILE_PHASE Instr::instrumentation_phase_num = PROFILE_PHASE_NONE [static]

Definition at line 65 of file profile.cxx.

char* Instr::output_filename = NULL [static]

Definition at line 64 of file profile_interface.cxx.

Referenced by __profile_finish(), and __profile_init().

Definition at line 63 of file profile.cxx.

Referenced by __profile_finish(), Dump_all(), and Get_PU_Handle().

Definition at line 65 of file profile_interface.cxx.

Referenced by __profile_finish(), and __profile_init().


Generated on Wed Apr 8 17:34:20 2009 for Open64 by  doxygen 1.5.6