RFR: JDK-8349077 : Rename GenerationCounters::update_all
Albert Mingkun Yang
ayang at openjdk.org
Mon Jun 16 15:47:28 UTC 2025
On Mon, 16 Jun 2025 14:39:26 GMT, Suchismith Roy <sroy at openjdk.org> wrote:
> JBS Issue : [JDK-8349077](https://bugs.openjdk.org/browse/JDK-8349077)
>
> we found the method names update_all of the class GenerationCounters and its subclasses are not so good. It is better to rename it to something like update_capacity (such as ZGenerationCounters::update_capacity).
>
>
>
> Update_capacity exists, since update_all updates the size and used , I found update_memory_state as a better name for this method.
I believe the ticket was only about this method, which handles only capacity.
void GenerationCounters::update_all(size_t curr_capacity) {
_current_size->set_value(curr_capacity);
}
However, in the patch, this method is renamed as well. Not sure if this is intentional.
void HSpaceCounters::update_all(size_t capacity, size_t used) {
update_capacity(capacity);
update_used(used);
}
-------------
PR Comment: https://git.openjdk.org/jdk/pull/25833#issuecomment-2977143602
More information about the shenandoah-dev
mailing list