LLVM 20.0.0git
Public Member Functions | List of all members
llvm::orc::DebugObjectManagerPlugin Class Reference

Creates and manages DebugObjects for JITLink artifacts. More...

#include "llvm/ExecutionEngine/Orc/DebugObjectManagerPlugin.h"

Inheritance diagram for llvm::orc::DebugObjectManagerPlugin:
Inheritance graph
[legend]

Public Member Functions

 DebugObjectManagerPlugin (ExecutionSession &ES, std::unique_ptr< DebugObjectRegistrar > Target)
 
 DebugObjectManagerPlugin (ExecutionSession &ES, std::unique_ptr< DebugObjectRegistrar > Target, bool RequireDebugSections, bool AutoRegisterCode)
 Create the plugin to submit DebugObjects for JITLink artifacts.
 
 ~DebugObjectManagerPlugin ()
 
void notifyMaterializing (MaterializationResponsibility &MR, jitlink::LinkGraph &G, jitlink::JITLinkContext &Ctx, MemoryBufferRef InputObject) override
 
Error notifyEmitted (MaterializationResponsibility &MR) override
 
Error notifyFailed (MaterializationResponsibility &MR) override
 
Error notifyRemovingResources (JITDylib &JD, ResourceKey K) override
 
void notifyTransferringResources (JITDylib &JD, ResourceKey DstKey, ResourceKey SrcKey) override
 
void modifyPassConfig (MaterializationResponsibility &MR, jitlink::LinkGraph &LG, jitlink::PassConfiguration &PassConfig) override
 

Detailed Description

Creates and manages DebugObjects for JITLink artifacts.

DebugObjects are created when linking for a MaterializationResponsibility starts. They are pending as long as materialization is in progress.

There can only be one pending DebugObject per MaterializationResponsibility. If materialization fails, pending DebugObjects are discarded.

Once executable code for the MaterializationResponsibility is emitted, the corresponding DebugObject is finalized to target memory and the provided DebugObjectRegistrar is notified. Ownership of DebugObjects remains with the plugin.

Definition at line 48 of file DebugObjectManagerPlugin.h.

Constructor & Destructor Documentation

◆ DebugObjectManagerPlugin() [1/2]

llvm::orc::DebugObjectManagerPlugin::DebugObjectManagerPlugin ( ExecutionSession ES,
std::unique_ptr< DebugObjectRegistrar Target 
)

Definition at line 396 of file DebugObjectManagerPlugin.cpp.

◆ DebugObjectManagerPlugin() [2/2]

llvm::orc::DebugObjectManagerPlugin::DebugObjectManagerPlugin ( ExecutionSession ES,
std::unique_ptr< DebugObjectRegistrar Target,
bool  RequireDebugSections,
bool  AutoRegisterCode 
)

Create the plugin to submit DebugObjects for JITLink artifacts.

For all options the recommended setting is true.

RequireDebugSections: Submit debug objects to the executor only if they contain actual debug info. Turning this off may allow minimal debugging based on raw symbol names. Note that this may cause significant memory and transport overhead for objects built with a release configuration.

AutoRegisterCode: Notify the debugger for each new debug object. This is a good default mode, but it may cause significant overhead when adding many modules in sequence. When turning this off, the user has to issue the call to __jit_debug_register_code() on the executor side manually.

Definition at line 389 of file DebugObjectManagerPlugin.cpp.

◆ ~DebugObjectManagerPlugin()

llvm::orc::DebugObjectManagerPlugin::~DebugObjectManagerPlugin ( )
default

Member Function Documentation

◆ modifyPassConfig()

void llvm::orc::DebugObjectManagerPlugin::modifyPassConfig ( MaterializationResponsibility MR,
jitlink::LinkGraph LG,
jitlink::PassConfiguration PassConfig 
)
override

◆ notifyEmitted()

Error llvm::orc::DebugObjectManagerPlugin::notifyEmitted ( MaterializationResponsibility MR)
override

◆ notifyFailed()

Error llvm::orc::DebugObjectManagerPlugin::notifyFailed ( MaterializationResponsibility MR)
override

Definition at line 486 of file DebugObjectManagerPlugin.cpp.

References llvm::Error::success().

◆ notifyMaterializing()

void llvm::orc::DebugObjectManagerPlugin::notifyMaterializing ( MaterializationResponsibility MR,
jitlink::LinkGraph G,
jitlink::JITLinkContext Ctx,
MemoryBufferRef  InputObject 
)
override

◆ notifyRemovingResources()

Error llvm::orc::DebugObjectManagerPlugin::notifyRemovingResources ( JITDylib JD,
ResourceKey  K 
)
override

Definition at line 509 of file DebugObjectManagerPlugin.cpp.

References llvm::Error::success().

◆ notifyTransferringResources()

void llvm::orc::DebugObjectManagerPlugin::notifyTransferringResources ( JITDylib JD,
ResourceKey  DstKey,
ResourceKey  SrcKey 
)
override

Definition at line 493 of file DebugObjectManagerPlugin.cpp.


The documentation for this class was generated from the following files: