Supporting inline types in Java debugger

David Simms david.simms at oracle.com
Tue Oct 8 10:33:13 UTC 2019


Sorry for the delayed reply...

src/hotspot/share/prims/jni.cpp:2075

Isn't this dance repeated some where else (interpreter runtime) ?  Is it 
worth refactoring, maybe moving to instanceKlass ?


General:

  * Testing is there any automated jdb testing ?
      o I assume this is actually a first pass for Daniil to get initial
        manual testing up ?
  * Draft spec changes will need to be tracked somewhere
      o New RFE ?


Otherwise, looks good as is.

/D


On 4/10/19 7:23 PM, Frederic Parain wrote:
> This patch would address two open bugs:
>
> https://bugs.openjdk.java.net/browse/JDK-8211032
> https://bugs.openjdk.java.net/browse/JDK-8211030
>
> Fred
>
>
>> On Oct 4, 2019, at 11:07, Frederic Parain <frederic.parain at oracle.com> wrote:
>>
>> I’ve just updated the webrev in place to fix an issue with fast JNI accessors
>> (hard coded constants dependent on data structures elsewhere in the VM are bad).
>> This issue exists on all platforms.
>>
>> Fred
>>
>>
>>> On Oct 3, 2019, at 08:51, Frederic Parain <frederic.parain at oracle.com> wrote:
>>>
>>> Greetings,
>>>
>>> Here’s a patch to enable Java debugging with inline types:
>>>
>>> http://cr.openjdk.java.net/~fparain/jpda/webrev.00/index.html
>>>
>>> Using jdb, it enables the following operations:
>>> - inspection of inline classes
>>> - read/write operations on local variables containing inline values
>>> - read/write operations on flattened fields
>>> - read/write operations on flattened arrays
>>>
>>> Those changes are relatively limited, but they impact all layers of
>>> the JPDA: JDI, JDWP, JVMTI and JNI. Several of these changes will require
>>> some spec updates. They also highlight some future issues with current
>>> API (like com.sun.jdi.VirtualMachine.classesByName(String className)
>>> which takes a class name to convert it into a L-type before sending
>>> the request to the debuggee).
>>>
>>> Debugging has been tested with jdb.
>>> Other Java debugger are not guaranteed to work, for instance IntelliJ Idea
>>> debugger still gets confused with Q-signatures.
>>>
>>> We can decide to either push this code if people are interested in using Java
>>> debuggers with inline types, or keep it has an exploration result that we can
>>> exploit when finalizing inline types support for the whole Java platform.
>>>
>>> Regards,
>>>
>>> Fred
>>>
>>>
>>>
>>>



More information about the valhalla-dev mailing list