RFR: 8340416: Remove ArchiveBuilder::estimate_archive_size() [v2]

Sonia Zaldana Calles szaldana at openjdk.org
Tue Jan 14 19:03:16 UTC 2025


On Mon, 13 Jan 2025 22:54:59 GMT, Ioi Lam <iklam at openjdk.org> wrote:

>> Sonia Zaldana Calles has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains three commits:
>> 
>>  - Adding buffer size for 32-bit
>>  - Merge branch 'master' of github.com:openjdk/jdk into JDK-8340416
>>  - 8340416: Remove ArchiveBuilder::estimate_archive_size()
>
> Please remove these members from ArchiveBuilder as well.
> 
> 
>   // Conservative estimate for number of bytes needed for:
>   size_t _estimated_metaspaceobj_bytes;   // all archived MetaspaceObj's.
>   size_t _estimated_hashtable_bytes;     // symbol table and dictionaries
>   ...
>   void verify_estimate_size(size_t estimate, const char* which);

Hi @iklam 

> Please remove these members from ArchiveBuilder as well.
> 
> ```
>   // Conservative estimate for number of bytes needed for:
>   size_t _estimated_metaspaceobj_bytes;   // all archived MetaspaceObj's.
>   size_t _estimated_hashtable_bytes;     // symbol table and dictionaries
>   ...
>   void verify_estimate_size(size_t estimate, const char* which);
> ```

Thanks for the pointer! I took a closer look at `ArchiveBuilder::verify_estimate_size` and I think we can delete a few other members.


address _last_verified_top;
size_t _other_region_used_bytes;


They appear to only be set in preparation for `verify_estimate_size`. 

Thanks!

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

PR Comment: https://git.openjdk.org/jdk/pull/21931#issuecomment-2590884872


More information about the hotspot-runtime-dev mailing list