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

Not all of G1 young collection verification honors the verification type

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 21
    • 18
    • hotspot
    • gc
    • b14

      VerifyGCType is a flag to control during which pauses to do verification.

      Verification before and after young collection checks this flag only for the "main" bulk of verification, not others.

      Eg. from G1CollectedHeap::verify_before_young_collection:

      void G1CollectedHeap::verify_before_young_collection(G1HeapVerifier::G1VerifyType type) {
        if (!VerifyBeforeGC) {
          return;
        }
        Ticks start = Ticks::now();
        _verifier->verify_region_sets_optional();
        _verifier->verify_dirty_young_regions();
        if (VerifyRememberedSets) {
          log_info(gc, verify)("[Verifying RemSets before GC]");
          VerifyRegionRemSetClosure v_cl;
          heap_region_iterate(&v_cl);
        }
        _verifier->verify_before_gc(type); <---- !!!! only this call honors verification type
        _verifier->check_bitmaps("GC Start");
        verify_numa_regions("GC Start");
        phase_times()->record_verify_before_time_ms((Ticks::now() - start).seconds() * MILLIUNITS);

      Only the marked call honors the verification type. Everything else is executed unconditionally when VerifyBeforeGC is enabled. Similar with VerifyAfterGC.

            bstafford Brian Stafford
            tschatzl Thomas Schatzl
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: