RFR: 8171855: Move package name transformations during module bootstrap into VM
Karen Kinnear
karen.kinnear at oracle.com
Tue Jan 3 18:08:30 UTC 2017
Claes,
Thank you for all the good work you are doing identifying performance issues and making improvements.
I strongly agree with Lois’ concerns.
We looked at other cases in which we have an interface from java to the VM that need to
pass fully qualified names, e.g. Class.forName(). The model used there might be useful
to you as an alternative way to get the same performance benefits.
see Class.c - which uses some existing libjava utilities to do the conversion.
So this has the benefit of not creating extra java strings, while keeping the JVM interface consistent.
It also reduces the risk of missing locations.
We are happy to have further discussions offline if you like.
If you think this is a more general issue, and want to revisit JVM APIs, then we can look at that
in a future release, in which we will have time to consistently modify the model, and create common
utilities.
thanks,
Karen
> On Jan 3, 2017, at 11:44 AM, Claes Redestad <claes.redestad at oracle.com> wrote:
>
>
> On 01/03/2017 04:56 PM, Lois Foltan wrote:
>>
>> Hi Claes,
>>
>> I have some concerns about this change in that it will break the precedence that currently the only internal form of names that the VM deals with are binary names as they appear in class files, where the periods (.) have been replaced by forward slashes (/). I think I would like to discuss this with the runtime team before you proceed.
>
> Hi Lois,
>
> I have anticipated some controversy on this one. :-)
>
>>
>> As far as the actual changes go, if we do proceed with this, there are places in modules.cpp that have been missed. After line #535, #665, #749 (the replace should be moved before the verify of the package name occurs), #820.
>
> Well spotted. I've updated all places:
>
> Hotspot: http://cr.openjdk.java.net/~redestad/8171855/hotspot.02
> JDK: http://cr.openjdk.java.net/~redestad/8171855/jdk.01
>
> get_module_by_package_name is only used by the whitebox API and it seems the test using this was already using internal form. JVM_GetModuleByPackageName appears to be unused. Could this be cleaned up?
>
> Thanks!
>
> /Claes
>
>>
>> Thanks,
>> Lois
>>
>>>
>>> Thanks!
>>>
>>> /Claes
>>>
>>
>
More information about the hotspot-runtime-dev
mailing list