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

BasicBlockTracer Class Reference

#include <BasicBlockTracer.h>

Inheritance diagram for BasicBlockTracer:

CommonMethods XCoffFileGen List of all members.

Public Member Functions

 BasicBlockTracer (XCoffFile *xcoff, char *extension, uint32_t phaseNo)
virtual ~BasicBlockTracer ()
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)
bool filterBlockForInst (BasicBlock *bb)
uint32_t howManyBufferEntry ()
char * getSharedLibFuncName (uint32_t i)
char * getGenClassName ()
void reserveDataForInstrumentation ()
uint32_t generateSharedLibFuncWrapper (uint32_t libFuncIdx, uint64_t funcCallAddr, uint32_t genBufferOffset, BaseGen *gen)
uint32_t getBlockPointerOffset (uint32_t idx)
void initializeReservedData (DataSection *dataSect, BaseGen *gen)
uint32_t getBlockPointerOffsetSaveOffset ()
void getSharedLibraryPathAndObj (char **path, char **name, char **obj)

Protected Attributes

uint32_t * allBlockInfo
uint64_t blockPointerOffset

Constructor & Destructor Documentation

BasicBlockTracer::BasicBlockTracer XCoffFile xcoff,
char *  extension,
uint32_t  phaseNo
 

Definition at line 218 of file BasicBlockTracer.C.

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

Definition at line 12 of file BasicBlockTracer.h.


Member Function Documentation

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

Reimplemented from XCoffFileGen.

Definition at line 263 of file BasicBlockTracer.C.

References ASSERT, BasicBlock::findFirstInstPoint(), FIRST_HALFWORD, BasicBlock::getHashCode(), HashCode::getValue(), RawSection::inRange(), Instruction::isInJumpInsnRange(), PRINT_DEBUG, PRINT_INFOR, and SECOND_HALFWORD.

bool BasicBlockTracer::filterBlockForInst BasicBlock bb  )  [virtual]
 

Reimplemented from CommonMethods.

Definition at line 8 of file BasicBlockTracer.C.

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

Referenced by selectInstrumentationPoints().

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

Reimplemented from XCoffFileGen.

Definition at line 314 of file BasicBlockTracer.C.

References ASSERT, Instruction::bits(), blockPointerOffset, BasicBlock::findFirstInstPoint(), CommonMethods::generateFuncCallFull(), Instruction::generateJumpInsn(), Instruction::generateLoad32BitHigh(), Instruction::generateLoad32BitLow(), Instruction::generateLoadDouble(), Instruction::generateStoreDouble(), getBlockPointerOffset(), getBlockPointerOffsetSaveOffset(), CommonMethods::getGPRSaveOffset(), BasicBlock::getHashCode(), BasicBlock::getInstructionIterator(), BaseGen::getParsedBase(), RawSection::getSectHeader(), HashCode::getValue(), RawSection::inRange(), Instruction::isInJumpInsnRange(), LAST_VOLATILE_REG, maxByteCountPerInst(), PRINT_DEBUG, PRINT_INFOR, RawSection::readInstruction(), REG_TOC, AddressIterator::skipTo(), CommonMethods::updateTOCRegister(), BaseGen::writeInstructions(), and BaseGen::writeWord().

uint32_t BasicBlockTracer::generateSharedLibFuncWrapper uint32_t  libFuncIdx,
uint64_t  funcCallAddr,
uint32_t  genBufferOffset,
BaseGen gen
[virtual]
 

Reimplemented from CommonMethods.

Definition at line 43 of file BasicBlockTracer.C.

References ASSERT, CommonMethods::byteCountForSharedLibFuncWrappers(), Instruction::generateAdd(), Instruction::generateCallToCTR(), Instruction::generateLoadDouble(), Instruction::generateLoadDoubleFloat(), Instruction::generateLoadWord(), Instruction::generateMoveFromSPR(), Instruction::generateMoveReg(), Instruction::generateMoveToSPR(), Instruction::generateReturnToLnk(), Instruction::generateSPIncrementDouble(), Instruction::generateSPIncrementWord(), Instruction::generateStoreDouble(), Instruction::generateStoreDoubleFloat(), getBlockPointerOffsetSaveOffset(), CommonMethods::getFPRSaveOffset(), CommonMethods::getGPRSaveOffset(), XCoffFile::is64Bit(), LAST_VOLATILE_REG, PRINT_DEBUG, REG_CTR, REG_LNK, REG_TOC, CommonMethods::restCTRRegister(), CommonMethods::restEXRRegister(), CommonMethods::restFPSCRRegister(), SAFE_FRAME_LOC, CommonMethods::saveCTRRegister(), CommonMethods::saveEXRRegister(), CommonMethods::saveFPSCRRegister(), CommonMethods::updateTOCRegister(), and BaseGen::writeInstructions().

uint32_t BasicBlockTracer::getBlockPointerOffset uint32_t  idx  )  [inline]
 

Definition at line 30 of file BasicBlockTracer.h.

References allBlockInfo.

Referenced by generateCodeForInst().

uint32_t BasicBlockTracer::getBlockPointerOffsetSaveOffset  )  [inline]
 

Definition at line 33 of file BasicBlockTracer.h.

References blockPointerOffset.

Referenced by generateCodeForInst(), and generateSharedLibFuncWrapper().

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

Reimplemented from XCoffFileGen.

Definition at line 26 of file BasicBlockTracer.h.

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

Reimplemented from XCoffFileGen.

Definition at line 22 of file BasicBlockTracer.h.

References ASSERT, and CommonMethods::getNumOfSharedLibFuncs().

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

Reimplemented from XCoffFileGen.

Definition at line 397 of file BasicBlockTracer.C.

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

uint32_t BasicBlockTracer::howManyBufferEntry  )  [inline, virtual]
 

Reimplemented from CommonMethods.

Definition at line 21 of file BasicBlockTracer.h.

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

Reimplemented from XCoffFileGen.

Definition at line 18 of file BasicBlockTracer.C.

References allBlockInfo, BasicBlock::getBaseAddress(), LineInfoFinder::getFunctionName(), LineInfoFinder::getLineNumberInFunction(), XCoffFile::getRawSection(), RawSection::getSectHeader(), XCoffFile::getTextSectionIndex(), PRINT_DEBUG, BaseGen::writeString(), and BaseGen::writeWord().

uint32_t BasicBlockTracer::maxByteCountPerInst  )  [inline, virtual]
 

Reimplemented from XCoffFileGen.

Definition at line 16 of file BasicBlockTracer.h.

Referenced by generateCodeForInst().

void BasicBlockTracer::reserveDataForInstrumentation  )  [virtual]
 

Reimplemented from CommonMethods.

Definition at line 132 of file BasicBlockTracer.C.

References allBlockInfo, blockPointerOffset, BasicBlock::getBaseAddress(), XCoffFile::getDataSectionSize(), XCoffFile::getDataSectionVAddr(), LineInfoFinder::getFunctionName(), LineInfoFinder::getLineNumberInFunction(), CommonMethods::getNumOfSharedLibFuncs(), XCoffFile::getRawSection(), XCoffFile::getTextSectionIndex(), XCoffFile::getTOCAddress(), XCoffFile::is64Bit(), Instruction::isInLoadOffsetInsnRange(), nextAlignAddressDouble(), nextAlignAddressWord(), NUM_OF_FPR_REGS, and NUM_OF_GPR_REGS.

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

Reimplemented from XCoffFileGen.

Definition at line 223 of file BasicBlockTracer.C.

References ASSERT, filterBlockForInst(), CommonMethods::findTerminationBlock(), XCoffFile::getAllBlocks(), BasicBlock::getHashCode(), XCoffFile::getNumberOfBlocks(), HashCode::getValue(), PRINT_DEBUG, PRINT_ERROR, and PRINT_INFOR.


Member Data Documentation

uint32_t* BasicBlockTracer::allBlockInfo [protected]
 

Definition at line 8 of file BasicBlockTracer.h.

Referenced by getBlockPointerOffset(), initializeReservedData(), and reserveDataForInstrumentation().

uint64_t BasicBlockTracer::blockPointerOffset [protected]
 

Definition at line 9 of file BasicBlockTracer.h.

Referenced by generateCodeForInst(), getBlockPointerOffsetSaveOffset(), and reserveDataForInstrumentation().


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