On Fri, 2 Apr 2021 08:27:05 GMT, Yasumasa Suenaga <[email protected]> wrote:
> LinuxDebuggerLocal has worker thread (LinuxDebuggerLocalWorkerThread) to call > ptrace(2) because it have to call from same thread. > > LinuxDebuggerLocalWorkerThread does not have queue, so it depends on > synchronized statement as following: > > https://github.com/openjdk/jdk/blob/66d9961cbd83dbfca20b0af3c20693438d4aff3f/src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/debugger/linux/LinuxDebuggerLocal.java#L156-L192 > > If `execute()` is called in same time, `task` would be broken. > Fortunately all of caller of `execute()` are guarded with `synchronized` now. > But task worker should be more robustness. > > I used `Executors::newSingleThreadExecutor`, so we don't need to take care > task queue. > > I tested this change with serviceability/sa jtreg tests on Linux x64. This pull request has been closed without being integrated. ------------- PR: https://git.openjdk.java.net/jdk/pull/3321
