public class JITCompiler extends java.lang.Object implements JITCompilerMBean
| Modifier and Type | Class and Description |
|---|---|
static class |
JITCompiler.JITClassGenerator |
static class |
JITCompiler.JITCounts |
private class |
JITCompiler.JITTask |
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
CLASS_METHOD_DELIMITER |
private RubyInstanceConfig |
config |
private JITCompiler.JITCounts |
counts |
private java.util.concurrent.ExecutorService |
executor |
private static Logger |
LOG |
static java.lang.String |
RUBY_JIT_PREFIX |
private Ruby |
runtime |
| Constructor and Description |
|---|
JITCompiler(Ruby runtime) |
| Modifier and Type | Method and Description |
|---|---|
private static java.lang.String |
calculateFilename(ArgsNode argsNode,
Node bodyNode) |
CompiledBlockCallback |
compileBlock(ThreadContext context,
StandardASMCompiler asmCompiler,
IterNode iterNode) |
CompiledBlockCallback19 |
compileBlock19(ThreadContext context,
StandardASMCompiler asmCompiler,
IterNode iterNode) |
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() |
private void |
jitThresholdReached(DefaultMethod method,
RubyInstanceConfig config,
ThreadContext context,
java.lang.String className,
java.lang.String methodName) |
(package private) static void |
log(DefaultMethod method,
java.lang.String name,
java.lang.String message,
java.lang.String... reason) |
BlockBody |
newCompiledBlockBody(ThreadContext context,
IterNode iterNode,
Arity arity,
int argumentType) |
BlockBody |
newCompiledBlockBody19(ThreadContext context,
IterNode iterNode) |
Block |
newCompiledClosure(ThreadContext context,
IterNode iterNode,
IRubyObject self) |
void |
tearDown() |
void |
tryJIT(DefaultMethod method,
ThreadContext context,
java.lang.String className,
java.lang.String methodName) |
private static final Logger LOG
public static final java.lang.String RUBY_JIT_PREFIX
public static final java.lang.String CLASS_METHOD_DELIMITER
private final JITCompiler.JITCounts counts
private final java.util.concurrent.ExecutorService executor
private final Ruby runtime
private final RubyInstanceConfig config
public JITCompiler(Ruby runtime)
public long getSuccessCount()
getSuccessCount in interface JITCompilerMBeanpublic long getCompileCount()
getCompileCount in interface JITCompilerMBeanpublic long getFailCount()
getFailCount in interface JITCompilerMBeanpublic long getCompileTime()
getCompileTime in interface JITCompilerMBeanpublic long getAbandonCount()
getAbandonCount in interface JITCompilerMBeanpublic long getCodeSize()
getCodeSize in interface JITCompilerMBeanpublic long getAverageCodeSize()
getAverageCodeSize in interface JITCompilerMBeanpublic long getAverageCompileTime()
getAverageCompileTime in interface JITCompilerMBeanpublic long getLargestCodeSize()
getLargestCodeSize in interface JITCompilerMBeanpublic void tryJIT(DefaultMethod method, ThreadContext context, java.lang.String className, java.lang.String methodName)
public void tearDown()
private void jitThresholdReached(DefaultMethod method, RubyInstanceConfig config, ThreadContext context, java.lang.String className, java.lang.String methodName)
public static java.lang.String getHashForString(java.lang.String str)
public static java.lang.String getHashForBytes(byte[] bytes)
public Block newCompiledClosure(ThreadContext context, IterNode iterNode, IRubyObject self)
public BlockBody newCompiledBlockBody(ThreadContext context, IterNode iterNode, Arity arity, int argumentType)
public BlockBody newCompiledBlockBody19(ThreadContext context, IterNode iterNode)
public CompiledBlockCallback compileBlock(ThreadContext context, StandardASMCompiler asmCompiler, IterNode iterNode)
public CompiledBlockCallback19 compileBlock19(ThreadContext context, StandardASMCompiler asmCompiler, IterNode iterNode)
static void log(DefaultMethod method, java.lang.String name, java.lang.String message, java.lang.String... reason)