LLVM 20.0.0git
VTuneSupportPlugin.h
Go to the documentation of this file.
1//===--- VTuneSupportPlugin.h -- Support for VTune profiler ---*- 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// Handles support for registering code with VIntel Tune's Amplifier JIT API.
10//
11//===----------------------------------------------------------------------===//
12
13#ifndef LLVM_EXECUTIONENGINE_ORC_DEBUGGING_VTUNESUPPORT_H
14#define LLVM_EXECUTIONENGINE_ORC_DEBUGGING_VTUNESUPPORT_H
15
16#include "llvm/ADT/DenseMap.h"
22
23namespace llvm {
24
25namespace orc {
26
28public:
30 ExecutorAddr UnregisterImplAddr, bool EmitDebugInfo)
31 : EPC(EPC), RegisterVTuneImplAddr(RegisterImplAddr),
32 UnregisterVTuneImplAddr(UnregisterImplAddr),
33 EmitDebugInfo(EmitDebugInfo) {}
34
38
43 ResourceKey SrcKey) override;
44
46 Create(ExecutorProcessControl &EPC, JITDylib &JD, bool EmitDebugInfo,
47 bool TestMode = false);
48
49private:
51 ExecutorAddr RegisterVTuneImplAddr;
52 ExecutorAddr UnregisterVTuneImplAddr;
53 std::mutex PluginMutex;
54 uint64_t NextMethodID = 0;
56 PendingMethodIDs;
58 LoadedMethodIDs;
59 bool EmitDebugInfo;
60};
61
62} // end namespace orc
63
64} // end namespace llvm
65
66#endif
This file defines the DenseMap class.
RelaxConfig Config
Definition: ELF_riscv.cpp:506
#define G(x, y, z)
Definition: MD5.cpp:56
This file defines the SmallVector class.
Lightweight error class with error context and mandatory checking.
Definition: Error.h:160
Tagged union holding either a T or a Error.
Definition: Error.h:481
Represents an address in the executor process.
ExecutorProcessControl supports interaction with a JIT target process.
Represents a JIT'd dynamic library.
Definition: Core.h:897
Plugin instances can be added to the ObjectLinkingLayer to receive callbacks when code is loaded or e...
Tracks responsibility for materialization, and mediates interactions between MaterializationUnits and...
Definition: Core.h:571
VTuneSupportPlugin(ExecutorProcessControl &EPC, ExecutorAddr RegisterImplAddr, ExecutorAddr UnregisterImplAddr, bool EmitDebugInfo)
void notifyTransferringResources(JITDylib &JD, ResourceKey DstKey, ResourceKey SrcKey) override
static Expected< std::unique_ptr< VTuneSupportPlugin > > Create(ExecutorProcessControl &EPC, JITDylib &JD, bool EmitDebugInfo, bool TestMode=false)
Error notifyEmitted(MaterializationResponsibility &MR) override
void modifyPassConfig(MaterializationResponsibility &MR, jitlink::LinkGraph &G, jitlink::PassConfiguration &Config) override
Error notifyFailed(MaterializationResponsibility &MR) override
Error notifyRemovingResources(JITDylib &JD, ResourceKey K) override
uintptr_t ResourceKey
Definition: Core.h:74
This is an optimization pass for GlobalISel generic memory operations.
Definition: AddressRanges.h:18