LLVM 19.0.0git
Classes | Enumerations | Functions
llvm::xray Namespace Reference

Classes

class  BlockIndexer
 
class  BlockPrinter
 
class  BlockVerifier
 
class  BufferExtents
 
class  CallArgRecord
 
class  CustomEventRecord
 
class  CustomEventRecordV5
 
class  EndBufferRecord
 
class  FDRTraceWriter
 The FDRTraceWriter allows us to hand-craft an XRay Flight Data Recorder (FDR) mode log file. More...
 
class  FileBasedRecordProducer
 
class  FunctionRecord
 
class  Graph
 A Graph object represents a Directed Graph and is used in XRay to compute and store function call graphs and associated statistical information. More...
 
class  InstrumentationMap
 The InstrumentationMap represents the computed function id's and indicated function addresses from an object file (or a YAML file). More...
 
class  LogBuilder
 The LogBuilder class allows for creating ad-hoc collections of records through the add<...>(...) function. More...
 
class  LogBuilderConsumer
 
class  MetadataRecord
 
class  NewBufferRecord
 
class  NewCPUIDRecord
 
class  PIDRecord
 
class  PipelineConsumer
 
class  Profile
 Profile instances are thread-compatible. More...
 
class  Record
 
class  RecordConsumer
 
class  RecordInitializer
 
class  RecordPrinter
 
class  RecordProducer
 
class  RecordVisitor
 
struct  SledEntry
 Represents an XRay instrumentation sled entry from an object file. More...
 
class  Trace
 A Trace object represents the records that have been loaded from XRay log files generated by instrumented binaries. More...
 
class  TraceExpander
 
class  TSCWrapRecord
 
class  TypedEventRecord
 
class  WallclockRecord
 
struct  XRayFileHeader
 XRay traces all have a header providing some top-matter information useful to help tools determine how to interpret the information available in the trace. More...
 
struct  XRayRecord
 An XRayRecord is the denormalized view of data associated in a trace. More...
 
struct  YAMLXRayFileHeader
 
struct  YAMLXRayRecord
 
struct  YAMLXRaySledEntry
 
struct  YAMLXRayTrace
 

Enumerations

enum class  RecordTypes {
  ENTER , EXIT , TAIL_EXIT , ENTER_ARG ,
  CUSTOM_EVENT , TYPED_EVENT
}
 Determines the supported types of records that could be seen in XRay traces. More...
 

Functions

Expected< XRayFileHeaderreadBinaryFormatHeader (DataExtractor &HeaderExtractor, uint64_t &OffsetPtr)
 Convenience function for loading the file header given a data extractor at a specified offset.
 
Expected< InstrumentationMaploadInstrumentationMap (StringRef Filename)
 Loads the instrumentation map from |Filename|.
 
Expected< ProfileloadProfile (StringRef Filename)
 This function will attempt to load an XRay Profiling Mode profile from the provided |Filename|.
 
Profile mergeProfilesByThread (const Profile &L, const Profile &R)
 This algorithm will merge two Profile instances into a single Profile instance, aggregating blocks by Thread ID.
 
Profile mergeProfilesByStack (const Profile &L, const Profile &R)
 This algorithm will merge two Profile instances into a single Profile instance, aggregating blocks by function call stack.
 
Expected< ProfileprofileFromTrace (const Trace &T)
 This function takes a Trace and creates a Profile instance from it.
 
Expected< TraceloadTraceFile (StringRef Filename, bool Sort=false)
 This function will attempt to load XRay trace records from the provided |Filename|.
 
Expected< TraceloadTrace (const DataExtractor &Extractor, bool Sort=false)
 This function will attempt to load XRay trace records from the provided DataExtractor.
 

Enumeration Type Documentation

◆ RecordTypes

enum class llvm::xray::RecordTypes
strong

Determines the supported types of records that could be seen in XRay traces.

This may or may not correspond to actual record types in the raw trace (as the loader implementation may synthesize this information in the process of of loading).

Enumerator
ENTER 
EXIT 
TAIL_EXIT 
ENTER_ARG 
CUSTOM_EVENT 
TYPED_EVENT 

Definition at line 57 of file XRayRecord.h.

Function Documentation

◆ loadInstrumentationMap()

Expected< InstrumentationMap > llvm::xray::loadInstrumentationMap ( StringRef  Filename)

Loads the instrumentation map from |Filename|.

This auto-deduces the type of the instrumentation map.

Definition at line 255 of file InstrumentationMap.cpp.

References llvm::consumeError(), llvm::object::ObjectFile::createObjectFile(), llvm::sys::fs::file_size(), loadObj(), loadYAML(), llvm::sys::fs::openNativeFileForRead(), and llvm::Expected< T >::takeError().

◆ loadProfile()

Expected< Profile > llvm::xray::loadProfile ( StringRef  Filename)

This function will attempt to load an XRay Profiling Mode profile from the provided |Filename|.

For any errors encountered in the loading of the profile data from |Filename|, this function will return an Error condition appropriately.

Definition at line 262 of file Profile.cpp.

References llvm::sys::fs::closeFile(), llvm::sys::fs::mapped_file_region::data(), llvm::Data, E, llvm::sys::fs::file_size(), llvm::Offset, llvm::sys::fs::openNativeFileForRead(), P, llvm::sys::fs::mapped_file_region::readonly, llvm::sys::fs::mapped_file_region::size(), and llvm::Expected< T >::takeError().

◆ loadTrace()

Expected< Trace > llvm::xray::loadTrace ( const DataExtractor Extractor,
bool  Sort = false 
)

This function will attempt to load XRay trace records from the provided DataExtractor.

Definition at line 420 of file Trace.cpp.

References llvm::DataExtractor::getData(), llvm::DataExtractor::getU16(), llvm::DataExtractor::isLittleEndian(), and llvm::stable_sort().

Referenced by loadTraceFile().

◆ loadTraceFile()

Expected< Trace > llvm::xray::loadTraceFile ( StringRef  Filename,
bool  Sort = false 
)

◆ mergeProfilesByStack()

Profile llvm::xray::mergeProfilesByStack ( const Profile L,
const Profile R 
)

This algorithm will merge two Profile instances into a single Profile instance, aggregating blocks by function call stack.

Definition at line 232 of file Profile.cpp.

References llvm::xray::Profile::addBlock(), llvm::Block, llvm::cantFail(), llvm::copy(), llvm::Data, llvm::xray::Profile::internPath(), P, and llvm::xray::Profile::Block::PathData.

◆ mergeProfilesByThread()

Profile llvm::xray::mergeProfilesByThread ( const Profile L,
const Profile R 
)

◆ profileFromTrace()

Expected< Profile > llvm::xray::profileFromTrace ( const Trace T)

This function takes a Trace and creates a Profile instance from it.

Definition at line 326 of file Profile.cpp.

References llvm::AbsoluteDifference(), E, P, profileFromTrace(), llvm::reverse(), and llvm::transform().

Referenced by profileFromTrace().

◆ readBinaryFormatHeader()

Expected< XRayFileHeader > llvm::xray::readBinaryFormatHeader ( DataExtractor HeaderExtractor,
uint64_t OffsetPtr 
)