Community
Participate
Working Groups
Build Identifier: 20120216-1857 I wrote a program which used the debugging interface (i.e. JDI/JDWP) to manipulate another program. I found out that the dt_socket transport is much slower than the dt_shmem transport. The dt_shmem allows my program to consume the entire CPU but dt_socket seems to have a huge bottleneck in the debuggee process. This same behavior can be seen when Eclipse is debugging a local process and one of the windows is requesting a lot of data from the debuggee. I recommend enhancing Eclipse so that it uses dt_shmem whenever the JVM supports it. If Eclipse is using JDI, then there is very little change required. Basically, use the "com.sun.jdi.SharedMemoryAttach" connector instead of the "com.sun.jdi.ProcessAttach". There is one other minor difference. One uses a "name" instead of the process id to attach. Other than that, the rest of the code is no different. Reproducible: Always
We have considered other connectors, see bug 335896 as an example. Currently Eclipse does not support ProcessAttach, the JDT debugger uses socket attach / listen. I did consider the shared memory connector, but I found one of the drawbacks to be that it is for Windows only. We do accept patches though :) See http://docs.oracle.com/javase/6/docs/technotes/guides/jpda/conninv.html#Connectors for the complete list of connectors.