RFR: 8264735: Make dynamic dump repeatable

Yumin Qi minqi at openjdk.java.net
Fri Jul 2 19:10:53 UTC 2021


On Fri, 2 Jul 2021 17:58:54 GMT, Calvin Cheung <ccheung at openjdk.org> wrote:

>> Hi, Please review
>> 
>>   Currently after dynamic dump, dump time tables (`_dumptime_talbles, _dumptime_lambda_proxy_class_dictionary and _saved_shared_path_table`) are corrupted and could not be used for next dump. The patch clones the three tables, and after dump restore them so the next dump is possible. With the fix, jcmd VM.cds dynamic_dump can do multiple dump to the same live process.
>> 
>>   Tests: tier1,tier2,tier3,tier4
>>   
>>   Thanks
>>   Yumin
>
> src/hotspot/share/cds/dumpTimeClassInfo.cpp line 73:
> 
>> 71:   }
>> 72:   if (_verifier_constraint_flags == NULL) {
>> 73:     _verifier_constraint_flags = new (ResourceObj::C_HEAP, mtClass) GrowableArray<char>(4, mtClass);
> 
> Why add extra blank space after "new"?

To keep consistent usage style of operator 'new'.

> src/hotspot/share/cds/filemap.cpp line 492:
> 
>> 490:          "No modular java runtime image present when allocating the CDS classpath entry table");
>> 491: 
>> 492:   // After dynamic dump, _saved_shared_path_table is corrupt, can not be used again.
> 
> Typo: can not -> cannot

Will update.

> src/hotspot/share/cds/lambdaProxyClassDictionary.hpp line 113:
> 
>> 111:   void add_proxy_klass(InstanceKlass* proxy_klass) {
>> 112:     if (_proxy_klasses == NULL) {
>> 113:       _proxy_klasses = new (ResourceObj::C_HEAP, mtClassShared) GrowableArray<InstanceKlass*>(5, mtClassShared);
> 
> Extra blank space added before “GrowableArray”.

The usage style is like new (args...) type. This has been in hotspot and just want to keep with that.

> src/hotspot/share/classfile/systemDictionaryShared.cpp line 1605:
> 
>> 1603: 
>> 1604: void SystemDictionaryShared::restore_dumptime_tables() {
>> 1605:   // FileMapInfo::clean_cloned_shared_path_table();
> 
> Please delete line 1605 if it is not needed.

Ah, forget to delete it. Thanks

-------------

PR: https://git.openjdk.java.net/jdk/pull/4646


More information about the hotspot-runtime-dev mailing list