LLVM 20.0.0git
Public Member Functions | List of all members
llvm::xray::FDRTraceWriter Class Reference

The FDRTraceWriter allows us to hand-craft an XRay Flight Data Recorder (FDR) mode log file. More...

#include "llvm/XRay/FDRTraceWriter.h"

Inheritance diagram for llvm::xray::FDRTraceWriter:
Inheritance graph
[legend]

Public Member Functions

 FDRTraceWriter (raw_ostream &O, const XRayFileHeader &H)
 
 ~FDRTraceWriter ()
 
Error visit (BufferExtents &) override
 
Error visit (WallclockRecord &) override
 
Error visit (NewCPUIDRecord &) override
 
Error visit (TSCWrapRecord &) override
 
Error visit (CustomEventRecord &) override
 
Error visit (CallArgRecord &) override
 
Error visit (PIDRecord &) override
 
Error visit (NewBufferRecord &) override
 
Error visit (EndBufferRecord &) override
 
Error visit (FunctionRecord &) override
 
Error visit (CustomEventRecordV5 &) override
 
Error visit (TypedEventRecord &) override
 
- Public Member Functions inherited from llvm::xray::RecordVisitor
virtual ~RecordVisitor ()=default
 
virtual Error visit (BufferExtents &)=0
 
virtual Error visit (WallclockRecord &)=0
 
virtual Error visit (NewCPUIDRecord &)=0
 
virtual Error visit (TSCWrapRecord &)=0
 
virtual Error visit (CustomEventRecord &)=0
 
virtual Error visit (CallArgRecord &)=0
 
virtual Error visit (PIDRecord &)=0
 
virtual Error visit (NewBufferRecord &)=0
 
virtual Error visit (EndBufferRecord &)=0
 
virtual Error visit (FunctionRecord &)=0
 
virtual Error visit (CustomEventRecordV5 &)=0
 
virtual Error visit (TypedEventRecord &)=0
 

Detailed Description

The FDRTraceWriter allows us to hand-craft an XRay Flight Data Recorder (FDR) mode log file.

This is used primarily for testing, generating sequences of FDR records that can be read/processed. It can also be used to generate various kinds of execution traces without using the XRay runtime. Note that this writer does not do any validation, but uses the types of records defined in the FDRRecords.h file.

Definition at line 29 of file FDRTraceWriter.h.

Constructor & Destructor Documentation

◆ FDRTraceWriter()

llvm::xray::FDRTraceWriter::FDRTraceWriter ( raw_ostream O,
const XRayFileHeader H 
)
explicit

Definition at line 59 of file FDRTraceWriter.cpp.

References llvm::xray::XRayFileHeader::FreeFormData, H, and OS.

◆ ~FDRTraceWriter()

llvm::xray::FDRTraceWriter::~FDRTraceWriter ( )
default

Member Function Documentation

◆ visit() [1/12]

Error llvm::xray::FDRTraceWriter::visit ( BufferExtents R)
overridevirtual

Implements llvm::xray::RecordVisitor.

Definition at line 79 of file FDRTraceWriter.cpp.

References OS.

◆ visit() [2/12]

Error llvm::xray::FDRTraceWriter::visit ( CallArgRecord R)
overridevirtual

Implements llvm::xray::RecordVisitor.

Definition at line 122 of file FDRTraceWriter.cpp.

References OS.

◆ visit() [3/12]

Error llvm::xray::FDRTraceWriter::visit ( CustomEventRecord R)
overridevirtual

Implements llvm::xray::RecordVisitor.

Definition at line 95 of file FDRTraceWriter.cpp.

References D, E, OS, and llvm::Error::success().

◆ visit() [4/12]

Error llvm::xray::FDRTraceWriter::visit ( CustomEventRecordV5 R)
overridevirtual

Implements llvm::xray::RecordVisitor.

Definition at line 104 of file FDRTraceWriter.cpp.

References D, E, OS, and llvm::Error::success().

◆ visit() [5/12]

Error llvm::xray::FDRTraceWriter::visit ( EndBufferRecord R)
overridevirtual

Implements llvm::xray::RecordVisitor.

Definition at line 134 of file FDRTraceWriter.cpp.

References OS.

◆ visit() [6/12]

Error llvm::xray::FDRTraceWriter::visit ( FunctionRecord R)
overridevirtual

Implements llvm::xray::RecordVisitor.

Definition at line 138 of file FDRTraceWriter.cpp.

References OS, and llvm::Error::success().

◆ visit() [7/12]

Error llvm::xray::FDRTraceWriter::visit ( NewBufferRecord R)
overridevirtual

Implements llvm::xray::RecordVisitor.

Definition at line 130 of file FDRTraceWriter.cpp.

References OS.

◆ visit() [8/12]

Error llvm::xray::FDRTraceWriter::visit ( NewCPUIDRecord R)
overridevirtual

Implements llvm::xray::RecordVisitor.

Definition at line 87 of file FDRTraceWriter.cpp.

References OS.

◆ visit() [9/12]

Error llvm::xray::FDRTraceWriter::visit ( PIDRecord R)
overridevirtual

Implements llvm::xray::RecordVisitor.

Definition at line 126 of file FDRTraceWriter.cpp.

References OS.

◆ visit() [10/12]

Error llvm::xray::FDRTraceWriter::visit ( TSCWrapRecord R)
overridevirtual

Implements llvm::xray::RecordVisitor.

Definition at line 91 of file FDRTraceWriter.cpp.

References OS.

◆ visit() [11/12]

Error llvm::xray::FDRTraceWriter::visit ( TypedEventRecord R)
overridevirtual

Implements llvm::xray::RecordVisitor.

Definition at line 113 of file FDRTraceWriter.cpp.

References D, E, OS, and llvm::Error::success().

◆ visit() [12/12]

Error llvm::xray::FDRTraceWriter::visit ( WallclockRecord R)
overridevirtual

Implements llvm::xray::RecordVisitor.

Definition at line 83 of file FDRTraceWriter.cpp.

References OS.


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