當前位置: 首頁>>代碼示例>>Java>>正文


Java Log.print方法代碼示例

本文整理匯總了Java中com.sun.max.vm.Log.print方法的典型用法代碼示例。如果您正苦於以下問題:Java Log.print方法的具體用法?Java Log.print怎麽用?Java Log.print使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在com.sun.max.vm.Log的用法示例。


在下文中一共展示了Log.print方法的11個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: logFlags

import com.sun.max.vm.Log; //導入方法依賴的package包/類
private static void logFlags(int flags) {
    Log.print('{');
    boolean first = true;
    for (int i = rflags.length - 1; i >= 0; i--) {
        int mask = 1 << i;
        if ((flags & mask) != 0) {
            final String flag = rflags[i];
            if (flag != null) {
                if (!first) {
                    Log.print(", ");
                } else {
                    first = false;
                }
                Log.print(flag);
            }
        }
    }
    Log.print('}');
}
 
開發者ID:beehive-lab,項目名稱:Maxine-VM,代碼行數:20,代碼來源:ARMTrapFrameAccess.java

示例2: log

import com.sun.max.vm.Log; //導入方法依賴的package包/類
/**
 * Prints the monitor state encoded in a {@code ThinLockword64} to the {@linkplain Log log} stream.
 */
public static void log(ThinLockword64 lockword) {
    Log.print("ThinLockword64: ");
    if (lockword.isInflated()) {
        Log.print("inflated=true");
    } else {
        Log.print("inflated=false");
        Log.print(" locked=");
        Log.print(!lockword.equals(lockword.asUnlocked()));
        Log.print(" recursion=");
        Log.print(lockword.getRecursionCount());
        Log.print(" util=");
        Log.print(lockword.getUtil());
        Log.print(" threadID=");
        Log.print(lockword.getThreadID());
        Log.print(" hash=");
        Log.print(lockword.getHashcode());
    }
}
 
開發者ID:beehive-lab,項目名稱:Maxine-VM,代碼行數:22,代碼來源:ThinLockword64.java

示例3: traceInstrument

import com.sun.max.vm.Log; //導入方法依賴的package包/類
@Override
protected void traceInstrument(ClassMethodActor methodActor, boolean include) {
    Log.print("VMA: ");
    Log.print(methodActor);
    Log.print(" instrumented: ");
    Log.println(include);
}
 
開發者ID:beehive-lab,項目名稱:Maxine-VM,代碼行數:8,代碼來源:VMAOptions.java

示例4: traceBytecodeSetting

import com.sun.max.vm.Log; //導入方法依賴的package包/類
@Override
protected void traceBytecodeSetting(VMABytecodes bytecode, boolean before, boolean after) {
    if (before || after) {
        Log.print("VMA: ");
        Log.print(bytecode.name());
        Log.print(" setting: ");
        Log.print(before ? "BEFORE" : "");
        Log.print("/");
        Log.println(after ? "AFTER" : "");
    }
}
 
開發者ID:beehive-lab,項目名稱:Maxine-VM,代碼行數:12,代碼來源:VMAOptions.java

示例5: log

import com.sun.max.vm.Log; //導入方法依賴的package包/類
/**
 * Prints the monitor state encoded in a {@code HashableLockword64} to the {@linkplain Log log} stream.
 */
public static void log(HashableLockword64 lockword) {
    Log.print("HashableLockword64: ");
    if (lockword.isInflated()) {
        Log.print("inflated=true");
    } else {
        Log.print("inflated=false");
        Log.print(" hash=");
        Log.print(lockword.getHashcode());
    }
}
 
開發者ID:beehive-lab,項目名稱:Maxine-VM,代碼行數:14,代碼來源:HashableLockword64.java

示例6: run

import com.sun.max.vm.Log; //導入方法依賴的package包/類
public void run() {
    while (true) {
        // Xen gives us the target in units of 1K
        final long target = toPages(HeapPool.toUnit(GUK.guk_watch_memory_target() * 1024));
        if (target != _current) {
            if (_log) {
                Log.print("PhysicalPagePool.watchTarget, current: "); logMB(_current, false); Log.print(", target: ");  logMB(target, true);
                logState();
            }
            long change = target - _current;
            if (target > _current) {
                change = GUKPagePool.increasePagePool(change);
                VMConfiguration.vmConfig().heapScheme().increaseMemory(Size.fromLong(toBytes(change)));
            } else {
                change = _current - target;
                VMConfiguration.vmConfig().heapScheme().decreaseMemory(Size.fromLong(toBytes(change)));
                long possibleDecrease = GUKPagePool.decreaseablePagePool();
                if (possibleDecrease > 0) {
                    // keep decrease in heap units
                    possibleDecrease = toPages(HeapPool.toUnit(toBytes(possibleDecrease)));
                    GUKPagePool.decreasePagePool(possibleDecrease <= change ? possibleDecrease : change);
                }
                change = -possibleDecrease;
            }
            _current += change;
            if (_log) {
                Log.print("PhysicalPagePool..watchTarget, change: "); logMB(change, false); Log.print(", current: "); logMB(_current, true);
                GUKPagePool.logState();
            }
        }
    }
}
 
開發者ID:SnakeDoc,項目名稱:GuestVM,代碼行數:33,代碼來源:GUKPagePool.java

示例7: logMB

import com.sun.max.vm.Log; //導入方法依賴的package包/類
private static void logMB(long n, boolean nl) {
    Log.print(toMB(n));
    Log.print("MB");
    if (nl) {
        Log.println();
    }
}
 
開發者ID:SnakeDoc,項目名稱:GuestVM,代碼行數:8,代碼來源:GUKPagePool.java

示例8: log

import com.sun.max.vm.Log; //導入方法依賴的package包/類
static void log(String s) {
    if (!_init) {
        _log = System.getProperty("max.ve.util.tlp.debug") != null;
        _init = true;
    }
    if (_log) {
        Log.print(Thread.currentThread()); Log.print(' '); Log.println(s);
    }
}
 
開發者ID:SnakeDoc,項目名稱:GuestVM,代碼行數:10,代碼來源:TimeLimitedProc.java

示例9: traceJdkDeopt

import com.sun.max.vm.Log; //導入方法依賴的package包/類
@Override
protected void traceJdkDeopt(String stage) {
    Log.print("VMA: JDKDeopt: ");
    Log.println(stage);
}
 
開發者ID:beehive-lab,項目名稱:Maxine-VM,代碼行數:6,代碼來源:VMAOptions.java

示例10: initializeFail

import com.sun.max.vm.Log; //導入方法依賴的package包/類
private static void initializeFail(String s1, Pointer path, String s2) {
    Log.print(s1);
    Log.printCString(path);
    Log.println(s2);
    MaxineVM.native_exit(1);
}
 
開發者ID:beehive-lab,項目名稱:Maxine-VM,代碼行數:7,代碼來源:JVMTI.java

示例11: trace

import com.sun.max.vm.Log; //導入方法依賴的package包/類
/**
 * Recreates the original style of trace output that was explicitly generated prior to {@link VMLogger}. The
 * different trace modes are encoded in log argument 1. Downcall, Invoke, DynamicLink and RegisterNativeMethod
 * operations log the {@link MethodID} of the method in log argument 2. This is converted back to a
 * {@link String} here.
 */
@Override
protected void trace(Record r) {
    int op = r.getOperation();
    int mode = r.getArg(1).asAddress().toInt();
    boolean entry = (mode & ENTRY_BIT) != 0;
    Log.print("[Thread \"");
    Log.print(toVmThreadName(r.getThreadId()));
    Log.print("\" ");
    Log.print(entry ? "-->" : "<--");
    Log.print(" JNI ");
    if (mode <= UPCALL_ENTRY.asAddress().toInt()) {
        Log.print("upcall: ");
        Log.print(operationName(op));
        if (entry) {
            Pointer anchor = r.getArg(2).asPointer();
            Pointer jniStubAnchor = JavaFrameAnchor.PREVIOUS.get(anchor);
            final Address jniStubPC = jniStubAnchor.isZero() ? Address.zero() : JavaFrameAnchor.PC.get(jniStubAnchor).asAddress();
            if (!jniStubPC.isZero()) {
                final TargetMethod nativeMethod = CodePointer.from(jniStubPC).toTargetMethod();
                Log.print(", last down call: ");
                FatalError.check(nativeMethod != null, "Could not find Java down call when entering JNI upcall");
                Log.print(nativeMethod.classMethodActor().name.string);
            } else {
                Log.print(", called from attached native thread");
            }
        }
    } else {
        String opName = null;
        Address address = Address.zero();
        if ((mode & INVOKE_BIT) != 0) {
            opName = "invoke";
        } else if ((mode & DOWNCALL_BIT) != 0) {
            opName = "downcall";
        } else if ((mode & LINK_BIT) != 0) {
            address = r.getArg(3).asAddress();
            opName = "dynamic-link";
        } else if ((mode & REGISTER_BIT) != 0) {
            address = r.getArg(3).asAddress();
            opName = address.isZero() ? "unregister" : "register";
        }

        Log.print(opName);
        Log.print(": ");
        MethodActor methodActor = MethodID.toMethodActor(MethodID.fromWord(r.getArg(2)));
        // Note: do not use "format" method, since we might be at a place where memory allocation is not possible
        // (for example, at the JNI call to synchronize before a GC)
        Log.print(methodActor.holder().name);
        Log.print('.');
        Log.print(methodActor.name);

        if (address.isNotZero()) {
            Log.print(" = ");
            Log.printSymbol(address);
        }
    }
    Log.println("]");
}
 
開發者ID:beehive-lab,項目名稱:Maxine-VM,代碼行數:64,代碼來源:JniFunctions.java


注:本文中的com.sun.max.vm.Log.print方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。