[all-commits] [llvm/llvm-project] bb41fc: [ORC-RT][ORC][MachO] Add executor-side symbol tabl...
lhames via All-commits
all-commits at lists.llvm.org
Sat Dec 2 15:32:55 PST 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: bb41fc682ee779c775185ada1aeab6f4be5c282f
https://github.com/llvm/llvm-project/commit/bb41fc682ee779c775185ada1aeab6f4be5c282f
Author: Lang Hames <lhames at gmail.com>
Date: 2023-12-02 (Sat, 02 Dec 2023)
Changed paths:
M compiler-rt/lib/orc/macho_platform.cpp
M compiler-rt/lib/orc/simple_packed_serialization.h
M llvm/include/llvm/ExecutionEngine/Orc/MachOPlatform.h
M llvm/include/llvm/ExecutionEngine/Orc/Shared/ObjectFormats.h
M llvm/lib/ExecutionEngine/Orc/MachOPlatform.cpp
M llvm/lib/ExecutionEngine/Orc/Shared/ObjectFormats.cpp
Log Message:
-----------
[ORC-RT][ORC][MachO] Add executor-side symbol tables to MachO platform support.
Adds symbol tables to the JITDylibState struct in the ORC runtime
MachOPlatformRuntimeState class. This table will hold the addresses of
materialized symbols (registered by a new JITLink pass in MachOPlatform),
allowing these to be looked up in the executor without an IPC request to the
controller.
The old lookup-symbols callback (made by the runtime in response to dlsym
lookups) is replaced with a push-symbols callback that can trigger
materialization of requested symbols.
Holding a symbol table on the executor side should make repeat calls to dlsym
(and other symbol lookup operations) cheaper since the IPC to trigger
materialization happens at most once per symbol. It should also enable us (at
some point in the future) to symbolicate backtraces in JIT'd code even if the
controller process is gone (e.g. detached or crashed). The trade-off for this
is increased memory consumption in the executor and larger JIT'd data transfers
(since symbol names are now transferred to the executor unconditionally, even
though they may never be used).
More information about the All-commits
mailing list