< prev index next >

src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/oops/ObjectHeap.java

Print this page
rev 49649 : [mq]: heap14


 440         g1h.heapRegionIterate(lrc);
 441     } else {
 442        if (Assert.ASSERTS_ENABLED) {
 443           Assert.that(false, "Expecting GenCollectedHeap, G1CollectedHeap, " +
 444                       "or ParallelScavengeHeap, but got " +
 445                       heap.getClass().getName());
 446        }
 447     }
 448 
 449     // If UseTLAB is enabled, snip out regions associated with TLABs'
 450     // dead regions. Note that TLABs can be present in any generation.
 451 
 452     // FIXME: consider adding fewer boundaries to live region list.
 453     // Theoretically only need to stop at TLAB's top and resume at its
 454     // end.
 455 
 456     if (VM.getVM().getUseTLAB()) {
 457       for (JavaThread thread = VM.getVM().getThreads().first(); thread != null; thread = thread.next()) {
 458         ThreadLocalAllocBuffer tlab = thread.tlab();
 459         if (tlab.start() != null) {
 460           if ((tlab.top() == null) || (tlab.end() == null)) {
 461             System.err.print("Warning: skipping invalid TLAB for thread ");
 462             thread.printThreadIDOn(System.err);
 463             System.err.println();
 464           } else {
 465             if (DEBUG) {
 466               System.err.print("TLAB for " + thread.getThreadName() + ", #");
 467               thread.printThreadIDOn(System.err);
 468               System.err.print(": ");
 469               tlab.printOn(System.err);
 470             }
 471             // Go from:
 472             //  - below start() to start()
 473             //  - start() to top()
 474             //  - end() and above
 475             liveRegions.add(tlab.start());
 476             liveRegions.add(tlab.start());
 477             liveRegions.add(tlab.top());
 478             liveRegions.add(tlab.hardEnd());
 479           }
 480         }




 440         g1h.heapRegionIterate(lrc);
 441     } else {
 442        if (Assert.ASSERTS_ENABLED) {
 443           Assert.that(false, "Expecting GenCollectedHeap, G1CollectedHeap, " +
 444                       "or ParallelScavengeHeap, but got " +
 445                       heap.getClass().getName());
 446        }
 447     }
 448 
 449     // If UseTLAB is enabled, snip out regions associated with TLABs'
 450     // dead regions. Note that TLABs can be present in any generation.
 451 
 452     // FIXME: consider adding fewer boundaries to live region list.
 453     // Theoretically only need to stop at TLAB's top and resume at its
 454     // end.
 455 
 456     if (VM.getVM().getUseTLAB()) {
 457       for (JavaThread thread = VM.getVM().getThreads().first(); thread != null; thread = thread.next()) {
 458         ThreadLocalAllocBuffer tlab = thread.tlab();
 459         if (tlab.start() != null) {
 460           if ((tlab.top() == null) || (tlab.fastPathEnd() == null)) {
 461             System.err.print("Warning: skipping invalid TLAB for thread ");
 462             thread.printThreadIDOn(System.err);
 463             System.err.println();
 464           } else {
 465             if (DEBUG) {
 466               System.err.print("TLAB for " + thread.getThreadName() + ", #");
 467               thread.printThreadIDOn(System.err);
 468               System.err.print(": ");
 469               tlab.printOn(System.err);
 470             }
 471             // Go from:
 472             //  - below start() to start()
 473             //  - start() to top()
 474             //  - end() and above
 475             liveRegions.add(tlab.start());
 476             liveRegions.add(tlab.start());
 477             liveRegions.add(tlab.top());
 478             liveRegions.add(tlab.hardEnd());
 479           }
 480         }


< prev index next >