LLVM 24.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"
24
25namespace llvm {
26
27namespace orc {
28
30public:
32 ExecutorAddr UnregisterImplAddr, bool EmitDebugInfo);
33
36 jitlink::PassConfiguration &Config) override;
37
42 ResourceKey SrcKey) override;
43
45 Create(ExecutorProcessControl &EPC, JITDylib &JD, bool EmitDebugInfo,
46 bool TestMode = false);
47
48private:
50 ExecutorAddr RegisterVTuneImplAddr;
51 Proxy<void(VTuneUnloadedMethodIDs)> UnregisterVTuneImpl;
52 std::mutex PluginMutex;
53 uint64_t NextMethodID = 0;
55 PendingMethodIDs;
57 LoadedMethodIDs;
58 bool EmitDebugInfo;
59};
60
61} // end namespace orc
62
63} // end namespace llvm
64
65#endif
unsigned uint64_t
#define LLVM_ABI
Definition Compiler.h:215
This file defines the DenseMap class.
#define G(x, y, z)
Definition MD5.cpp:55
This file defines the SmallVector class.
Lightweight error class with error context and mandatory checking.
Definition Error.h:159
Tagged union holding either a T or a Error.
Definition Error.h:485
Represents an address in the executor process.
ExecutorProcessControl supports interaction with a JIT target process.
Represents a JIT'd dynamic library.
Definition Core.h:676
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:350
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)
VTuneSupportPlugin(ExecutorProcessControl &EPC, ExecutorAddr RegisterImplAddr, ExecutorAddr UnregisterImplAddr, bool EmitDebugInfo)
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:61
SmallVector< std::pair< uint64_t, uint64_t > > VTuneUnloadedMethodIDs
This is an optimization pass for GlobalISel generic memory operations.