RFR: 8263670: pmap and pstack in jhsdb do not work on debug server

Yasumasa Suenaga ysuenaga at openjdk.java.net
Wed Mar 17 01:25:07 UTC 2021


On Wed, 17 Mar 2021 00:25:19 GMT, Chris Plummer <cjplummer at openjdk.org> wrote:

> If I understand correctly, this is very different than the way we normally implement remote debugging support. Normally pages are read in from the remote VM process and into the local SA client, where it can then implement SA support in much the same way as it normally does. For PStack and PMap, you've chosen to instead just execute the commands in the remote debugd server, and return the (text) result to the client.

Yes.

> It's not clear to me why the normal model (of reading in the remote pages and leveraging existing PStack and PMAp supprt) can't instead be used so we can keep the remote debugging support consistent. How are PStack and PMap different from other SA support that does not require remote execution of commands.

SA would set various information when it attaches to debuggee, so it is difficult to catch up them when remote debugger attached because only debugd can attach to debuggee directly.
As I said in the description of this PR, both PMap and PStack depend on CDebugger. CDebugger holds low-level information such as library list and native thread list. They would be initialized when it attached - it is startup of debugd, and we cannot get them when we connect to debugd.

I thought to export CDebugger as RMI object, but it seems to complex. So I decided to run both pmap and pstack on debugd.

-------------

PR: https://git.openjdk.java.net/jdk/pull/3027


More information about the serviceability-dev mailing list