LLVM  14.0.0git
PseudoProbePrinter.h
Go to the documentation of this file.
1 //===- PseudoProbePrinter.h - Pseudo probe encoding support -----*- C++ -*-===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 //
9 // This file contains support for writing pseudo probe info into asm files.
10 //
11 //===----------------------------------------------------------------------===//
12 
13 #ifndef LLVM_LIB_CODEGEN_ASMPRINTER_PSEUDOPROBEPRINTER_H
14 #define LLVM_LIB_CODEGEN_ASMPRINTER_PSEUDOPROBEPRINTER_H
15 
16 #include "llvm/ADT/DenseMap.h"
18 
19 namespace llvm {
20 
21 class AsmPrinter;
22 class MCStreamer;
23 class Module;
24 class DILocation;
25 
27  // Target of pseudo probe emission.
28  AsmPrinter *Asm;
29  // Name to GUID map, used as caching/memoization for speed.
31 
32 public:
34  ~PseudoProbeHandler() override;
35 
37  uint64_t Attr, const DILocation *DebugLoc);
38 
39  // Unused.
40  void setSymbolSize(const MCSymbol *Sym, uint64_t Size) override {}
41  void endModule() override {}
42  void beginFunction(const MachineFunction *MF) override {}
43  void endFunction(const MachineFunction *MF) override {}
44  void beginInstruction(const MachineInstr *MI) override {}
45  void endInstruction() override {}
46 };
47 
48 } // namespace llvm
49 #endif // LLVM_LIB_CODEGEN_ASMPRINTER_PSEUDOPROBEPRINTER_H
llvm::Check::Size
@ Size
Definition: FileCheck.h:73
llvm::PseudoProbeHandler::endFunction
void endFunction(const MachineFunction *MF) override
Gather post-function debug information.
Definition: PseudoProbePrinter.h:43
MI
IRTranslator LLVM IR MI
Definition: IRTranslator.cpp:105
llvm
This file implements support for optimizing divisions by a constant.
Definition: AllocatorList.h:23
llvm::MCSymbol
MCSymbol - Instances of this class represent a symbol name in the MC file, and MCSymbols are created ...
Definition: MCSymbol.h:41
llvm::DILocation
Debug location.
Definition: DebugInfoMetadata.h:1580
llvm::Type
The instances of the Type class are immutable: once they are created, they are never changed.
Definition: Type.h:45
DenseMap.h
AsmPrinterHandler.h
llvm::PseudoProbeHandler::beginFunction
void beginFunction(const MachineFunction *MF) override
Gather pre-function debug information.
Definition: PseudoProbePrinter.h:42
llvm::PseudoProbeHandler::endModule
void endModule() override
Emit all sections that should come after the content.
Definition: PseudoProbePrinter.h:41
llvm::PseudoProbeHandler
Definition: PseudoProbePrinter.h:26
llvm::PseudoProbeHandler::~PseudoProbeHandler
~PseudoProbeHandler() override
Index
uint32_t Index
Definition: ELFObjHandler.cpp:84
llvm::MachineInstr
Representation of each machine instruction.
Definition: MachineInstr.h:64
uint64_t
llvm::DenseMap
Definition: DenseMap.h:714
llvm::MachineFunction
Definition: MachineFunction.h:234
Module
Machine Check Debug Module
Definition: MachineCheckDebugify.cpp:122
llvm::PseudoProbeHandler::beginInstruction
void beginInstruction(const MachineInstr *MI) override
Process beginning of an instruction.
Definition: PseudoProbePrinter.h:44
llvm::PseudoProbeHandler::PseudoProbeHandler
PseudoProbeHandler(AsmPrinter *A)
Definition: PseudoProbePrinter.h:33
llvm::AsmPrinter
This class is intended to be used as a driving class for all asm writers.
Definition: AsmPrinter.h:81
llvm::AsmPrinterHandler
Collects and handles AsmPrinter objects required to build debug or EH information.
Definition: AsmPrinterHandler.h:33
llvm::PseudoProbeHandler::emitPseudoProbe
void emitPseudoProbe(uint64_t Guid, uint64_t Index, uint64_t Type, uint64_t Attr, const DILocation *DebugLoc)
Definition: PseudoProbePrinter.cpp:25
llvm::PseudoProbeHandler::endInstruction
void endInstruction() override
Process end of an instruction.
Definition: PseudoProbePrinter.h:45
llvm::PseudoProbeHandler::setSymbolSize
void setSymbolSize(const MCSymbol *Sym, uint64_t Size) override
For symbols that have a size designated (e.g.
Definition: PseudoProbePrinter.h:40
llvm::DebugLoc
A debug info location.
Definition: DebugLoc.h:33