use of com.oracle.svm.core.log.Log in project graal by oracle.
the class Deoptimizer method logRecentDeoptimizationEvents.
public static void logRecentDeoptimizationEvents(Log log) {
log.string("== [Recent Deoptimizer Events: ").newline();
recentDeoptimizationEvents.foreach(log, (context, entry) -> {
Log l = (Log) context;
char[] chars = SubstrateUtil.getRawStringChars(entry);
for (int i = 0; i < entry.length(); i++) {
char c = chars[i];
if (c == '\n') {
l.newline();
} else {
l.character(c);
}
}
});
log.string("]").newline();
}
use of com.oracle.svm.core.log.Log in project graal by oracle.
the class Space method cleanRememberedSetAlignedHeapChunks.
private void cleanRememberedSetAlignedHeapChunks() {
final Log trace = Log.noopLog().string("[SpaceImpl.cleanAlignedHeapChunks:").string(" space: ").string(getName());
/* Visit the aligned chunks. */
/* TODO: Should there be a ChunkVisitor? */
AlignedHeapChunk.AlignedHeader aChunk = getFirstAlignedHeapChunk();
while (aChunk.isNonNull()) {
trace.newline().string(" aChunk: ").hex(aChunk);
AlignedHeapChunk.cleanRememberedSetOfAlignedHeapChunk(aChunk);
aChunk = aChunk.getNext();
}
trace.string("]").newline();
}
use of com.oracle.svm.core.log.Log in project graal by oracle.
the class Space method allocateMemory.
/**
* Allocate memory from an AlignedHeapChunk in this Space.
*
* This is "slow-path" memory allocation.
*/
private Pointer allocateMemory(UnsignedWord objectSize) {
final Log trace = Log.noopLog().string("[SpaceImpl.allocateMemory:").string(" space: ").string(getName()).string(" size: ").unsigned(objectSize).newline();
Pointer result = WordFactory.nullPointer();
/* First try allocating in the last chunk. */
final AlignedHeapChunk.AlignedHeader oldChunk = getLastAlignedHeapChunk();
trace.string(" oldChunk: ").hex(oldChunk);
if (oldChunk.isNonNull()) {
result = AlignedHeapChunk.allocateMemory(oldChunk, objectSize);
trace.string(" oldChunk provides: ").hex(result);
}
/* If oldChunk did not provide, try allocating a new chunk for the requested memory. */
if (result.isNull()) {
final AlignedHeapChunk.AlignedHeader newChunk = requestAlignedHeapChunk();
trace.string(" newChunk: ").hex(newChunk);
if (newChunk.isNonNull()) {
/* Allocate the Object within the new chunk. */
result = AlignedHeapChunk.allocateMemory(newChunk, objectSize);
trace.string(" newChunk provides: ").hex(result);
}
}
trace.string(" returns: ").hex(result).string("]").newline();
return result;
}
use of com.oracle.svm.core.log.Log in project graal by oracle.
the class SpaceVerifierImpl method verifyAlignedChunks.
private boolean verifyAlignedChunks() {
final Log trace = HeapImpl.getHeapImpl().getHeapVerifierImpl().getTraceLog().string("[SpaceVerifierImpl.VerifierImpl.verifyAlignedChunks:");
boolean result = true;
AlignedHeapChunk.AlignedHeader chunk = space.getFirstAlignedHeapChunk();
while (chunk.isNonNull()) {
result &= AlignedHeapChunk.verifyAlignedHeapChunk(chunk);
chunk = chunk.getNext();
}
trace.string(" returns: ").bool(result).string("]").newline();
return result;
}
use of com.oracle.svm.core.log.Log in project graal by oracle.
the class SpaceVerifierImpl method verifyOnlyCleanUnalignedChunks.
private boolean verifyOnlyCleanUnalignedChunks() {
final Log trace = HeapImpl.getHeapImpl().getHeapVerifierImpl().getTraceLog().string("[SpaceVerifierImpl.verifyOnlyCleanUnalignedChunks:").newline();
boolean result = true;
UnalignedHeapChunk.UnalignedHeader chunk = space.getFirstUnalignedHeapChunk();
while (chunk.isNonNull()) {
result &= UnalignedHeapChunk.verifyOnlyCleanCardsOfUnalignedHeapChunk(chunk);
chunk = chunk.getNext();
}
trace.string(" returns: ").bool(result).string("]").newline();
return result;
}
Aggregations