RFR 8217660: Refactor module related locked_create_entry_or_null() functions

Harold Seigel harold.seigel at oracle.com
Thu Jan 24 13:20:00 UTC 2019


Thanks Lois!

I'll add the requested comment to 
ModuleEntrytable::locked_create_entry() and add an assert to 
set_javabase_moduleEntry() that _javabase_module is NULL.

Harold

On 1/24/2019 7:27 AM, Lois Foltan wrote:
> On 1/23/2019 4:28 PM, Harold Seigel wrote:
>>  * Adds a PackageEntryTable::locked_create_entry() function for callers
>>    who know the package entry cannot already exist.
>>  * Replaces ModuleEntryTable::locked_create_entry_or_null() with
>>    locked_create_entry().
>>  * Adds a call to lookup_only(module_symbol) to check if a moduleEntry
>>    exists, instead of depending on locked_create_entry_or_null()
>>    returning null.
>>
>> Open Webrev: 
>> http://cr.openjdk.java.net/~hseigel/bug_8217660/webrev/index.html
>
> Hi Harold,
>
> I think this looks good.  A couple of minor comments:
>
> - can you add a comment before the definition of 
> ModuleEntryTable::locked_create_entry() that indicates that it is the 
> caller's responsibility to check if the module has already been 
> defined prior to calling locked_create_entry().
> - the only situation I see this as an issue is in create_javabase() 
> but that method should only be called once during bootstrapping. There 
> are no checks in ModuleEntry::set_javabase_ModuleEntry that ensures 
> ModuleEntry::_javabase_module == NULL before setting.
>
> I don't need to see another webrev.
> Thanks,
> Lois


More information about the hotspot-runtime-dev mailing list