本文整理汇总了Java中com.sun.max.vm.Log类的典型用法代码示例。如果您正苦于以下问题:Java Log类的具体用法?Java Log怎么用?Java Log使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
Log类属于com.sun.max.vm包,在下文中一共展示了Log类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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('}');
}
示例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());
}
}
示例3: doIt
import com.sun.max.vm.Log; //导入依赖的package包/类
@Override
protected void doIt() {
cellPointerTagger.setOperationMode(cellPointerTagger.pointerIndexTagger.actionMode);
VmThreadLocal.prepareCurrentStackReferenceMap();
Heap.invokeGCCallbacks(Heap.GCCallbackPhase.BEFORE);
if (TraceMaxSimTagging) {
Log.println(cellPointerTagger.pointerIndexTagger.actionMode + " of heap roots.");
}
heapRootsTagger.run();
if (TraceMaxSimTagging) {
Log.println(cellPointerTagger.pointerIndexTagger.actionMode + " of code.");
}
Code.visitCells(cellPointerTagger, true);
if (TraceMaxSimTagging) {
Log.println(cellPointerTagger.pointerIndexTagger.actionMode + " of heap.");
}
VMConfiguration.vmConfig().heapScheme().walkHeap(cellPointerTagger);
Heap.invokeGCCallbacks(Heap.GCCallbackPhase.AFTER);
}
示例4: activate
import com.sun.max.vm.Log; //导入依赖的package包/类
/**
* Activates MaxSim data transformation.
*/
public static void activate() {
if (!MaxSimInterfaceHelpers.isClassIDTagging() || !MaxSimDataTransDB.isPresent()) {
return;
}
String dataTransDBFileName = MaxSimDataTransDB.getValue();
try {
MaxSimInterface.DataTransDB dataTransDB =
MaxSimInterface.DataTransDB.parseFrom(new FileInputStream(dataTransDBFileName));
for (MaxSimInterface.DataTransInfo dataTrans : dataTransDB.getDataTransInfoList()) {
TypeDescriptor td = JavaTypeDescriptor.parseTypeDescriptor(dataTrans.getTypeDesc());
typeDescriptorToDataTransInfoMap.put(td, MaxSimInterface.DataTransInfo.newBuilder(dataTrans));
}
} catch (Exception e) {
Log.println("WARNING: Could not parse file: " + dataTransDBFileName);
Log.println(e);
}
ClassActor.allClassesDo(maxsimDataTransInfoRegistrar);
}
示例5: printMaxineInfoToFile
import com.sun.max.vm.Log; //导入依赖的package包/类
public void printMaxineInfoToFile(String fileName) {
try {
if (fileName == null || fileName.trim().isEmpty()) {
fileName = MaxSimPlatform.MaxSimMaxineInfoFileName.getValue();
}
FileOutputStream output = new FileOutputStream(fileName);
MaxSimInterface.MaxineInfoDB.Builder maxineInfoDB = MaxSimInterface.MaxineInfoDB.newBuilder();
buildMaxineTypesInfo(maxineInfoDB);
buildMaxineMethodsInfo(maxineInfoDB);
buildMaxineDataTransInfo(maxineInfoDB);
buildMaxSimConfig(maxineInfoDB);
maxineInfoDB.build().writeTo(output);
output.close();
} catch (Exception e) {
Log.println("Could not build MaxineInfo. Exception thrown:" + e.toString());
}
}
示例6: 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);
}
示例7: 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" : "");
}
}
示例8: setJVMTIEnv
import com.sun.max.vm.Log; //导入依赖的package包/类
/**
* Called exactly once during agent startup (strictly speaking during jvmtiEnv creation in jvmti.c)
* allowing it to be recorded once here to support the handling of callbacks to the agent.
* @param agentHandle the jvmtienv C struct
*/
public static void setJVMTIEnv(Word agentHandle) {
if (nativeEnvsIndex >= MAX_NATIVE_ENVS) {
Log.println("too many JVMTI agents");
MaxineVM.native_exit(1);
}
NativeEnv nativeEnv = (NativeEnv) jvmtiEnvs[nativeEnvsIndex++];
nativeEnv.cstruct = agentHandle.asPointer();
activeEnvCount++;
}
示例9: setJVMTIJavaEnv
import com.sun.max.vm.Log; //导入依赖的package包/类
/**
* Called to register the environment for a Java JVMTI agent.
* @param env
*/
public static synchronized void setJVMTIJavaEnv(Env env) {
for (int i = MAX_NATIVE_ENVS; i < MAX_ENVS; i++) {
if (jvmtiEnvs[i] == null) {
jvmtiEnvs[i] = env;
activeEnvCount++;
return;
}
}
Log.println("too many JVMTI agents");
MaxineVM.native_exit(1);
}
示例10: checkResult
import com.sun.max.vm.Log; //导入依赖的package包/类
private static Value checkResult(Kind expectedReturnKind, final MethodActor methodActor, Value result) {
if (expectedReturnKind != result.kind()) {
Value zero = expectedReturnKind.zeroValue();
if (CheckJNI) {
Log.println("JNI warning: returning " + zero + " for " + expectedReturnKind + " call to " + methodActor);
}
result = zero;
}
return result;
}
示例11: 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());
}
}
示例12: 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();
}
}
}
}
示例13: 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();
}
}
示例14: 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);
}
}
示例15: traceJdkDeopt
import com.sun.max.vm.Log; //导入依赖的package包/类
@Override
protected void traceJdkDeopt(String stage) {
Log.print("VMA: JDKDeopt: ");
Log.println(stage);
}