use of com.oracle.svm.core.log.Log in project graal by oracle.
the class VMThreadCounterOperation method tearDownIsolateThreads.
/**
* Have each thread, except this one, tear itself down.
*/
private static boolean tearDownIsolateThreads() {
final Log trace = Log.noopLog().string("[JavaThreads.tearDownIsolateThreads:").newline().flush();
/* Prevent new threads from starting. */
VMThreads.singleton().setTearingDown();
/* Make a list of all the threads. */
final ArrayList<Thread> threadList = new ArrayList<>();
ThreadListOperation operation = new ThreadListOperation(threadList);
operation.enqueue();
/* Interrupt the other threads. */
for (Thread thread : threadList) {
if (thread == Thread.currentThread()) {
continue;
}
if (thread != null) {
trace.string(" interrupting: ").string(thread.getName()).newline().flush();
thread.interrupt();
}
}
final boolean result = waitForTearDown();
trace.string(" returns: ").bool(result).string("]").newline().flush();
return result;
}
use of com.oracle.svm.core.log.Log in project graal by oracle.
the class MetricsLogUtils method logCounterMetric.
public static void logCounterMetric(String category, String value) {
Log log = Log.log();
log.spaces(INDENT_LEVEL_2);
log.string(category, CATEGORY_FILL, Log.LEFT_ALIGN).string(value, VALUE_FILL, Log.RIGHT_ALIGN).string("#", UNIT_FILL, Log.RIGHT_ALIGN).newline();
}
use of com.oracle.svm.core.log.Log in project graal by oracle.
the class MetricsLogUtils method logConfig.
public static void logConfig(String category, String value) {
Log log = Log.log();
log.spaces(INDENT_LEVEL_2);
log.string(category, CATEGORY_FILL, Log.LEFT_ALIGN).string(value, VALUE_FILL, Log.RIGHT_ALIGN).newline();
}
use of com.oracle.svm.core.log.Log in project graal by oracle.
the class MetricsLogUtils method logPercentMetric.
public static void logPercentMetric(String category, String value) {
Log log = Log.log();
log.spaces(INDENT_LEVEL_2);
log.string(category, CATEGORY_FILL, Log.LEFT_ALIGN).string(value, VALUE_FILL, Log.RIGHT_ALIGN).string("%", UNIT_FILL, Log.RIGHT_ALIGN).newline();
}
use of com.oracle.svm.core.log.Log in project graal by oracle.
the class MetricsLogUtils method logMemoryMetric.
public static void logMemoryMetric(String category, UnsignedWord bytes, MemoryUnit unit) {
Log log = Log.log();
log.spaces(INDENT_LEVEL_2);
log.string(category, CATEGORY_FILL, Log.LEFT_ALIGN).unsigned(bytesToUnit(bytes, unit), VALUE_FILL, Log.RIGHT_ALIGN).string(unit.symbol(), UNIT_FILL, Log.RIGHT_ALIGN).newline();
}
Aggregations