Attaching to local JVM on Windows

Dmytro Sheyko dmytro_sheyko at hotmail.com
Wed Mar 23 09:51:10 PDT 2011


Hi,

On Windows x64 such tools as jconsole are unable to connect to 32bit JVM if they are launched on 64bit JVM and vice versa (32bit JVM can't attach 64bit JVM).

Trying to figure out the reason not to attach JVM of different bitness, I can see that connection is done by injecting some native piece of code to target JVM.

    jdk/src/windows/native/sun/tools/attach/WindowsVirtualMachine.c

Why did we follow this way? Wouldn't it be simpler and better to use, for example, named pipe with name like \\.\pipe\java_pid${pid}, which target JVM would create during initialization and then read; and attaching JVM would just send commands to?

Thanks,
Dmytro
 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.openjdk.java.net/pipermail/serviceability-dev/attachments/20110323/de17e368/attachment.html 


More information about the serviceability-dev mailing list