DCFG
Dynamic Control Flow Graph
 All Classes Functions
Public Member Functions | List of all members
dcfg_api::DCFG_BASIC_BLOCK Class Referenceabstract

Interface to information about a basic block. More...

#include <dcfg_api.H>

Inheritance diagram for dcfg_api::DCFG_BASIC_BLOCK:
dcfg_api::DCFG_GRAPH_BASE

Public Member Functions

virtual DCFG_ID get_basic_block_id () const =0
 Get basic-block ID number.
 
virtual DCFG_ID get_process_id () const =0
 Get the process ID.
 
virtual DCFG_ID get_image_id () const =0
 Get the image ID.
 
virtual DCFG_ID get_routine_id () const =0
 Get routine ID.
 
virtual DCFG_ID get_inner_loop_id () const =0
 Get innermost loop ID.
 
virtual UINT64 get_first_instr_addr () const =0
 Get starting or base address.
 
virtual UINT64 get_last_instr_addr () const =0
 Get the address of the last instruction.
 
virtual UINT32 get_size () const =0
 Get size.
 
virtual UINT32 get_num_instrs () const =0
 Get static number of instructions in the block.
 
virtual const std::string * get_symbol_name () const =0
 Get symbol name of this block.
 
virtual UINT32 get_symbol_offset () const =0
 Get symbol offset of this block.
 
virtual const std::string * get_source_filename () const =0
 Get name of source file for this block.
 
virtual UINT32 get_source_line_number () const =0
 Get line number in source file this block.
 
virtual UINT64 get_exec_count () const =0
 Get dynamic execution count.
 
virtual UINT64 get_exec_count_for_thread (UINT32 thread_id) const =0
 Get dynamic execution count.
 
- Public Member Functions inherited from dcfg_api::DCFG_GRAPH_BASE
virtual UINT32 get_basic_block_ids (DCFG_ID_CONTAINER &node_ids) const =0
 Get IDs of all basic blocks in the structure.
 
virtual UINT32 get_internal_edge_ids (DCFG_ID_CONTAINER &edge_ids) const =0
 Get list of internal edge IDs.
 
virtual UINT32 get_inbound_edge_ids (DCFG_ID_CONTAINER &edge_ids) const =0
 Get list of in-bound edge IDs.
 
virtual UINT32 get_outbound_edge_ids (DCFG_ID_CONTAINER &edge_ids) const =0
 Get list of out-bound edge IDs.
 
virtual UINT64 get_instr_count () const =0
 Get the total dynamic instruction count.
 
virtual UINT64 get_instr_count_for_thread (UINT32 thread_id) const =0
 Get per-thread dynamic instruction count.
 

Detailed Description

Interface to information about a basic block.

Member Function Documentation

virtual DCFG_ID dcfg_api::DCFG_BASIC_BLOCK::get_basic_block_id ( ) const
pure virtual

Get basic-block ID number.

Basic-block ID numbers are unique within a process.

Returns
ID number of this basic block.
virtual UINT64 dcfg_api::DCFG_BASIC_BLOCK::get_exec_count ( ) const
pure virtual

Get dynamic execution count.

Returns
Number of times the block was executed, summed across all threads.
virtual UINT64 dcfg_api::DCFG_BASIC_BLOCK::get_exec_count_for_thread ( UINT32  thread_id) const
pure virtual

Get dynamic execution count.

Returns
Number of times the block was executed in given thread.
Parameters
[in]thread_idThread number. Typically, threads are consecutively numbered from zero to DCFG_PROCESS::get_highest_thread_id().
virtual UINT64 dcfg_api::DCFG_BASIC_BLOCK::get_first_instr_addr ( ) const
pure virtual

Get starting or base address.

Returns
Address of first instruction in this block.
virtual DCFG_ID dcfg_api::DCFG_BASIC_BLOCK::get_image_id ( ) const
pure virtual

Get the image ID.

Returns
Image ID of this block.
virtual DCFG_ID dcfg_api::DCFG_BASIC_BLOCK::get_inner_loop_id ( ) const
pure virtual

Get innermost loop ID.

To find all loops containing this block, get the innermost loop and then follow the parent loop IDs until there are no parents.

Returns
ID number of innermost loop containing this block or zero (0) if none.
virtual UINT64 dcfg_api::DCFG_BASIC_BLOCK::get_last_instr_addr ( ) const
pure virtual

Get the address of the last instruction.

This is not the address of the last byte in the block unless the last instruction is exactly one byte long. The address of the last byte is DCFG_BASIC_BLOCK::get_first_instr_addr() + DCFG_BASIC_BLOCK::get_size() - 1.

Returns
Address of last instruction in this block.
virtual UINT32 dcfg_api::DCFG_BASIC_BLOCK::get_num_instrs ( ) const
pure virtual

Get static number of instructions in the block.

To get the dynamic count of instructions executed, use DCFG_GRAPH_BASE::get_instr_count() or DCFG_GRAPH_BASE::get_instr_count_for_thread().

Returns
Static number of instructions in this block.
virtual DCFG_ID dcfg_api::DCFG_BASIC_BLOCK::get_process_id ( ) const
pure virtual

Get the process ID.

Returns
Process ID of this block.
virtual DCFG_ID dcfg_api::DCFG_BASIC_BLOCK::get_routine_id ( ) const
pure virtual

Get routine ID.

Returns
routine ID number of this block or zero (0) if none.
virtual UINT32 dcfg_api::DCFG_BASIC_BLOCK::get_size ( ) const
pure virtual

Get size.

Returns
Size of this block in bytes.
virtual const std::string* dcfg_api::DCFG_BASIC_BLOCK::get_source_filename ( ) const
pure virtual

Get name of source file for this block.

Returns
Pointer to name of the source filename at the base address of this block if it exists, NULL otherwise.
virtual UINT32 dcfg_api::DCFG_BASIC_BLOCK::get_source_line_number ( ) const
pure virtual

Get line number in source file this block.

Returns
Line number at the base address of this block if it exists, zero (0) otherwise.
virtual const std::string* dcfg_api::DCFG_BASIC_BLOCK::get_symbol_name ( ) const
pure virtual

Get symbol name of this block.

Returns
Pointer to name of the symbol at the base address of this block if one exists, NULL otherwise.
virtual UINT32 dcfg_api::DCFG_BASIC_BLOCK::get_symbol_offset ( ) const
pure virtual

Get symbol offset of this block.

Returns
Difference between base address of the symbol returned in DCFG_BASIC_BLOCK::get_symbol_name() and the base address of this block or zero (0) if no symbol exits.

The documentation for this class was generated from the following file: