-
Enhancement
-
Resolution: Fixed
-
P4
-
23
-
b09
In PointerFinder we have the following code to determine if a pointer is in a TLAB:
if (VM.getVM().getUseTLAB()) {
// Try to find thread containing it
for (int i = 0; i < threads.getNumberOfThreads(); i++) {
JavaThread t = threads.getJavaThreadAt(i);
ThreadLocalAllocBuffer tlab = t.tlab();
if (tlab.contains(a)) {
loc.inTLAB = true;
loc.tlabThread = t;
loc.tlab = tlab;
break;
}
}
However, it is nested in a block of code that is only executed for the SerialGC. It should work for all GCs, and moving it outside of the SerialGC block should accomplish that.
if (VM.getVM().getUseTLAB()) {
// Try to find thread containing it
for (int i = 0; i < threads.getNumberOfThreads(); i++) {
JavaThread t = threads.getJavaThreadAt(i);
ThreadLocalAllocBuffer tlab = t.tlab();
if (tlab.contains(a)) {
loc.inTLAB = true;
loc.tlabThread = t;
loc.tlab = tlab;
break;
}
}
However, it is nested in a block of code that is only executed for the SerialGC. It should work for all GCs, and moving it outside of the SerialGC block should accomplish that.