Consider changing G1HeapRegionAttr enum attribute values

XMLWordPrintable

    • Type: Enhancement
    • Resolution: Unresolved
    • Priority: P4
    • tbd
    • Affects Version/s: 20
    • Component/s: hotspot
    • gc

      In G1HeapRegionAttr, consider moving Humongous to -1, and moving NotInCSet further down (either trade with Humongous, or rotate all the negative states so NotInCSet is the lowest value. The point of moving Humongous is to change is_in_cset_or_humongous() from

        is_in_cset() || is_humongous();
      =>
        (type() >= Young) || (type() == Humongous)
      =>
        (_type >= 0) || (_type == -2)

      to

        type() >= Humongous;
      =>
        _type >= -1

      While we're at it, fix the comment describing the _type values, which currently says the test for being in the collection set or not uses `> NotInCSet`, which is no longer true. As of JDK-8223693 we use `>= Young` and no longer have any range checks involving `NotInCSet`.

      (Though it turns out is_in_cset_or_humongous isn't *super* critical, as it only seems to be used by closures used in reference processing.)

            Assignee:
            Unassigned
            Reporter:
            Kim Barrett
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: