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

CacheSimulator Class Reference

#include <CacheSimulator.h>

Inheritance diagram for CacheSimulator:

CommonMethods XCoffFileGen List of all members.

Public Member Functions

 CacheSimulator (XCoffFile *xcoff, char *extension, uint32_t phaseNo, char *blockFile, bool countBB=false, bool loopIncl=false)
virtual ~CacheSimulator ()
void selectInstrumentationPoints (char *blockFile)
uint32_t maxByteCountPerInst ()
uint32_t byteCountForInst (uint32_t instPointIdx, uint64_t instStubAddress, TextSection *textSect)
uint32_t generateCodeForInst (uint32_t instPointIdx, uint64_t instStubAddress, TextSection *textSect, BaseGen *gen, uint32_t genBufferOffset)
uint32_t bytesPerBufferEntry ()
uint32_t howManyBufferEntry ()
bool filterBlockForInst (BasicBlock *bb)
char * getSharedLibFuncName (uint32_t i)
char * getGenClassName ()
uint32_t spaceForBlockInfo ()
void getSharedLibraryPathAndObj (char **path, char **name, char **obj)
void initializeReservedData (DataSection *dataSect, BaseGen *gen)
int32_t getExtraBlockInfoAddress (uint32_t idx)
void setLoopInclusion (bool flg)
char * additionalInfoToPrint ()

Protected Attributes

bool enableBBCounting
bool enableLoopInclusion
char * additionalInfo

Constructor & Destructor Documentation

CacheSimulator::CacheSimulator XCoffFile xcoff,
char *  extension,
uint32_t  phaseNo,
char *  blockFile,
bool  countBB = false,
bool  loopIncl = false
 

Definition at line 12 of file CacheSimulator.C.

virtual CacheSimulator::~CacheSimulator  )  [inline, virtual]
 

Definition at line 14 of file CacheSimulator.h.

References additionalInfo.


Member Function Documentation

char* CacheSimulator::additionalInfoToPrint  )  [inline, virtual]
 

Reimplemented from CommonMethods.

Definition at line 59 of file CacheSimulator.h.

References additionalInfo.

uint32_t CacheSimulator::byteCountForInst uint32_t  instPointIdx,
uint64_t  instStubAddress,
TextSection textSect
[virtual]
 

Reimplemented from XCoffFileGen.

Definition at line 171 of file CacheSimulator.C.

References ASSERT, enableBBCounting, MemoryOperation::getAddressOperand1(), MemoryOperation::getAddressOperand2(), XCoffFileGen::getDataBufferEntryCount(), CommonMethods::getDataOffsetForInst(), Instruction::getDFormTgt(), getExtraBlockInfoAddress(), Operand::getIconst(), MemoryOperation::getInsnAddr(), MemoryOperation::getInstruction(), BasicBlock::getNumOfMemoryOps(), Operand::getRegister(), RawSection::inRange(), XCoffFile::is64Bit(), Operand::isGPRegister(), Instruction::isInJumpInsnRange(), Instruction::isInLoadOffsetInsnRange(), Operand::isInteger(), Instruction::isMemoryDForm(), Instruction::isMemoryDFormFloat(), Instruction::isMemoryDsForm(), PRINT_INFOR, REG_TOC, and SECOND_HALFWORD.

uint32_t CacheSimulator::bytesPerBufferEntry  )  [inline, virtual]
 

Reimplemented from CommonMethods.

Definition at line 22 of file CacheSimulator.h.

Referenced by generateCodeForInst().

bool CacheSimulator::filterBlockForInst BasicBlock bb  )  [virtual]
 

Reimplemented from CommonMethods.

Definition at line 557 of file CacheSimulator.C.

References BasicBlock::getNumOfMemoryOps(), BasicBlock::isJumpTable(), and BasicBlock::isTrace().

Referenced by selectInstrumentationPoints().

uint32_t CacheSimulator::generateCodeForInst uint32_t  instPointIdx,
uint64_t  instStubAddress,
TextSection textSect,
BaseGen gen,
uint32_t  genBufferOffset
[virtual]
 

Reimplemented from XCoffFileGen.

Definition at line 293 of file CacheSimulator.C.

References ASSERT, Instruction::bits(), bytesPerBufferEntry(), COMPARE_LT, COMPARE_TRUE, DEBUG, enableBBCounting, Instruction::generateAdd(), Instruction::generateAddImm(), Instruction::generateCallToImmediate(), Instruction::generateCompare(), Instruction::generateCondBranch(), Instruction::generateIncrement(), Instruction::generateJumpInsn(), Instruction::generateLoad32BitHigh(), Instruction::generateLoad32BitLow(), Instruction::generateLoadDouble(), Instruction::generateLoadDoubleIndx(), Instruction::generateLoadImmediate(), Instruction::generateLoadWord(), Instruction::generateLoadWordIndx(), Instruction::generateStoreDouble(), Instruction::generateStoreDoubleIndx(), Instruction::generateStoreWord(), Instruction::generateStoreWordIndx(), MemoryOperation::getAddressOperand1(), MemoryOperation::getAddressOperand2(), XCoffFileGen::getDataBufferEntryCount(), CommonMethods::getDataOffsetForInst(), Instruction::getDFormTgt(), getExtraBlockInfoAddress(), CommonMethods::getGPRSaveOffset(), Operand::getIconst(), MemoryOperation::getInsnAddr(), MemoryOperation::getInstruction(), BasicBlock::getNumOfMemoryOps(), BaseGen::getParsedBase(), Operand::getRegister(), RawSection::getSectHeader(), RawSection::inRange(), XCoffFile::is64Bit(), Operand::isGPRegister(), Instruction::isInJumpInsnRange(), Instruction::isInLoadOffsetInsnRange(), Operand::isInteger(), Instruction::isMemoryDForm(), Instruction::isMemoryDFormFloat(), Instruction::isMemoryDsForm(), LAST_VOLATILE_REG, maxByteCountPerInst(), Instruction::multiplyImmediate(), MemoryOperation::print(), PRINT_DEBUG, PRINT_INFOR, REG_TOC, CommonMethods::restCRRegister(), CommonMethods::restLNKRegister(), CommonMethods::saveCRRegister(), CommonMethods::saveLNKRegister(), CommonMethods::updateTOCRegister(), BaseGen::writeInstructions(), and BaseGen::writeWord().

int32_t CacheSimulator::getExtraBlockInfoAddress uint32_t  idx  )  [inline]
 

Definition at line 48 of file CacheSimulator.h.

References enableBBCounting.

Referenced by byteCountForInst(), and generateCodeForInst().

char* CacheSimulator::getGenClassName  )  [inline, virtual]
 

Reimplemented from XCoffFileGen.

Definition at line 35 of file CacheSimulator.h.

References enableBBCounting.

char* CacheSimulator::getSharedLibFuncName uint32_t  i  )  [inline, virtual]
 

Reimplemented from XCoffFileGen.

Definition at line 26 of file CacheSimulator.h.

References ASSERT, and CommonMethods::getNumOfSharedLibFuncs().

void CacheSimulator::getSharedLibraryPathAndObj char **  path,
char **  name,
char **  obj
[virtual]
 

Reimplemented from XCoffFileGen.

Definition at line 567 of file CacheSimulator.C.

References ASSERT, enableBBCounting, XCoffFileGen::getPathToInstLib(), and XCoffFile::is64Bit().

uint32_t CacheSimulator::howManyBufferEntry  )  [inline, virtual]
 

Reimplemented from CommonMethods.

Definition at line 24 of file CacheSimulator.h.

References BUFFER_SIZE.

void CacheSimulator::initializeReservedData DataSection dataSect,
BaseGen gen
[virtual]
 

Reimplemented from XCoffFileGen.

Definition at line 586 of file CacheSimulator.C.

References enableBBCounting, BasicBlock::getNumOfMemoryOps(), RawSection::getSectHeader(), BaseGen::writeHalfWord(), and BaseGen::writeString().

uint32_t CacheSimulator::maxByteCountPerInst  )  [inline, virtual]
 

Reimplemented from XCoffFileGen.

Definition at line 18 of file CacheSimulator.h.

Referenced by generateCodeForInst().

void CacheSimulator::selectInstrumentationPoints char *  blockFile  )  [virtual]
 

Reimplemented from XCoffFileGen.

Definition at line 33 of file CacheSimulator.C.

References __MAX_STRING_SIZE, additionalInfo, allSpace(), ASSERT, DEBUG, enableLoopInclusion, filterBlockForInst(), XCoffFile::findBasicBlock(), XCoffFile::findLoops(), CommonMethods::findTerminationBlock(), Loop::getAllBlocks(), BasicBlock::getFlowGraph(), BasicBlock::getHashCode(), BasicBlock::getIndex(), FlowGraph::getLoop(), Loop::getNumberOfBlocks(), FlowGraph::getNumberOfLoops(), BasicBlock::getNumOfMemoryOps(), HashCode::getValue(), SimpleHash< T >::insert(), HashCode::isBlock(), Loop::isBlockIn(), Instruction::isInLoadOffsetInsnRange(), SimpleHash< T >::print(), PRINT_ERROR, PRINT_INFOR, SimpleHash< T >::size(), and SimpleHash< T >::values().

void CacheSimulator::setLoopInclusion bool  flg  )  [inline]
 

Definition at line 58 of file CacheSimulator.h.

References enableLoopInclusion.

uint32_t CacheSimulator::spaceForBlockInfo  )  [inline, virtual]
 

Reimplemented from CommonMethods.

Definition at line 36 of file CacheSimulator.h.

References enableBBCounting.


Member Data Documentation

char* CacheSimulator::additionalInfo [protected]
 

Definition at line 10 of file CacheSimulator.h.

Referenced by additionalInfoToPrint(), selectInstrumentationPoints(), and ~CacheSimulator().

bool CacheSimulator::enableBBCounting [protected]
 

Definition at line 8 of file CacheSimulator.h.

Referenced by byteCountForInst(), generateCodeForInst(), getExtraBlockInfoAddress(), getGenClassName(), getSharedLibraryPathAndObj(), initializeReservedData(), and spaceForBlockInfo().

bool CacheSimulator::enableLoopInclusion [protected]
 

Definition at line 9 of file CacheSimulator.h.

Referenced by selectInstrumentationPoints(), and setLoopInclusion().


The documentation for this class was generated from the following files:
Generated on Mon Jan 28 11:08:37 2008 for PMaCInstrumentor by doxygen 1.3.5