LLVM  4.0.0
Public Member Functions | Friends | List of all members
llvm::xray::Trace Class Reference

A Trace object represents the records that have been loaded from XRay log files generated by instrumented binaries. More...

#include <Trace.h>

Public Member Functions

const XRayFileHeadergetFileHeader () const
 Provides access to the loaded XRay trace file header. More...
 
citerator begin () const
 
citerator end () const
 
size_t size () const
 

Friends

Expected< TraceloadTraceFile (StringRef, bool)
 This function will attempt to load XRay trace records from the provided |Filename|. More...
 

Detailed Description

A Trace object represents the records that have been loaded from XRay log files generated by instrumented binaries.

We encapsulate the logic of reading the traces in factory functions that populate the Trace object appropriately.

Trace objects provide an accessor to an XRayFileHeader which says more about details of the file from which the XRay trace was loaded from.

Usage:

if (auto TraceOrErr = loadTraceFile("xray-log.something.xray")) { auto& T = *TraceOrErr; // T.getFileHeader() will provide information from the trace header. for (const XRayRecord &R : T) { // ... do something with R here. } } else { // Handle the error here. }

Definition at line 47 of file XRay/Trace.h.

Member Function Documentation

citerator llvm::xray::Trace::begin ( ) const
inline

Definition at line 59 of file XRay/Trace.h.

citerator llvm::xray::Trace::end ( ) const
inline

Definition at line 60 of file XRay/Trace.h.

const XRayFileHeader& llvm::xray::Trace::getFileHeader ( ) const
inline

Provides access to the loaded XRay trace file header.

Definition at line 57 of file XRay/Trace.h.

size_t llvm::xray::Trace::size ( ) const
inline

Definition at line 61 of file XRay/Trace.h.

Friends And Related Function Documentation

Expected<Trace> loadTraceFile ( StringRef  ,
bool   
)
friend

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


The documentation for this class was generated from the following file: