|
LLVM 23.0.0git
|
GsymCreatorV2 emits GSYM V2 data with a GlobalData-based section layout. More...
#include "llvm/DebugInfo/GSYM/GsymCreatorV2.h"
Public Member Functions | |
| GsymCreatorV2 (bool Quiet=false) | |
| uint8_t | getStringOffsetSize () const override |
| Get the size in bytes needed for encoding string offsets. | |
| LLVM_ABI llvm::Error | encode (FileWriter &O) const override |
| For V2 file layout, see HeaderV2.h. | |
| Public Member Functions inherited from llvm::gsym::GsymCreator | |
| LLVM_ABI | GsymCreator (bool Quiet=false) |
| virtual | ~GsymCreator ()=default |
| LLVM_ABI llvm::Error | save (StringRef Path, llvm::endianness ByteOrder, std::optional< uint64_t > SegmentSize=std::nullopt) const |
| Save a GSYM file to a stand alone file. | |
| LLVM_ABI gsym_strp_t | insertString (StringRef S, bool Copy=true) |
| Insert a string into the GSYM string table. | |
| LLVM_ABI StringRef | getString (gsym_strp_t Offset) |
| Retrieve a string from the GSYM string table given its offset. | |
| LLVM_ABI uint32_t | insertFile (StringRef Path, sys::path::Style Style=sys::path::Style::native) |
| Insert a file into this GSYM creator. | |
| LLVM_ABI void | addFunctionInfo (FunctionInfo &&FI) |
| Add a function info to this GSYM creator. | |
| LLVM_ABI llvm::Error | loadCallSitesFromYAML (StringRef YAMLFile) |
| Load call site information from a YAML file. | |
| LLVM_ABI void | prepareMergedFunctions (OutputAggregator &Out) |
| Organize merged FunctionInfo's. | |
| LLVM_ABI llvm::Error | finalize (OutputAggregator &OS) |
| Finalize the data in the GSYM creator prior to saving the data out. | |
| void | setUUID (llvm::ArrayRef< uint8_t > UUIDBytes) |
| Set the UUID value. | |
| LLVM_ABI void | forEachFunctionInfo (std::function< bool(FunctionInfo &)> const &Callback) |
| Thread safe iteration over all function infos. | |
| LLVM_ABI void | forEachFunctionInfo (std::function< bool(const FunctionInfo &)> const &Callback) const |
| Thread safe const iteration over all function infos. | |
| LLVM_ABI size_t | getNumFunctionInfos () const |
| Get the current number of FunctionInfo objects contained in this object. | |
| void | SetValidTextRanges (AddressRanges &TextRanges) |
| Set valid .text address ranges that all functions must be contained in. | |
| const std::optional< AddressRanges > | GetValidTextRanges () const |
| Get the valid text ranges. | |
| LLVM_ABI bool | IsValidTextAddress (uint64_t Addr) const |
| Check if an address is a valid code address. | |
| void | setBaseAddress (uint64_t Addr) |
| Set the base address to use for the GSYM file. | |
| bool | isQuiet () const |
| Whether the transformation should be quiet, i.e. not output warnings. | |
| LLVM_ABI llvm::Expected< std::unique_ptr< GsymCreator > > | createSegment (uint64_t SegmentSize, size_t &FuncIdx) const |
| Create a segmented GSYM creator starting with function info index FuncIdx. | |
Additional Inherited Members | |
| Protected Member Functions inherited from llvm::gsym::GsymCreator | |
| std::optional< uint64_t > | getFirstFunctionAddress () const |
| Get the first function start address. | |
| std::optional< uint64_t > | getLastFunctionAddress () const |
| Get the last function address. | |
| std::optional< uint64_t > | getBaseAddress () const |
| Get the base address to use for this GSYM file. | |
| uint8_t | getAddressOffsetSize () const |
| Get the size of an address offset in the address offset table. | |
| uint64_t | getMaxAddressOffset () const |
| Get the maximum address offset for the current address offset size. | |
| uint64_t | copyFunctionInfo (const GsymCreator &SrcGC, size_t FuncInfoIdx) |
| Copy a FunctionInfo from the SrcGC GSYM creator into this creator. | |
| gsym_strp_t | copyString (const GsymCreator &SrcGC, gsym_strp_t StrOff) |
| Copy a string from SrcGC into this object. | |
| uint32_t | copyFile (const GsymCreator &SrcGC, uint32_t FileIdx) |
| Copy a file from SrcGC into this object. | |
| uint32_t | insertFileEntry (FileEntry FE) |
| Inserts a FileEntry into the file table. | |
| void | fixupInlineInfo (const GsymCreator &SrcGC, InlineInfo &II) |
| Fixup any string and file references by updating any file indexes and strings offsets in the InlineInfo parameter. | |
| llvm::Error | saveSegments (StringRef Path, llvm::endianness ByteOrder, uint64_t SegmentSize) const |
| Save this GSYM file into segments that are roughly SegmentSize in size. | |
| void | setIsSegment () |
| Let this creator know that this is a segment of another GsymCreator. | |
| llvm::Error | validateForEncoding (std::optional< uint64_t > &BaseAddr) const |
| Validate that the creator is ready for encoding. | |
| void | encodeAddrOffsets (FileWriter &O, uint8_t AddrOffSize, uint64_t BaseAddr) const |
| Write the address offsets table to the output stream. | |
| llvm::Error | encodeFileTable (FileWriter &O) const |
| Write the file table to the output stream. | |
| Protected Attributes inherited from llvm::gsym::GsymCreator | |
| std::mutex | Mutex |
| std::vector< FunctionInfo > | Funcs |
| StringTableBuilder | StrTab |
| StringSet | StringStorage |
| DenseMap< llvm::gsym::FileEntry, uint32_t > | FileEntryToIndex |
| DenseMap< uint64_t, CachedHashStringRef > | StringOffsetMap |
| std::vector< llvm::gsym::FileEntry > | Files |
| std::vector< uint8_t > | UUID |
| std::optional< AddressRanges > | ValidTextRanges |
| std::optional< uint64_t > | BaseAddress |
| bool | IsSegment = false |
| bool | Finalized = false |
| bool | Quiet |
GsymCreatorV2 emits GSYM V2 data with a GlobalData-based section layout.
Definition at line 19 of file GsymCreatorV2.h.
|
inline |
Definition at line 26 of file GsymCreatorV2.h.
References llvm::gsym::GsymCreator::GsymCreator(), and llvm::gsym::GsymCreator::Quiet.
|
overridevirtual |
For V2 file layout, see HeaderV2.h.
Implements llvm::gsym::GsymCreator.
Definition at line 36 of file GsymCreatorV2.cpp.
References llvm::gsym::AddrInfoOffsets, llvm::gsym::AddrOffsets, llvm::gsym::HeaderV2::AddrOffSize, llvm::alignTo(), assert(), llvm::gsym::HeaderV2::BaseAddress, llvm::SmallVectorTemplateCommon< T, typename >::data(), llvm::gsym::Default, llvm::gsym::GlobalData::encode(), llvm::gsym::HeaderV2::encode(), llvm::gsym::GsymCreator::encodeAddrOffsets(), llvm::gsym::GsymCreator::encodeFileTable(), llvm::gsym::EndOfList, llvm::gsym::GsymCreator::Files, llvm::gsym::FileTable, llvm::gsym::GsymCreator::Funcs, llvm::gsym::FunctionInfo, llvm::gsym::GsymCreator::getAddressOffsetSize(), llvm::gsym::FileEntry::getEncodedSize(), llvm::gsym::HeaderV2::getEncodedSize(), getStringOffsetSize(), llvm::gsym::HeaderV2::getVersion(), llvm::gsym::GSYM_MAGIC, llvm::gsym::HeaderV2::Magic, llvm::gsym::GsymCreator::Mutex, llvm::gsym::HeaderV2::NumAddresses, llvm::gsym::FileWriter::setStringOffsetSize(), llvm::SmallVectorTemplateCommon< T, typename >::size(), llvm::gsym::StringTable, llvm::gsym::GsymCreator::StrTab, llvm::gsym::HeaderV2::StrTableEncoding, llvm::Error::success(), llvm::gsym::UUID, llvm::gsym::GsymCreator::UUID, llvm::gsym::GsymCreator::validateForEncoding(), and llvm::gsym::HeaderV2::Version.
|
inlineoverridevirtual |
Get the size in bytes needed for encoding string offsets.
Implements llvm::gsym::GsymCreator.
Definition at line 28 of file GsymCreatorV2.h.
References llvm::gsym::HeaderV2::getStringOffsetSize().
Referenced by encode().