1e8d8bef9SDimitry Andric //===- PseudoProbePrinter.h - Pseudo probe encoding support -----*- C++ -*-===// 2e8d8bef9SDimitry Andric // 3e8d8bef9SDimitry Andric // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 4e8d8bef9SDimitry Andric // See https://llvm.org/LICENSE.txt for license information. 5e8d8bef9SDimitry Andric // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 6e8d8bef9SDimitry Andric // 7e8d8bef9SDimitry Andric //===----------------------------------------------------------------------===// 8e8d8bef9SDimitry Andric // 9e8d8bef9SDimitry Andric // This file contains support for writing pseudo probe info into asm files. 10e8d8bef9SDimitry Andric // 11e8d8bef9SDimitry Andric //===----------------------------------------------------------------------===// 12e8d8bef9SDimitry Andric 13e8d8bef9SDimitry Andric #ifndef LLVM_LIB_CODEGEN_ASMPRINTER_PSEUDOPROBEPRINTER_H 14e8d8bef9SDimitry Andric #define LLVM_LIB_CODEGEN_ASMPRINTER_PSEUDOPROBEPRINTER_H 15e8d8bef9SDimitry Andric 16e8d8bef9SDimitry Andric #include "llvm/ADT/DenseMap.h" 17e8d8bef9SDimitry Andric #include "llvm/CodeGen/AsmPrinterHandler.h" 18e8d8bef9SDimitry Andric 19e8d8bef9SDimitry Andric namespace llvm { 20e8d8bef9SDimitry Andric 21e8d8bef9SDimitry Andric class AsmPrinter; 22e8d8bef9SDimitry Andric class DILocation; 23e8d8bef9SDimitry Andric 24*0fca6ea1SDimitry Andric class PseudoProbeHandler { 25e8d8bef9SDimitry Andric // Target of pseudo probe emission. 26e8d8bef9SDimitry Andric AsmPrinter *Asm; 27349cc55cSDimitry Andric // Name to GUID map, used as caching/memoization for speed. 28349cc55cSDimitry Andric DenseMap<StringRef, uint64_t> NameGuidMap; 29e8d8bef9SDimitry Andric 30e8d8bef9SDimitry Andric public: 31fe6060f1SDimitry Andric PseudoProbeHandler(AsmPrinter *A) : Asm(A) {}; 32e8d8bef9SDimitry Andric 33e8d8bef9SDimitry Andric void emitPseudoProbe(uint64_t Guid, uint64_t Index, uint64_t Type, 34e8d8bef9SDimitry Andric uint64_t Attr, const DILocation *DebugLoc); 35e8d8bef9SDimitry Andric }; 36e8d8bef9SDimitry Andric 37e8d8bef9SDimitry Andric } // namespace llvm 38e8d8bef9SDimitry Andric #endif // LLVM_LIB_CODEGEN_ASMPRINTER_PSEUDOPROBEPRINTER_H 39