Bug 380342 - Use dt_shmem transport for debugging
Summary: Use dt_shmem transport for debugging
Status: NEW
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Debug (show other bugs)
Version: 3.8   Edit
Hardware: PC Windows 7
: P3 enhancement with 1 vote (vote)
Target Milestone: ---   Edit
Assignee: JDT-Debug-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-05-22 20:46 EDT by Nathan Reynolds CLA
Modified: 2012-09-12 11:06 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Nathan Reynolds CLA 2012-05-22 20:46:24 EDT
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
Comment 1 Michael Rennie CLA 2012-05-22 22:04:20 EDT
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.