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

Consolidate push and push_if_necessary in PreservedMarks

XMLWordPrintable

    • gc
    • b04

      `PreservedMarks::push` is called only in one place. In `G1FullGCMarker::mark_object`:

      ```
        if (obj->mark_must_be_preserved(mark) &&
            // It is not necessary to preserve marks for objects in regions we do not
            // compact because we do not change their headers (i.e. forward them).
            _collector->is_compacting(obj)) {
          preserved_stack()->push(obj, mark);
        }
      ```
      One can merge `mark_must_be_preserved` into `push`, which becomes `push_if_necessary`.

            ayang Albert Yang
            ayang Albert Yang
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: