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

Parallel: Move filler object logic inside PSPromotionLAB::unallocate_object

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P4 P4
    • 19
    • 19
    • hotspot
    • gc
    • b15

      In `PSPromotionManager::copy_unmarked_to_survivor_space`, when a thread loses the CAS race, it will try to deallocate the space:

      ```
      if (new_obj_is_tenured) {
        if (!_old_lab.unallocate_object(...)) {
          fill_with_obj(...);
        }
      } else {
        if (!_young_lab.unallocate_object(...)) {
          fill_with_obj(...);
        }
      }
      ```

      The "filler object" logic is irrelevant to the current context and makes more sense inside `unallocate_object`. For example, `PLAB::undo_allocation` contains the filler object logic.

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

              Created:
              Updated:
              Resolved: