< prev index next >

test/jdk/jdk/jfr/event/gc/collection/TestG1ParallelPhases.java

Print this page
rev 59956 : 8247819: G1: Process strong OopStorage entries in parallel
Reviewed-by:
Contributed-by: Erik Osterlund <erik.osterlund@oracle.com>, Stefan Karlsson <stefan.karlsson@oracle.com>, Thomas Schatzl <thomas.schatzl@oracle.com>


  75         recording.enable(EventNames.GCPhaseParallel);
  76         recording.start();
  77 
  78         // create more weak garbage than can fit in this heap (-Xmx20m), will force collection of weak references
  79         weakRefs = range(1, 30)
  80             .mapToObj(n -> new WeakReference<>(new byte[1_000_000]))
  81             .collect(toList()); // force evaluation of lazy stream (all weak refs must be created)
  82 
  83         final var MEG = 1024 * 1024;
  84         MixedGCProvoker.allocateAndProvokeMixedGC(MEG);
  85         recording.stop();
  86 
  87         Set<String> usedPhases = fromRecording(recording).stream()
  88             .map(e -> e.getValue("name").toString())
  89             .collect(toSet());
  90 
  91         Set<String> allPhases = of(
  92             "ExtRootScan",
  93             "ThreadRoots",
  94             "UniverseRoots",
  95             "JNIRoots",
  96             "ObjectSynchronizerRoots",
  97             "ManagementRoots",
  98             "VMGlobalRoots",

  99             "CLDGRoots",
 100             "JVMTIRoots",
 101             "CMRefRoots",
 102             "MergeER",
 103             "MergeHCC",
 104             "MergeRS",
 105             "MergeLB",
 106             "ScanHR",
 107             "CodeRoots",
 108             "ObjCopy",
 109             "Termination",
 110             "StringDedupQueueFixup",
 111             "StringDedupTableFixup",
 112             "RedirtyCards",
 113             "ParFreeCSet",
 114             "NonYoungFreeCSet",
 115             "YoungFreeCSet",
 116             "RebuildFreeList"
 117         );
 118 


  75         recording.enable(EventNames.GCPhaseParallel);
  76         recording.start();
  77 
  78         // create more weak garbage than can fit in this heap (-Xmx20m), will force collection of weak references
  79         weakRefs = range(1, 30)
  80             .mapToObj(n -> new WeakReference<>(new byte[1_000_000]))
  81             .collect(toList()); // force evaluation of lazy stream (all weak refs must be created)
  82 
  83         final var MEG = 1024 * 1024;
  84         MixedGCProvoker.allocateAndProvokeMixedGC(MEG);
  85         recording.stop();
  86 
  87         Set<String> usedPhases = fromRecording(recording).stream()
  88             .map(e -> e.getValue("name").toString())
  89             .collect(toSet());
  90 
  91         Set<String> allPhases = of(
  92             "ExtRootScan",
  93             "ThreadRoots",
  94             "UniverseRoots",

  95             "ObjectSynchronizerRoots",
  96             "ManagementRoots",
  97             "VM Global",
  98             "JNI Global",
  99             "CLDGRoots",
 100             "JVMTIRoots",
 101             "CMRefRoots",
 102             "MergeER",
 103             "MergeHCC",
 104             "MergeRS",
 105             "MergeLB",
 106             "ScanHR",
 107             "CodeRoots",
 108             "ObjCopy",
 109             "Termination",
 110             "StringDedupQueueFixup",
 111             "StringDedupTableFixup",
 112             "RedirtyCards",
 113             "ParFreeCSet",
 114             "NonYoungFreeCSet",
 115             "YoungFreeCSet",
 116             "RebuildFreeList"
 117         );
 118 
< prev index next >