Generational ZGC: Simplify ZAddress::finalizable_good and ZAddress::mark_good

XMLWordPrintable

    • Type: Enhancement
    • Resolution: Fixed
    • Priority: P4
    • 23
    • Affects Version/s: 23
    • Component/s: hotspot
    • gc
    • b20

      The code of the methods `ZAddress::finalizable_good` and `ZAddress::mark_good`, shown below, can be simplified.

      ```
        const uintptr_t non_mark_bits_mask = ZPointerMarkMetadataMask ^ ZPointerAllMetadataMask;
        const uintptr_t non_mark_prev_bits = untype(prev) & non_mark_bits_mask;
        return color(addr, <other contents> | non_mark_prev_bits | ZPointerRememberedMask);
      ```


      Please read the following emails for more information.
      https://mail.openjdk.org/pipermail/zgc-dev/2024-April/001318.html
      https://mail.openjdk.org/pipermail/zgc-dev/2024-April/001319.html

            Assignee:
            Guoxiong Li
            Reporter:
            Guoxiong Li
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: