Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8288780

Consider changing G1HeapRegionAttr enum attribute values

    XMLWordPrintable

Details

    • Enhancement
    • Resolution: Unresolved
    • P4
    • tbd
    • 20
    • hotspot
    • gc

    Description

      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.)

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated: