Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-05-10 08:44:46

0001 //===- RecordPrinter.h - FDR Record Printer -------------------------------===//
0002 //
0003 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
0004 // See https://llvm.org/LICENSE.txt for license information.
0005 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
0006 //
0007 //===----------------------------------------------------------------------===//
0008 //
0009 // An implementation of the RecordVisitor which prints an individual record's
0010 // data in an adhoc format, suitable for human inspection.
0011 //
0012 //===----------------------------------------------------------------------===//
0013 #ifndef LLVM_XRAY_RECORDPRINTER_H
0014 #define LLVM_XRAY_RECORDPRINTER_H
0015 
0016 #include "llvm/Support/raw_ostream.h"
0017 #include "llvm/XRay/FDRRecords.h"
0018 
0019 namespace llvm {
0020 namespace xray {
0021 
0022 class RecordPrinter : public RecordVisitor {
0023   raw_ostream &OS;
0024   std::string Delim;
0025 
0026 public:
0027   explicit RecordPrinter(raw_ostream &O, std::string D)
0028       : OS(O), Delim(std::move(D)) {}
0029 
0030   explicit RecordPrinter(raw_ostream &O) : RecordPrinter(O, ""){};
0031 
0032   Error visit(BufferExtents &) override;
0033   Error visit(WallclockRecord &) override;
0034   Error visit(NewCPUIDRecord &) override;
0035   Error visit(TSCWrapRecord &) override;
0036   Error visit(CustomEventRecord &) override;
0037   Error visit(CallArgRecord &) override;
0038   Error visit(PIDRecord &) override;
0039   Error visit(NewBufferRecord &) override;
0040   Error visit(EndBufferRecord &) override;
0041   Error visit(FunctionRecord &) override;
0042   Error visit(CustomEventRecordV5 &) override;
0043   Error visit(TypedEventRecord &) override;
0044 };
0045 
0046 } // namespace xray
0047 } // namespace llvm
0048 
0049 #endif // LLVM_XRAY_RECORDPRINTER_H