VM_TypeReference theTypeRef = VM_TypeReference.findOrCreate(VM_BootstrapClassLoader.getBootstrapClassLoader(), VM_Atom.findOrCreateAsciiAtom("Lcom/ibm/jikesrvm/opt/OPT_OptimizationPlanner;")); VM_Type theType = theTypeRef.peekResolvedType(); if (theType != null && theType.asClass().isInitialized()) { OPT_OptimizationPlanner.generateOptimizingCompilerSubsystemReport(explain); } else { VM.sysWrite("\n\tNot generating Optimizing Compiler SubSystem Report because \n"); VM.sysWrite("\tthe opt compiler was never invoked.\n\n");
if (VM.BuildForAdaptiveSystem) {  VM_TypeReference theTypeRef = VM_TypeReference.findOrCreate(VM_BootstrapClassLoader.getBootstrapClassLoader(), VM_Atom.findOrCreateAsciiAtom("Lcom/ibm/jikesrvm/opt/OPT_OptimizationPlanner;")); VM_Type theType = theTypeRef.peekResolvedType(); if (theType != null && theType.asClass().isInitialized()) { OPT_OptimizationPlanner.generateOptimizingCompilerSubsystemReport(explain); } else { VM.sysWrite("\n\tNot generating Optimizing Compiler SubSystem Report because \n"); VM.sysWrite("\tthe opt compiler was never invoked.\n\n"); }
  public static void report (boolean explain) {     VM.sysWrite("\n\t\tCompilation Subsystem Report\n");    VM.sysWrite("Comp\t#Meths\tTime\tbcb/ms\tmcb/bcb\tMCKB\tBCKB\n");    for (int i=0; i<=name.length-1; i++) {      if (totalMethods[i]>0) {        VM.sysWrite(name[i]);        // Number of methods        VM.sysWrite(totalMethods[i]);        VM.sysWrite("\t");        // Compilation time        VM.sysWrite(totalCompTime[i]);        VM.sysWrite("\t");        if (i == JNI_COMPILER) {          VM.sysWrite("NA");        } else {          // Bytecode bytes per millisecond,           //  use unweighted geomean           VM.sysWrite(Math.exp(totalLogOfRates[i] / totalLogValueMethods[i]), 2);        }        VM.sysWrite("\t");        // Ratio of machine code bytes to bytecode bytes        if (i != JNI_COMPILER) {          VM.sysWrite((double)(totalMCLength[i] << LG_INSTRUCTION_WIDTH)/(double)totalBCLength[i], 2);        } else {          VM.sysWrite("NA");        }        VM.sysWrite("\t");        // Generated machine code Kbytes        VM.sysWrite((double)(totalMCLength[i] << LG_INSTRUCTION_WIDTH)/1024, 1);        VM.sysWrite("\t");        // Compiled bytecode Kbytes        if (i != JNI_COMPILER) {          VM.sysWrite((double)totalBCLength[i]/1024, 1);         } else {          VM.sysWrite("NA");        }        VM.sysWrite("\n");      }    }    if (explain) {      // Generate an explanation of the metrics reported      VM.sysWrite("\t\t\tExplanation of Metrics\n");      VM.sysWrite("#Meths:\t\tTotal number of methods compiled by the compiler\n");      VM.sysWrite("Time:\t\tTotal compilation time in milliseconds\n");      VM.sysWrite("bcb/ms:\t\tNumber of bytecode bytes complied per millisecond\n");      VM.sysWrite("mcb/bcb:\tRatio of machine code bytes to bytecode bytes\n");      VM.sysWrite("MCKB:\t\tTotal number of machine code bytes generated in kilobytes\n");      VM.sysWrite("BCKB:\t\tTotal number of bytecode bytes compiled in kilobytes\n");    }    VM_BaselineCompiler.generateBaselineCompilerSubsystemReport(explain);    //-#if RVM_WITH_ADAPTIVE_SYSTEM     // Get the opt's report    VM_TypeReference theTypeRef = VM_TypeReference.findOrCreate(VM_BootstrapClassLoader.getBootstrapClassLoader(),                                                                VM_Atom.findOrCreateAsciiAtom("Lcom/ibm/jikesrvm/opt/OPT_OptimizationPlanner;"));    VM_Type theType = theTypeRef.peekResolvedType();    if (theType != null && theType.asClass().isInitialized()) {      OPT_OptimizationPlanner.generateOptimizingCompilerSubsystemReport(explain);    } else {      VM.sysWrite("\n\tNot generating Optimizing Compiler SubSystem Report because \n");      VM.sysWrite("\tthe opt compiler was never invoked.\n\n");    }    //-#endif  }