Details
-
Type:
Task
-
Status:
Closed
-
Priority:
Minor
-
Resolution: Won't Fix
-
Affects Version/s: None
-
Fix Version/s: 2.9.2
-
Component/s: Compiler: Optimizing
-
Labels:None
-
Number of attachments :
Description
See VM_BaselineBootImageCompiler.compileMethod for TODO item.
It's a simple change (see below) but trying to see the performance difference is hard as it only really effects Base? builds. This is well off the normal performance path so I'm going to lower its priority.
Index: rvm/src/org/jikesrvm/compilers/baseline/VM_BaselineBootImageCompiler.java
===================================================================
— rvm/src/org/jikesrvm/compilers/baseline/VM_BaselineBootImageCompiler.java (revision 13688)
+++ rvm/src/org/jikesrvm/compilers/baseline/VM_BaselineBootImageCompiler.java (working copy)
@@ -47,6 +47,7 @@
*/
protected VM_CompiledMethod compileMethod(VM_NormalMethod method, VM_TypeReference[] params) { + long startTime = VM.BuildForAdaptiveSystem ? System.nanoTime() : 0; VM_CompiledMethod cm; VM_Callbacks.notifyMethodCompile(method, VM_CompiledMethod.BASELINE); cm = VM_BaselineCompiler.compile(method); @@ -57,7 +58,8 @@ // but 1 millisecond granularity isn't good enough because the // the baseline compiler is just too fast. // TODO: Try Using System.nanoTime() instead - double compileTime = method.getBytecodeLength() / VM_CompilerDNA.getBaselineCompilationRate(); + double compileTime = (double)(System.nanoTime() - startTime); + //method.getBytecodeLength() / VM_CompilerDNA.getBaselineCompilationRate(); cm.setCompilationTime(compileTime); }
return cm;