[PATCH] D98417: [Orc] Fix race condition in DebugObjectManagerPlugin
Stefan Gränitz via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Mar 11 06:07:54 PST 2021
sgraenitz added a comment.
This means that materialization is blocked until finalization of the debug object allocation is done, i.e.:
- memory was copied over to the target
- an entry was added to the JIT descriptor (locks a global mutex)
- the executing process ran into the rendezvous breakpoint (1st process switch)
- the debugger processed the debug object, read the symbol table and returned control back to the executor (2nd process switch)
This might introduce a considerable delay in materialization. I wonder if this points out an interesting design question for the plugin API: Debug registration could run safely in parallel up to the point that execution reaches the emitted code. The only way I see to achieve it with the current API is blocking the notifyEmitted() callback. Could we instead return the promise and wait for it at a later point in time?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D98417/new/
https://reviews.llvm.org/D98417
More information about the llvm-commits
mailing list