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

G1: Excessive is_obj_dead_cond calls in verification

XMLWordPrintable

    • gc
    • b18

        While investigating JDK-8329314 it was found that G1 was slower than Parallel when allocating objects because of the extra verification.

        This tiny tests takes 30s with G1:
        public class Test {
            static int n = 847734685;

            public static void main(String[] args) {
                 String[] strs = new String[n + 1];
            }
        }

        A large portion of that time is spent inside this assert:
            assert(!G1CollectedHeap::heap()->is_obj_dead_cond(_containing_obj, _vo), "Precondition");

        which is called for every single oop in the _containing_obj. If I move this assert to where _containing_obj is initialized, the test now completes in 4-5 seconds.

              stefank Stefan Karlsson
              stefank Stefan Karlsson
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: