LLVM  9.0.0svn
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  RecordTypes {
  RecordTypes::ENTER, RecordTypes::EXIT, RecordTypes::TAIL_EXIT, RecordTypes::ENTER_ARG,
  RecordTypes::CUSTOM_EVENT, RecordTypes::TYPED_EVENT
}
 Determines the supported types of records that could be seen in XRay traces. More...
 

Functions

Expected< XRayFileHeaderreadBinaryFormatHeader (DataExtractor &HeaderExtractor, uint32_t &OffsetPtr)
 Convenience function for loading the file header given a data extractor at a specified offset. More...
 
Expected< InstrumentationMaploadInstrumentationMap (StringRef Filename)
 Loads the instrumentation map from |Filename|. More...
 
Expected< ProfileloadProfile (StringRef Filename)
 This function will attempt to load an XRay Profiling Mode profile from the provided |Filename|. More...
 
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. More...
 
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. More...
 
Expected< ProfileprofileFromTrace (const Trace &T)
 This function takes a Trace and creates a Profile instance from it. More...
 
Expected< TraceloadTraceFile (StringRef Filename, bool Sort=false)
 This function will attempt to load XRay trace records from the provided |Filename|. More...
 
Expected< TraceloadTrace (const DataExtractor &Extractor, bool Sort=false)
 This function will attempt to load XRay trace records from the provided DataExtractor. More...
 

Enumeration Type Documentation

◆ RecordTypes

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 208 of file InstrumentationMap.cpp.

References llvm::consumeError(), llvm::object::ObjectFile::createObjectFile(), E, 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::Data, llvm::sys::fs::mapped_file_region::data(), E, llvm::sys::fs::file_size(), llvm::sys::fs::openNativeFileForRead(), P, 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 411 of file Trace.cpp.

References E, llvm::DataExtractor::getData(), llvm::DataExtractor::isLittleEndian(), llvm::make_error_code(), llvm::stable_sort(), T, and llvm::IndexedInstrProf::Version.

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::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 
)

This algorithm will merge two Profile instances into a single Profile instance, aggregating blocks by Thread ID.

Definition at line 193 of file Profile.cpp.

References llvm::xray::Profile::addBlock(), llvm::cantFail(), llvm::copy(), llvm::Data, llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::insert(), llvm::xray::Profile::internPath(), P, and llvm::xray::Profile::Block::PathData.

◆ profileFromTrace()

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

◆ readBinaryFormatHeader()

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