org.jruby.compiler
Class JITCompiler

java.lang.Object
  extended by org.jruby.compiler.JITCompiler
All Implemented Interfaces:
JITCompilerMBean

public class JITCompiler
extends java.lang.Object
implements JITCompilerMBean


Nested Class Summary
static class JITCompiler.JITClassGenerator
           
static class JITCompiler.JITCounts
           
 
Field Summary
static java.lang.String RUBY_JIT_PREFIX
           
static boolean USE_CACHE
           
 
Constructor Summary
JITCompiler(Ruby ruby)
           
 
Method Summary
 long getAbandonCount()
           
 long getAverageCodeSize()
           
 long getAverageCompileTime()
           
 long getCodeSize()
           
 long getCompileCount()
           
 long getCompileTime()
           
 long getFailCount()
           
static java.lang.String getHashForBytes(byte[] bytes)
           
static java.lang.String getHashForString(java.lang.String str)
           
 long getLargestCodeSize()
           
 long getSuccessCount()
           
static void saveToCodeCache(Ruby ruby, byte[] bytecode, java.lang.String packageName, java.io.File cachedClassFile)
           
 DynamicMethod tryJIT(DefaultMethod method, ThreadContext context, java.lang.String name)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

USE_CACHE

public static final boolean USE_CACHE
See Also:
Constant Field Values

RUBY_JIT_PREFIX

public static final java.lang.String RUBY_JIT_PREFIX
See Also:
Constant Field Values
Constructor Detail

JITCompiler

public JITCompiler(Ruby ruby)
Method Detail

tryJIT

public DynamicMethod tryJIT(DefaultMethod method,
                            ThreadContext context,
                            java.lang.String name)

getHashForString

public static java.lang.String getHashForString(java.lang.String str)

getHashForBytes

public static java.lang.String getHashForBytes(byte[] bytes)

saveToCodeCache

public static void saveToCodeCache(Ruby ruby,
                                   byte[] bytecode,
                                   java.lang.String packageName,
                                   java.io.File cachedClassFile)

getSuccessCount

public long getSuccessCount()
Specified by:
getSuccessCount in interface JITCompilerMBean

getCompileCount

public long getCompileCount()
Specified by:
getCompileCount in interface JITCompilerMBean

getFailCount

public long getFailCount()
Specified by:
getFailCount in interface JITCompilerMBean

getCompileTime

public long getCompileTime()
Specified by:
getCompileTime in interface JITCompilerMBean

getAbandonCount

public long getAbandonCount()
Specified by:
getAbandonCount in interface JITCompilerMBean

getCodeSize

public long getCodeSize()
Specified by:
getCodeSize in interface JITCompilerMBean

getAverageCodeSize

public long getAverageCodeSize()
Specified by:
getAverageCodeSize in interface JITCompilerMBean

getAverageCompileTime

public long getAverageCompileTime()
Specified by:
getAverageCompileTime in interface JITCompilerMBean

getLargestCodeSize

public long getLargestCodeSize()
Specified by:
getLargestCodeSize in interface JITCompilerMBean


Copyright © 2002-2009 JRuby Team. All Rights Reserved.