RFR: 8264735: Make dynamic dump repeatable [v2]
Yumin Qi
minqi at openjdk.java.net
Wed Jul 7 04:42:49 UTC 2021
On Tue, 6 Jul 2021 21:48:52 GMT, Ioi Lam <iklam at openjdk.org> wrote:
>> Yumin Qi has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Fix comments, added check holding for DumpTimeTable_lock
>
> src/hotspot/share/cds/filemap.cpp line 497:
>
>> 495: // if (_saved_shared_path_table.size() > 0) {
>> 496: // MetadataFactory::free_array<u8>(loader_data, _saved_shared_path_table->_table);
>> 497: // }
>
> In `FileMapInfo::copy_shared_path_table()`:
>
>
> Array<u8>* array = MetadataFactory::new_array<u8>(loader_data, (int)bytes, CHECK);
> _saved_shared_path_table = SharedPathTable(array, _shared_path_table.size());
>
>
> You can remember the `array` pointer, e.g.
>
>
> _saved_shared_path_table_array = array;
>
>
>
> and then call `MetadataFactory::free_array<u8>(_saved_shared_path_table_array)` in this function.
Thanks. Remembering for later deletion is OK.
> src/hotspot/share/cds/lambdaProxyClassDictionary.hpp line 167:
>
>> 165: // We could not use default ctor, it will destroy allocation_type in debug version and fail to delete.
>> 166: // see bug 8269537
>> 167: DumpTimeLambdaProxyClassDictionary() : _count(0) {}
>
> Since you changed the construction call from
>
> (ResourceObj::C_HEAP, mtClass)DumpTimeLambdaProxyClassDictionary();
>
> to
>
> (ResourceObj::C_HEAP, mtClass)DumpTimeLambdaProxyClassDictionary;
>
>
> I think it's no longer necessary to add the `RunTimeLambdaProxyClassInfo()` and `DumpTimeSharedClassTable()` constructors in this PR. In 8269537, we should find a generic way to prevent this bug from happening.
Initialization of _count is still needed. I could remove DumpTimeSharedClassTable, but still, we should keep the ctor which initialize the two data members --- though they will be reset in update_counts. I will remove the comments.
-------------
PR: https://git.openjdk.java.net/jdk/pull/4646
More information about the hotspot-runtime-dev
mailing list