RFR: 8301564: Non-C-heap allocated ResourceHashtable keys and values must have trivial destructor [v3]

Ioi Lam iklam at openjdk.org
Thu Feb 2 22:27:52 UTC 2023


On Wed, 1 Feb 2023 21:16:35 GMT, Jorn Vernee <jvernee at openjdk.org> wrote:

>> Ioi Lam has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains six additional commits since the last revision:
>> 
>>  - Merge branch 'master' into 8301564-forbid-non-trivial-destructor-for-resourcehash-KV-types
>>  - @coleenp comments - use mtStatistics instead
>>  - fixed aarch64 and risvc64
>>  - fixed typo
>>  - Fixed ClassLoaderStatsClosure::StatsTable
>>  - 8301564: Non-C-heap allocated ResourceHashtable keys and values must have trivial destructor
>
> This looks good, thanks.
> 
> I'll put this here for posterity: we discussed changing `ResourceHashtable` to always call the destructor of the key and value (sketch [here](https://github.com/openjdk/jdk/compare/master...JornVernee:jdk:Always_Dtor)). That would allow using `K` and `V` with non-trivial destructors as well. But, this discussion didn't reach a conclusion yet (in particular, there were some doubts expressed over whether a container should be calling destructors at all).
> 
> In the mean time, this patch improves upon the status quo.

Thanks @JornVernee and @coleenp for the review.

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

PR: https://git.openjdk.org/jdk/pull/12355


More information about the hotspot-dev mailing list