[Orc] Add AutoRegisterCode option for DebugObjectManagerPlugin
authorStefan Gränitz <stefan.graenitz@gmail.com>
Mon, 3 Apr 2023 09:41:37 +0000 (11:41 +0200)
committerStefan Gränitz <stefan.graenitz@gmail.com>
Mon, 3 Apr 2023 13:38:07 +0000 (15:38 +0200)
commit4c7f53b99c08d03668cd455b055c64003393887c
tree2beda7cce619610fd571b24fc39bbca9ee6a5429
parente20331cec0a21c4798569ee347de3a697621c9c5
[Orc] Add AutoRegisterCode option for DebugObjectManagerPlugin

Configure the plugin to automatically call the debugger rendezvous breakpoint `__jit_debug_register_code()` for every translation unit (enabled) or never at all (disabled). Default API and behavior remain unchanged.

If AutoRegisterCode is turned off, it's the client's own responsibility to call the rendezvous breakpoint function at an appropriate time.
Depending on the complexity of the debugger's rendezvous breakpoint implementation, this can provide significant performance improvements in cases where many debug objects are added in sequence.

Reviewed By: lhames

Differential Revision: https://reviews.llvm.org/D147310
llvm/examples/OrcV2Examples/LLJITWithRemoteDebugging/RemoteJITUtils.cpp
llvm/include/llvm/ExecutionEngine/Orc/DebugObjectManagerPlugin.h
llvm/include/llvm/ExecutionEngine/Orc/EPCDebugObjectRegistrar.h
llvm/lib/ExecutionEngine/Orc/DebugObjectManagerPlugin.cpp
llvm/lib/ExecutionEngine/Orc/DebuggerSupportPlugin.cpp
llvm/lib/ExecutionEngine/Orc/EPCDebugObjectRegistrar.cpp
llvm/lib/ExecutionEngine/Orc/TargetProcess/JITLoaderGDB.cpp
llvm/tools/lli/lli.cpp
llvm/tools/llvm-jitlink/llvm-jitlink.cpp