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

[lworld] GCs do not process flat arrays by chunks

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P3 P3
    • None
    • repo-valhalla
    • hotspot
    • gc

      When processing flat arrays, GCs are not splitting the work in chunks as they are doing for reference arrays. This could lead to performance issues when handling big flat arrays.

      For instance, for G1:

      inline void G1FullGCMarker::follow_object(oop obj) {
        assert(_bitmap->is_marked(obj), "should be marked");
        if (obj->is_refArray()) {
          // Handle object arrays explicitly to allow them to
          // be split into chunks if needed.
          follow_array((objArrayOop)obj);
        } else {
          obj->oop_iterate(mark_closure());
        }
      }

      Flat arrays are not refArrays(), they are then skipping the array specific processing.

      Note that the arrays meta-data, for both flat and reference arrays are being refactored in https://github.com/openjdk/valhalla/pull/1452

      Waiting for this PR to be integrated would avoid having to fix GCs twice.

            Unassigned Unassigned
            fparain Frederic Parain
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: