Main Page | Class Hierarchy | Alphabetical List | Compound List | File List | Compound Members | File Members

Trace_Profile Class Reference

#include <trace_profile.h>

List of all members.

Public Member Functions

 Trace_Profile ()
 ~Trace_Profile ()
void set_bbid_profile_table_string (char *i)
void doit (legoModule *ModulePtr, int option)
void instrument (legoProc *proc_ptr, Node_Table *node_table)
void instrument_main (legoModule *module_ptr, legoProc *proc_ptr)
void update_symbol_table (legoModule *module_ptr, int num_of_counter)
void insert_param_code (int mapping, legoProc *proc_ptr, legoRegion *region_ptr, legoOprd *save_oprd, legoOprd *dest_oprd, legoOprd *predicate_oprd, legoOp *from_op_ptr)
void insert_pbrr_code (int pbrr_option, int mapping, legoProc *proc_ptr, legoRegion *region_ptr, legoOprd *address_oprd, legoOprd *dest_oprd, legoOprd *predicate_oprd, legoOp *from_op_ptr, legoOprd *save_oprd, legoOprd *dest_p1_oprd, attrList *attr_list)
void post_update (legoModule *module_ptr)
void open_main_file (int max_entry)
void write_main_file (Node_Table *node_table)
void close_main_file ()
void open_header_file ()
void write_header_file (Node_Table *node_table)
void close_header_file ()
void lego_write (legoModule *module_ptr, char *input_filename)
attrswrite_attribute (legoProc *proc_ptr)
void insert_probe (legoProc *proc_ptr, legoRegion *region_ptr, Node_Table *node_table)
 Trace_Profile ()
 ~Trace_Profile ()
void set_bbid_profile_table_string (char *i)
void doit (legoModule *ModulePtr, int option)
void instrument (legoProc *proc_ptr, Node_Table *node_table)
void instrument_main (legoModule *module_ptr, legoProc *proc_ptr)
void update_symbol_table (legoModule *module_ptr, int num_of_counter)
void insert_param_code (int mapping, legoProc *proc_ptr, legoRegion *region_ptr, legoOprd *save_oprd, legoOprd *dest_oprd, legoOprd *predicate_oprd, legoOp *from_op_ptr)
void insert_pbrr_code (int pbrr_option, int mapping, legoProc *proc_ptr, legoRegion *region_ptr, legoOprd *address_oprd, legoOprd *dest_oprd, legoOprd *predicate_oprd, legoOp *from_op_ptr, legoOprd *save_oprd, legoOprd *dest_p1_oprd, attrList *attr_list)
void post_update (legoModule *module_ptr)
void open_main_file (int max_entry)
void write_main_file (Node_Table *node_table)
void close_main_file ()
void open_header_file ()
void write_header_file (Node_Table *node_table)
void close_header_file ()
void lego_write (legoModule *module_ptr, char *input_filename)
attrswrite_attribute (legoProc *proc_ptr)
void insert_probe (legoProc *proc_ptr, legoRegion *region_ptr, Node_Table *node_table)

Private Attributes

FILE * _main_fp
FILE * _header_fp
char * _bbid_profile_table_string
legoOprd_address_oprd
legoOprd_save_oprd
legoOprd_dest_p1_oprd
legoOprd_dest_ret_oprd
attrList_attr_list
FILE * _main_fp
FILE * _header_fp
char * _bbid_profile_table_string
legoOprd_address_oprd
legoOprd_save_oprd
legoOprd_dest_p1_oprd
legoOprd_dest_ret_oprd
attrList_attr_list


Constructor & Destructor Documentation

Trace_Profile::Trace_Profile  )  [inline]
 

Definition at line 29 of file include/trace_profile.h.

Trace_Profile::~Trace_Profile  )  [inline]
 

Definition at line 31 of file include/trace_profile.h.

References _bbid_profile_table_string.

Trace_Profile::Trace_Profile  )  [inline]
 

Definition at line 29 of file src/trace_profile.h.

Trace_Profile::~Trace_Profile  )  [inline]
 

Definition at line 31 of file src/trace_profile.h.

References _bbid_profile_table_string.


Member Function Documentation

void Trace_Profile::close_header_file  ) 
 

void Trace_Profile::close_header_file  ) 
 

Definition at line 410 of file trace_profile.cpp.

References _header_fp, and fclose().

Referenced by doit().

void Trace_Profile::close_main_file  ) 
 

void Trace_Profile::close_main_file  ) 
 

Definition at line 415 of file trace_profile.cpp.

References _main_fp, and fclose().

Referenced by doit().

void Trace_Profile::doit legoModule ModulePtr,
int  option
 

void Trace_Profile::doit legoModule ModulePtr,
int  option
 

Definition at line 44 of file trace_profile.cpp.

References Node_Table::build_from_proc(), check_max_op_id(), close_header_file(), close_main_file(), fclose(), legoPSet< void * >::GetCount(), legoPSet< void * >::GetItem(), legoProc::GetProcName(), legoRegion::GetRegionType(), i, Predicate::init_true_predicate_oprd(), instrument(), instrument_main(), Node_Table::node_table_fp(), Node_Table::open_file(), open_header_file(), open_main_file(), Node_Table::print(), RT_PROC, Node_Table::set_node_table_fp(), Node_Table::set_start_index(), Node_Table::start_index(), strcmp(), Tdb, and Tdb_call.

void Trace_Profile::insert_param_code int  mapping,
legoProc proc_ptr,
legoRegion region_ptr,
legoOprd save_oprd,
legoOprd dest_oprd,
legoOprd predicate_oprd,
legoOp from_op_ptr
 

void Trace_Profile::insert_param_code int  mapping,
legoProc proc_ptr,
legoRegion region_ptr,
legoOprd save_oprd,
legoOprd dest_oprd,
legoOprd predicate_oprd,
legoOp from_op_ptr
 

Definition at line 223 of file trace_profile.cpp.

References FindMaxOpId(), insert_new_op_before(), MOVE, OT_LITERAL_I, legoOp::SetDestOprdPtr(), legoOprd::SetLiteralInteger(), legoOp::SetOpcode(), legoOprd::SetOprdType(), legoOp::SetPredOprdPtr(), legoOp::SetSrcOprdPtr(), Tdb_call, and WriteOps().

Referenced by insert_probe().

void Trace_Profile::insert_pbrr_code int  pbrr_option,
int  mapping,
legoProc proc_ptr,
legoRegion region_ptr,
legoOprd address_oprd,
legoOprd dest_oprd,
legoOprd predicate_oprd,
legoOp from_op_ptr,
legoOprd save_oprd,
legoOprd dest_p1_oprd,
attrList attr_list
 

void Trace_Profile::insert_pbrr_code int  pbrr_option,
int  mapping,
legoProc proc_ptr,
legoRegion region_ptr,
legoOprd address_oprd,
legoOprd dest_oprd,
legoOprd predicate_oprd,
legoOp from_op_ptr,
legoOprd save_oprd,
legoOprd dest_p1_oprd,
attrList attr_list
 

Definition at line 262 of file trace_profile.cpp.

References AS_G_ABS, BRL, FindMaxOpId(), insert_new_op_before(), MOVE, OT_LITERAL_L, PBRR, legoOp::SetDestOprdPtr(), legoOprd::SetLiteralAddrStyle(), legoOprd::SetLiteralLabel(), legoOp::SetOpAttrListPtr(), legoOp::SetOpcode(), legoOprd::SetOprdType(), legoOp::SetPredOprdPtr(), legoOp::SetSrcOprdPtr(), Tdb_call, and WriteOps().

Referenced by insert_probe().

void Trace_Profile::insert_probe legoProc proc_ptr,
legoRegion region_ptr,
Node_Table node_table
 

void Trace_Profile::insert_probe legoProc proc_ptr,
legoRegion region_ptr,
Node_Table node_table
 

Definition at line 171 of file trace_profile.cpp.

References _address_oprd, _attr_list, _dest_p1_oprd, _dest_ret_oprd, _save_oprd, Node_Table::find(), fprintf(), legoPSet< void * >::GetCount(), legoRegion::GetEntryOpsPtr(), legoPSet< void * >::GetItem(), legoOp::GetNextLink(), opList::GetOpPtr(), legoRegion::GetRegionId(), legoRegion::GetRegionType(), i, insert_param_code(), insert_pbrr_code(), regionTypes, RT_BB, RT_HB, RT_LOOP, RT_LOOPBODY, RT_PROC, RT_SB, RT_TRACE, RT_TREE, Tdb, Tdb_call, Predicate::true_predicate_oprd(), and WriteOps().

Referenced by instrument().

void Trace_Profile::instrument legoProc proc_ptr,
Node_Table node_table
 

void Trace_Profile::instrument legoProc proc_ptr,
Node_Table node_table
 

Definition at line 128 of file trace_profile.cpp.

References _address_oprd, _attr_list, _dest_p1_oprd, _dest_ret_oprd, _save_oprd, DT_I, find_max_reg_num(), FT_GPR, attrs::GetAttrId(), attrs::GetAttrType(), legoPSet< void * >::GetCount(), insert_probe(), INT_P1, OT_MACRO, OT_REG, RET_ADDR, RT_R, attrList::SetAttrId(), attrList::SetAttrPtr(), attrList::SetAttrType(), legoOprd::SetOprdDataType(), legoOprd::SetOprdFileType(), legoOprd::SetOprdRegNum(), legoOprd::SetOprdRegType(), legoOprd::SetOprdType(), attrList::SetValid(), and write_attribute().

Referenced by doit().

void Trace_Profile::instrument_main legoModule module_ptr,
legoProc proc_ptr
 

void Trace_Profile::instrument_main legoModule module_ptr,
legoProc proc_ptr
 

Definition at line 420 of file trace_profile.cpp.

References legoModule::GetTextPtr(), symbolTable::GetVarCount(), nameTable::GetVarName(), symbolTable::GetVarTablePtr(), i, legoProc::SetProcName(), nameTable::SetVarName(), strcmp(), Tdb, Tdb_call, nameTable::WriteRebel(), and symbolTable::WriteRebel().

Referenced by doit().

void Trace_Profile::lego_write legoModule module_ptr,
char *  input_filename
 

void Trace_Profile::lego_write legoModule module_ptr,
char *  input_filename
 

Definition at line 447 of file trace_profile.cpp.

References i, input_filename, LegoWrite(), strcpy(), and strlen().

void Trace_Profile::open_header_file  ) 
 

void Trace_Profile::open_header_file  ) 
 

Definition at line 399 of file trace_profile.cpp.

References _header_fp, fopen(), fprintf(), and TP_HEADER_FILENAME.

Referenced by doit().

void Trace_Profile::open_main_file int  max_entry  ) 
 

void Trace_Profile::open_main_file int  max_entry  ) 
 

Definition at line 314 of file trace_profile.cpp.

References _main_fp, exit(), fclose(), fopen(), fprintf(), Tdb, and TP_MAIN_FILENAME.

Referenced by doit().

void Trace_Profile::post_update legoModule module_ptr  ) 
 

void Trace_Profile::post_update legoModule module_ptr  ) 
 

void Trace_Profile::set_bbid_profile_table_string char *  i  )  [inline]
 

Definition at line 36 of file src/trace_profile.h.

References _bbid_profile_table_string, i, strcpy(), and strlen().

void Trace_Profile::set_bbid_profile_table_string char *  i  )  [inline]
 

Definition at line 36 of file include/trace_profile.h.

References _bbid_profile_table_string, i, strcpy(), and strlen().

void Trace_Profile::update_symbol_table legoModule module_ptr,
int  num_of_counter
 

void Trace_Profile::update_symbol_table legoModule module_ptr,
int  num_of_counter
 

attrs* Trace_Profile::write_attribute legoProc proc_ptr  ) 
 

attrs * Trace_Profile::write_attribute legoProc proc_ptr  ) 
 

Definition at line 472 of file trace_profile.cpp.

References ATTR_LC, legoProc::GetAttrDictionary(), attrs::GetAttrId(), attrs::GetNextAttrPtr(), INT_P1, INT_RET, OT_MACRO, attrs::SetAttrId(), attrs::SetAttrOprdPtr(), attrs::SetAttrString(), attrs::SetAttrType(), attrs::SetNextAttrPtr(), legoOprd::SetOprdRegNum(), legoOprd::SetOprdType(), Tdb_call, and WriteAttrs().

Referenced by instrument().

void Trace_Profile::write_header_file Node_Table node_table  ) 
 

void Trace_Profile::write_header_file Node_Table node_table  ) 
 

void Trace_Profile::write_main_file Node_Table node_table  ) 
 

void Trace_Profile::write_main_file Node_Table node_table  ) 
 


Member Data Documentation

legoOprd* Trace_Profile::_address_oprd [private]
 

Definition at line 72 of file src/trace_profile.h.

legoOprd* Trace_Profile::_address_oprd [private]
 

Definition at line 72 of file include/trace_profile.h.

Referenced by insert_probe(), and instrument().

attrList* Trace_Profile::_attr_list [private]
 

Definition at line 76 of file src/trace_profile.h.

attrList* Trace_Profile::_attr_list [private]
 

Definition at line 76 of file include/trace_profile.h.

Referenced by insert_probe(), and instrument().

char* Trace_Profile::_bbid_profile_table_string [private]
 

Definition at line 70 of file src/trace_profile.h.

char* Trace_Profile::_bbid_profile_table_string [private]
 

Definition at line 70 of file include/trace_profile.h.

Referenced by set_bbid_profile_table_string(), and ~Trace_Profile().

legoOprd* Trace_Profile::_dest_p1_oprd [private]
 

Definition at line 74 of file src/trace_profile.h.

legoOprd* Trace_Profile::_dest_p1_oprd [private]
 

Definition at line 74 of file include/trace_profile.h.

Referenced by insert_probe(), and instrument().

legoOprd* Trace_Profile::_dest_ret_oprd [private]
 

Definition at line 75 of file src/trace_profile.h.

legoOprd* Trace_Profile::_dest_ret_oprd [private]
 

Definition at line 75 of file include/trace_profile.h.

Referenced by insert_probe(), and instrument().

FILE* Trace_Profile::_header_fp [private]
 

Definition at line 69 of file src/trace_profile.h.

FILE* Trace_Profile::_header_fp [private]
 

Definition at line 69 of file include/trace_profile.h.

Referenced by close_header_file(), and open_header_file().

FILE* Trace_Profile::_main_fp [private]
 

Definition at line 68 of file src/trace_profile.h.

FILE* Trace_Profile::_main_fp [private]
 

Definition at line 68 of file include/trace_profile.h.

Referenced by close_main_file(), and open_main_file().

legoOprd* Trace_Profile::_save_oprd [private]
 

Definition at line 73 of file src/trace_profile.h.

legoOprd* Trace_Profile::_save_oprd [private]
 

Definition at line 73 of file include/trace_profile.h.

Referenced by insert_probe(), and instrument().


The documentation for this class was generated from the following files:
Generated on Mon Jul 21 20:31:35 2003 for TINKER LEGO DOC by doxygen 1.3.2