Search in sources :

Example 6 with Log

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;
}
Also used : Log(com.oracle.svm.core.log.Log) ArrayList(java.util.ArrayList) IsolateThread(org.graalvm.nativeimage.IsolateThread)

Example 7 with Log

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();
}
Also used : Log(com.oracle.svm.core.log.Log)

Example 8 with Log

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();
}
Also used : Log(com.oracle.svm.core.log.Log)

Example 9 with Log

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();
}
Also used : Log(com.oracle.svm.core.log.Log)

Example 10 with Log

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();
}
Also used : Log(com.oracle.svm.core.log.Log)

Aggregations

Log (com.oracle.svm.core.log.Log)130 Pointer (org.graalvm.word.Pointer)30 UnsignedWord (org.graalvm.word.UnsignedWord)30 IsolateThread (org.graalvm.nativeimage.IsolateThread)4 CodePointer (org.graalvm.nativeimage.c.function.CodePointer)4 Uninterruptible (com.oracle.svm.core.annotate.Uninterruptible)3 CollectionWatcher (com.oracle.svm.core.heap.CollectionWatcher)3 DiscoverableReference (com.oracle.svm.core.heap.DiscoverableReference)3 XOptions (com.oracle.svm.core.option.XOptions)3 AlwaysInline (com.oracle.svm.core.annotate.AlwaysInline)2 CEntryPointOptions (com.oracle.svm.core.c.function.CEntryPointOptions)2 KnownIntrinsics.readCallerStackPointer (com.oracle.svm.core.snippets.KnownIntrinsics.readCallerStackPointer)2 CEntryPoint (org.graalvm.nativeimage.c.function.CEntryPoint)2 RestrictHeapAccess (com.oracle.svm.core.annotate.RestrictHeapAccess)1 CodeInfoQueryResult (com.oracle.svm.core.code.CodeInfoQueryResult)1 SubstrateInstalledCode (com.oracle.svm.core.deopt.SubstrateInstalledCode)1 AlignedHeader (com.oracle.svm.core.genscavenge.AlignedHeapChunk.AlignedHeader)1 UnalignedHeader (com.oracle.svm.core.genscavenge.UnalignedHeapChunk.UnalignedHeader)1 AllocationFreeList (com.oracle.svm.core.heap.AllocationFreeList)1 NoAllocationVerifier (com.oracle.svm.core.heap.NoAllocationVerifier)1