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

Node_Table Class Reference

#include <node_table.h>

List of all members.

Public Member Functions

 Node_Table ()
 ~Node_Table ()
void set_node_table_fp (FILE *fp)
void set_start_index (unsigned int i)
void set_size (int i)
void set_proc_name (char *i)
FILE * node_table_fp ()
unsigned int start_index ()
int size ()
char * proc_name ()
void open_file (char *file_name)
void open_file_with_value (char *file_name)
void build (CFG *cfg)
void print (FILE *ifp)
void print_with_value (FILE *ifp, char *value_string, int value_format)
int find (int node_id)
void add_num_of_entries (int num)
void add_entry (int id)
void read_for_proc (char *proc_name)
void read_for_proc_with_value (char *proc_name)
void set_entry (int index, int profile, int mapping, int node_id)
void set_entry (int index, int profile, int mapping, int node_id, int value)
Node_Entryfind_by_mapping (int mapping)
Node_Entryfind_by_node_id (int node_id)
void build_from_proc (legoProc *proc_ptr)
void calculate_size (legoRegion *region_ptr)
void set_entry_from_region (int &index, legoRegion *region_ptr)
void build_ld_st_from_proc (legoProc *proc_ptr)
void calculate_ld_st_size (legoRegion *region_ptr)
void set_ld_st_entry_from_region (int &index, legoRegion *region_ptr)
 Node_Table ()
 ~Node_Table ()
void set_node_table_fp (FILE *fp)
void set_start_index (unsigned int i)
void set_size (int i)
void set_proc_name (char *i)
FILE * node_table_fp ()
unsigned int start_index ()
int size ()
char * proc_name ()
void open_file (char *file_name)
void open_file_with_value (char *file_name)
void build (CFG *cfg)
void print (FILE *ifp)
void print_with_value (FILE *ifp, char *value_string, int value_format)
int find (int node_id)
void add_num_of_entries (int num)
void add_entry (int id)
void read_for_proc (char *proc_name)
void read_for_proc_with_value (char *proc_name)
void set_entry (int index, int profile, int mapping, int node_id)
void set_entry (int index, int profile, int mapping, int node_id, int value)
Node_Entryfind_by_mapping (int mapping)
Node_Entryfind_by_node_id (int node_id)
void build_from_proc (legoProc *proc_ptr)
void calculate_size (legoRegion *region_ptr)
void set_entry_from_region (int &index, legoRegion *region_ptr)
void build_ld_st_from_proc (legoProc *proc_ptr)
void calculate_ld_st_size (legoRegion *region_ptr)
void set_ld_st_entry_from_region (int &index, legoRegion *region_ptr)

Private Attributes

FILE * _node_table_fp
char * _proc_name
unsigned int _start_index
Node_Entry_node_entry
int _size
int _entry_index
FILE * _node_table_fp
char * _proc_name
Node_Entry_node_entry


Constructor & Destructor Documentation

Node_Table::Node_Table  )  [inline]
 

Definition at line 51 of file include/node_table.h.

References _entry_index, _node_entry, _node_table_fp, _proc_name, _size, and _start_index.

Node_Table::~Node_Table  )  [inline]
 

Definition at line 53 of file include/node_table.h.

References _node_entry.

Node_Table::Node_Table  )  [inline]
 

Definition at line 51 of file src/node_table.h.

References _entry_index, _node_entry, _node_table_fp, _proc_name, _size, and _start_index.

Node_Table::~Node_Table  )  [inline]
 

Definition at line 53 of file src/node_table.h.

References _node_entry.


Member Function Documentation

void Node_Table::add_entry int  id  ) 
 

void Node_Table::add_entry int  id  ) 
 

Definition at line 187 of file node_table.cpp.

References _entry_index, _node_entry, _size, _start_index, Node_Entry::mapping(), Node_Entry::node_id(), NOTdb, Node_Entry::set_mapping(), and Node_Entry::set_node_id().

Referenced by Value_Profile::instrument(), and Branch_Profile::instrument().

void Node_Table::add_num_of_entries int  num  ) 
 

void Node_Table::add_num_of_entries int  num  ) 
 

Definition at line 173 of file node_table.cpp.

References _node_entry, and _size.

Referenced by Value_Profile::doit(), Branch_Profile::doit(), read_for_proc(), and read_for_proc_with_value().

void Node_Table::build CFG cfg  ) 
 

void Node_Table::build CFG cfg  ) 
 

Definition at line 134 of file node_table.cpp.

References _node_entry, _size, _start_index, CFG::entry(), CFG::exit(), index(), Node_Entry::mapping(), Node_List::next_node_list(), Node_List::node(), CFG::node_count(), Node_Entry::node_id(), Node::node_id(), NOTdb, CFG::proc_name(), CFG::root(), Node_Entry::set_mapping(), Node_Entry::set_node_id(), set_proc_name(), and Node_Entry::set_value().

void Node_Table::build_from_proc legoProc proc_ptr  ) 
 

void Node_Table::build_from_proc legoProc proc_ptr  ) 
 

Definition at line 314 of file node_table.cpp.

References _node_entry, _size, calculate_size(), legoProc::GetProcName(), index(), set_entry_from_region(), and set_proc_name().

Referenced by Trace_Profile::doit(), Full_Profile::doit(), and BB_Edge_Profile::doit().

void Node_Table::build_ld_st_from_proc legoProc proc_ptr  ) 
 

void Node_Table::build_ld_st_from_proc legoProc proc_ptr  ) 
 

Definition at line 465 of file node_table.cpp.

References _node_entry, _size, calculate_ld_st_size(), legoProc::GetProcName(), index(), set_ld_st_entry_from_region(), and set_proc_name().

Referenced by Full_Profile::doit().

void Node_Table::calculate_ld_st_size legoRegion region_ptr  ) 
 

void Node_Table::calculate_ld_st_size legoRegion region_ptr  ) 
 

Definition at line 481 of file node_table.cpp.

References _size, fprintf(), legoPSet< void * >::GetCount(), legoRegion::GetEntryOpsPtr(), legoPSet< void * >::GetItem(), legoOp::GetNextLink(), legoOp::GetOpcode(), opList::GetOpPtr(), legoRegion::GetRegionType(), i, is_memory(), regionTypes, RT_BB, RT_HB, RT_LOOP, RT_LOOPBODY, RT_PROC, RT_SB, RT_TRACE, and RT_TREE.

Referenced by build_ld_st_from_proc().

void Node_Table::calculate_size legoRegion region_ptr  ) 
 

void Node_Table::calculate_size legoRegion region_ptr  ) 
 

Definition at line 328 of file node_table.cpp.

References _size, fprintf(), legoPSet< void * >::GetCount(), legoPSet< void * >::GetItem(), legoRegion::GetRegionType(), i, regionTypes, RT_BB, RT_HB, RT_LOOP, RT_LOOPBODY, RT_PROC, RT_SB, RT_TRACE, and RT_TREE.

Referenced by build_from_proc().

int Node_Table::find int  node_id  ) 
 

int Node_Table::find int  node_id  ) 
 

Definition at line 265 of file node_table.cpp.

References _node_entry, _size, i, Node_Entry::mapping(), and Node_Entry::node_id().

Referenced by Trace_Profile::insert_probe(), Full_Profile::insert_probe(), BB_Edge_Profile::insert_probe(), and BB_Edge_Profile::instrument_exit_op().

Node_Entry* Node_Table::find_by_mapping int  mapping  ) 
 

Node_Entry * Node_Table::find_by_mapping int  mapping  ) 
 

Definition at line 249 of file node_table.cpp.

References _node_entry, _size, i, and Node_Entry::mapping().

Node_Entry* Node_Table::find_by_node_id int  node_id  ) 
 

Node_Entry * Node_Table::find_by_node_id int  node_id  ) 
 

Definition at line 237 of file node_table.cpp.

References _node_entry, _size, i, and Node_Entry::node_id().

Referenced by Full_Profile::insert_probe(), and Value_Profile::instrument_from_table().

FILE* Node_Table::node_table_fp  )  [inline]
 

Definition at line 67 of file src/node_table.h.

References _node_table_fp.

FILE* Node_Table::node_table_fp  )  [inline]
 

Definition at line 67 of file include/node_table.h.

References _node_table_fp.

Referenced by Value_Profile::doit(), Trace_Profile::doit(), Full_Profile::doit(), Branch_Profile::doit(), and BB_Edge_Profile::doit().

void Node_Table::open_file char *  file_name  ) 
 

void Node_Table::open_file char *  file_name  ) 
 

Definition at line 91 of file node_table.cpp.

References _node_table_fp, _start_index, fclose(), fopen(), fscanf(), i, NOTdb, proc_name(), size, and size().

Referenced by Value_Profile::doit(), Trace_Profile::doit(), Full_Profile::doit(), Branch_Profile::doit(), and BB_Edge_Profile::doit().

void Node_Table::open_file_with_value char *  file_name  ) 
 

void Node_Table::open_file_with_value char *  file_name  ) 
 

Definition at line 36 of file node_table.cpp.

References _node_table_fp, _start_index, fclose(), fopen(), fscanf(), i, NOTdb, proc_name(), size, and size().

Referenced by Full_Profile::doit().

void Node_Table::print FILE *  ifp  ) 
 

void Node_Table::print FILE *  ifp  ) 
 

Definition at line 224 of file node_table.cpp.

References _node_entry, _proc_name, _size, fprintf(), i, Node_Entry::mapping(), Node_Entry::node_id(), NOTdb, and Node_Entry::profile().

Referenced by Value_Profile::doit(), Trace_Profile::doit(), Full_Profile::doit(), Branch_Profile::doit(), and BB_Edge_Profile::doit().

void Node_Table::print_with_value FILE *  ifp,
char *  value_string,
int  value_format
 

void Node_Table::print_with_value FILE *  ifp,
char *  value_string,
int  value_format
 

Definition at line 204 of file node_table.cpp.

References _node_entry, _proc_name, _size, fprintf(), i, Node_Entry::mapping(), Node_Entry::node_id(), NOTdb, Node_Entry::profile(), and Node_Entry::value().

Referenced by Full_Profile::doit().

char* Node_Table::proc_name  )  [inline]
 

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

References _proc_name.

char* Node_Table::proc_name  )  [inline]
 

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

References _proc_name.

Referenced by open_file(), and open_file_with_value().

void Node_Table::read_for_proc char *  proc_name  ) 
 

void Node_Table::read_for_proc char *  proc_name  ) 
 

Definition at line 279 of file node_table.cpp.

References _node_table_fp, add_num_of_entries(), fscanf(), i, NOTdb, set_entry(), set_proc_name(), size, size(), and strcmp().

void Node_Table::read_for_proc_with_value char *  proc_name  ) 
 

void Node_Table::read_for_proc_with_value char *  proc_name  ) 
 

Definition at line 417 of file node_table.cpp.

References _node_table_fp, _start_index, add_num_of_entries(), fscanf(), i, NOTdb, set_entry(), set_proc_name(), size, size(), and strcmp().

Referenced by Value_Profile::doit_from_file().

void Node_Table::set_entry int  index,
int  profile,
int  mapping,
int  node_id,
int  value
 

void Node_Table::set_entry int  index,
int  profile,
int  mapping,
int  node_id
 

void Node_Table::set_entry int  index,
int  profile,
int  mapping,
int  node_id,
int  value
 

Definition at line 456 of file node_table.cpp.

References _node_entry, index(), Node_Entry::set_mapping(), Node_Entry::set_node_id(), Node_Entry::set_profile(), and Node_Entry::set_value().

void Node_Table::set_entry int  index,
int  profile,
int  mapping,
int  node_id
 

Definition at line 179 of file node_table.cpp.

References _node_entry, index(), Node_Entry::set_mapping(), Node_Entry::set_node_id(), and Node_Entry::set_profile().

Referenced by read_for_proc(), and read_for_proc_with_value().

void Node_Table::set_entry_from_region int &  index,
legoRegion region_ptr
 

void Node_Table::set_entry_from_region int &  index,
legoRegion region_ptr
 

Definition at line 368 of file node_table.cpp.

References _node_entry, _size, _start_index, fprintf(), legoPSet< void * >::GetCount(), legoPSet< void * >::GetItem(), legoRegion::GetRegionId(), legoRegion::GetRegionType(), i, index(), regionTypes, RT_BB, RT_HB, RT_LOOP, RT_LOOPBODY, RT_PROC, RT_SB, RT_TRACE, RT_TREE, Node_Entry::set_mapping(), Node_Entry::set_node_id(), and Node_Entry::set_value().

Referenced by build_from_proc().

void Node_Table::set_ld_st_entry_from_region int &  index,
legoRegion region_ptr
 

void Node_Table::set_ld_st_entry_from_region int &  index,
legoRegion region_ptr
 

Definition at line 536 of file node_table.cpp.

References _node_entry, _size, _start_index, fprintf(), legoPSet< void * >::GetCount(), legoRegion::GetEntryOpsPtr(), legoPSet< void * >::GetItem(), legoOp::GetNextLink(), legoOp::GetOpcode(), legoOp::GetOpId(), opList::GetOpPtr(), legoRegion::GetRegionType(), i, index(), is_memory(), regionTypes, RT_BB, RT_HB, RT_LOOP, RT_LOOPBODY, RT_PROC, RT_SB, RT_TRACE, RT_TREE, Node_Entry::set_mapping(), Node_Entry::set_node_id(), and Node_Entry::set_value().

Referenced by build_ld_st_from_proc().

void Node_Table::set_node_table_fp FILE *  fp  )  [inline]
 

Definition at line 58 of file src/node_table.h.

References _node_table_fp, and fp.

void Node_Table::set_node_table_fp FILE *  fp  )  [inline]
 

Definition at line 58 of file include/node_table.h.

References _node_table_fp, and fp.

Referenced by Value_Profile::doit(), Trace_Profile::doit(), Full_Profile::doit(), Branch_Profile::doit(), BB_Edge_Profile::doit(), and Value_Profile::doit_from_file().

void Node_Table::set_proc_name char *  i  )  [inline]
 

Definition at line 61 of file src/node_table.h.

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

void Node_Table::set_proc_name char *  i  )  [inline]
 

Definition at line 61 of file include/node_table.h.

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

Referenced by build(), build_from_proc(), build_ld_st_from_proc(), Value_Profile::doit(), Branch_Profile::doit(), read_for_proc(), and read_for_proc_with_value().

void Node_Table::set_size int  i  )  [inline]
 

Definition at line 60 of file src/node_table.h.

References _size, and i.

void Node_Table::set_size int  i  )  [inline]
 

Definition at line 60 of file include/node_table.h.

References _size, and i.

void Node_Table::set_start_index unsigned int  i  )  [inline]
 

Definition at line 59 of file src/node_table.h.

References _start_index, and i.

void Node_Table::set_start_index unsigned int  i  )  [inline]
 

Definition at line 59 of file include/node_table.h.

References _start_index, and i.

Referenced by Value_Profile::doit(), Trace_Profile::doit(), Full_Profile::doit(), Branch_Profile::doit(), BB_Edge_Profile::doit(), and Value_Profile::doit_from_file().

int Node_Table::size  )  [inline]
 

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

References _size.

int Node_Table::size  )  [inline]
 

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

References _size.

Referenced by Value_Profile::doit_from_file(), open_file(), open_file_with_value(), read_for_proc(), and read_for_proc_with_value().

unsigned int Node_Table::start_index  )  [inline]
 

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

References _start_index.

unsigned int Node_Table::start_index  )  [inline]
 

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

References _start_index.

Referenced by Value_Profile::doit(), Trace_Profile::doit(), Full_Profile::doit(), Branch_Profile::doit(), BB_Edge_Profile::doit(), Value_Profile::doit_from_file(), Value_Profile::instrument(), and Branch_Profile::instrument().


Member Data Documentation

int Node_Table::_entry_index [private]
 

Definition at line 111 of file src/node_table.h.

Referenced by add_entry(), and Node_Table().

Node_Entry* Node_Table::_node_entry [private]
 

Definition at line 109 of file src/node_table.h.

Node_Entry* Node_Table::_node_entry [private]
 

Definition at line 109 of file include/node_table.h.

Referenced by add_entry(), add_num_of_entries(), build(), build_from_proc(), build_ld_st_from_proc(), find(), find_by_mapping(), find_by_node_id(), Node_Table(), print(), print_with_value(), set_entry(), set_entry_from_region(), set_ld_st_entry_from_region(), and ~Node_Table().

FILE* Node_Table::_node_table_fp [private]
 

Definition at line 106 of file src/node_table.h.

FILE* Node_Table::_node_table_fp [private]
 

Definition at line 106 of file include/node_table.h.

Referenced by Node_Table(), node_table_fp(), open_file(), open_file_with_value(), read_for_proc(), read_for_proc_with_value(), and set_node_table_fp().

char* Node_Table::_proc_name [private]
 

Definition at line 107 of file src/node_table.h.

char* Node_Table::_proc_name [private]
 

Definition at line 107 of file include/node_table.h.

Referenced by Node_Table(), print(), print_with_value(), proc_name(), and set_proc_name().

int Node_Table::_size [private]
 

Definition at line 110 of file src/node_table.h.

Referenced by add_entry(), add_num_of_entries(), build(), build_from_proc(), build_ld_st_from_proc(), calculate_ld_st_size(), calculate_size(), find(), find_by_mapping(), find_by_node_id(), Node_Table(), print(), print_with_value(), set_entry_from_region(), set_ld_st_entry_from_region(), set_size(), and size().

unsigned int Node_Table::_start_index [private]
 

Definition at line 108 of file src/node_table.h.

Referenced by add_entry(), build(), Node_Table(), open_file(), open_file_with_value(), read_for_proc_with_value(), set_entry_from_region(), set_ld_st_entry_from_region(), set_start_index(), and start_index().


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