RFR(S): 8164737 - Remove Unsafe dependency from ProcessTools

Dmitry Samersoff dmitry.samersoff at oracle.com
Thu Aug 25 14:25:05 UTC 2016


David,

> It really seems wrong to me that transitive dependencies
> leak through to the individual tests.

+1

PS: I'd used a script to modify @modules and fix Unsafe dependencies.

So let me know when thinks become ready for cleanup - I'll write another
script that remove unnecessary modules form @modules tag.

-Dmitry

On 2016-08-25 15:31, David Holmes wrote:
> On 25/08/2016 9:01 PM, Christian Tornqvist wrote:
>> Hi David,
>>
>>> Okay, but I don't see any changes to any @modules for tests that use
>>> ProcessTools but not getUnsafe - are there none at present?
>>
>> No, I'm not cleaning up the @modules as part of this change, there are
>> about
>> 1100 @modules java.base/jdk.internal.misc , more than 90% of these are
>> not
>> needed. I believe a lot of the @modules tags in our tests are
>> unnecessary at
>> this point.
> 
> Ok.
> 
>>> Aside: if we defined a jdk.test module would that allows us to handle
>>> transitive dependencies in that module definition instead of in the
>>> individual tests?
>> Not sure what support jtreg has for creating modules at this point
> 
> Me neither, but perhaps something to consider if it will ease the burden
> on the tests. It really seems wrong to me that transitive dependencies
> leak through to the individual tests.
> 
> Thanks,
> David
> 
>> Thanks,
>> Christian
>>
>> -----Original Message-----
>> From: David Holmes [mailto:david.holmes at oracle.com]
>> Sent: Wednesday, August 24, 2016 9:56 PM
>> To: Christian Tornqvist <christian.tornqvist at oracle.com>;
>> hotspot-dev at openjdk.java.net
>> Subject: Re: RFR(S): 8164737 - Remove Unsafe dependency from ProcessTools
>>
>> Hi Christian,
>>
>> On 25/08/2016 4:31 AM, Christian Tornqvist wrote:
>>> Hi everyone,
>>>
>>> Please review this small change that removes the unnecessary
>>> dependency on Unsafe from ProcessTools. Jdk.test.lib.ProcessTools use
>>> some methods from jdk.test.lib.Utils which has the getUnsafe() method,
>>> all tests that use ProcessTools needed to have the @modules
>>> java.base/jdk.internal.misc even if they don't use Unsafe.
>>>
>>> This change moves getUnsafe() into a new class:
>>> jdk.test.lib.unsafe.UnsafeHelper and updates the few existing tests
>>> that use Unsafe to use this class instead.
>>
>> Okay, but I don't see any changes to any @modules for tests that use
>> ProcessTools but not getUnsafe - are there none at present?
>>
>> Aside: if we defined a jdk.test module would that allows us to handle
>> transitive dependencies in that module definition instead of in the
>> individual tests?
>>
>> Thanks,
>> David
>> -----
>>
>>>
>>>
>>> Webrev:
>>>
>>> http://cr.openjdk.java.net/~ctornqvi/webrev/8164737/webrev.00/
>>>
>>>
>>>
>>> Bug:
>>>
>>> https://bugs.openjdk.java.net/browse/JDK-8164737
>>>
>>>
>>>
>>> Thanks,
>>>
>>> Christian
>>>
>>>
>>>
>>


-- 
Dmitry Samersoff
Oracle Java development team, Saint Petersburg, Russia
* I would love to change the world, but they won't give me the sources.


More information about the hotspot-dev mailing list