RFR: 8261356: Clean up enum G1Mark

Stefan Johansson sjohanss at openjdk.java.net
Tue Feb 9 10:27:30 UTC 2021


On Mon, 8 Feb 2021 18:41:13 GMT, Albert Mingkun Yang <ayang at openjdk.org> wrote:

> After removing the effectively dead entry in `G1Mark`, the whole enum could be turned into a bool. The call-chain is updated and existing comments are revised.

Nice cleanup. Just a minor nit :)

src/hotspot/share/gc/g1/g1RootClosures.cpp line 53:

> 51: // The treatment of "weak" roots is selectable through the template parameter,
> 52: // this is usually used to control unloading of classes and interned strings.
> 53: template <bool mark_weak>

I think it could make sense to name this parameter `should_mark_weak` to be more consistent. But if you don't agree just leave it.

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

Marked as reviewed by sjohanss (Reviewer).

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



More information about the hotspot-gc-dev mailing list