#include "bolt/Profile/BoltAddressTranslation.h"
#include "bolt/Core/BinaryFunction.h"
#include "llvm/ADT/APInt.h"
#include "llvm/Support/Errc.h"
#include "llvm/Support/Error.h"
#include "llvm/Support/LEB128.h"
#define DEBUG_TYPE …
namespace llvm {
namespace bolt {
const char *BoltAddressTranslation::SECTION_NAME = …;
void BoltAddressTranslation::writeEntriesForBB(
MapTy &Map, const BinaryBasicBlock &BB, uint64_t FuncInputAddress,
uint64_t FuncOutputAddress) const { … }
void BoltAddressTranslation::write(const BinaryContext &BC, raw_ostream &OS) { … }
APInt BoltAddressTranslation::calculateBranchEntriesBitMask(
MapTy &Map, size_t EqualElems) const { … }
size_t BoltAddressTranslation::getNumEqualOffsets(const MapTy &Map,
uint32_t Skew) const { … }
template <bool Cold>
void BoltAddressTranslation::writeMaps(std::map<uint64_t, MapTy> &Maps,
uint64_t &PrevAddress, raw_ostream &OS) { … }
std::error_code BoltAddressTranslation::parse(raw_ostream &OS, StringRef Buf) { … }
template <bool Cold>
void BoltAddressTranslation::parseMaps(std::vector<uint64_t> &HotFuncs,
uint64_t &PrevAddress, DataExtractor &DE,
uint64_t &Offset, Error &Err) { … }
void BoltAddressTranslation::dump(raw_ostream &OS) const { … }
uint64_t BoltAddressTranslation::translate(uint64_t FuncAddress,
uint64_t Offset,
bool IsBranchSrc) const { … }
std::optional<BoltAddressTranslation::FallthroughListTy>
BoltAddressTranslation::getFallthroughsInTrace(uint64_t FuncAddress,
uint64_t From,
uint64_t To) const { … }
bool BoltAddressTranslation::enabledFor(
llvm::object::ELFObjectFileBase *InputFile) const { … }
void BoltAddressTranslation::saveMetadata(BinaryContext &BC) { … }
unsigned
BoltAddressTranslation::getSecondaryEntryPointId(uint64_t Address,
uint32_t Offset) const { … }
std::pair<const BinaryFunction *, unsigned>
BoltAddressTranslation::translateSymbol(const BinaryContext &BC,
const MCSymbol &Symbol,
uint32_t Offset) const { … }
}
}