RFR: 8264735: Make dynamic dump repeatable

Calvin Cheung ccheung at openjdk.java.net
Fri Jul 2 18:02:53 UTC 2021


On Thu, 1 Jul 2021 02:39:07 GMT, Yumin Qi <minqi 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

Looks good. I have a few minor comments.

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"?

src/hotspot/share/cds/dynamicArchive.cpp line 167:

> 165:     post_dump();
> 166: 
> 167:     // Restore dumptime talbes

Typo: talbes -> tables

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

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”.

src/hotspot/share/classfile/systemDictionaryShared.cpp line 1554:

> 1552:   }
> 1553:   bool do_entry(InstanceKlass* k, DumpTimeClassInfo& info) {
> 1554:     if (!info.is_excluded()) {

Should assert_lock_strong(DumpTimeTable_lock) be added like at line 1574 below?

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.

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

Changes requested by ccheung (Reviewer).

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


More information about the hotspot-runtime-dev mailing list