Skip to content

Commit

Permalink
Showing 4 changed files with 5 additions and 9 deletions.
Original file line number Diff line number Diff line change
@@ -288,7 +288,7 @@ public void completeBuild(InterpreterContext interpreterContext) {

// Unlike JIT in MixedMode this will always successfully build but if using executor pool it may take a while
// and replace interpreterContext asynchronously.
protected void promoteToFullBuild(ThreadContext context) {
private void promoteToFullBuild(ThreadContext context) {
Ruby runtime = context.runtime;

if (runtime.isBooting() && !Options.JIT_KERNEL.load()) return; // don't Promote to full build during runtime boot
Original file line number Diff line number Diff line change
@@ -285,7 +285,6 @@ protected void tryJit(ThreadContext context, DynamicMethodBox box) {
synchronized (this) {
if (box.callCount >= 0) {
if (box.callCount++ >= Options.JIT_THRESHOLD.load()) {
box.callCount = -1;
context.runtime.getJITCompiler().buildThresholdReached(context, this);
}
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package org.jruby.runtime;

import java.io.ByteArrayOutputStream;
import org.jruby.RubyModule;
import org.jruby.EvalType;
import org.jruby.compiler.Compilable;
import org.jruby.ir.IRClosure;
import org.jruby.ir.IRScope;
@@ -14,8 +14,6 @@
import org.jruby.util.log.Logger;
import org.jruby.util.log.LoggerFactory;

import java.io.ByteArrayOutputStream;

public class InterpretedIRBlockBody extends IRBlockBody implements Compilable<InterpreterContext> {
private static final Logger LOG = LoggerFactory.getLogger(InterpretedIRBlockBody.class);
protected boolean pushScope;
@@ -155,7 +153,7 @@ protected IRubyObject commonYieldPath(ThreadContext context, Block block, Block.

// Unlike JIT in MixedMode this will always successfully build but if using executor pool it may take a while
// and replace interpreterContext asynchronously.
protected void promoteToFullBuild(ThreadContext context) {
private void promoteToFullBuild(ThreadContext context) {
if (context.runtime.isBooting() && !Options.JIT_KERNEL.load()) return; // don't Promote to full build during runtime boot

if (callCount++ >= Options.JIT_THRESHOLD.load()) context.runtime.getJITCompiler().buildThresholdReached(context, this);
Original file line number Diff line number Diff line change
@@ -17,7 +17,7 @@
import java.io.ByteArrayOutputStream;

public class MixedModeIRBlockBody extends IRBlockBody implements Compilable<CompiledIRBlockBody> {
private static final Logger LOG = LoggerFactory.getLogger(InterpretedIRBlockBody.class);
private static final Logger LOG = LoggerFactory.getLogger(MixedModeIRBlockBody.class);
protected boolean pushScope;
protected boolean reuseParentScope;
private boolean displayedCFG = false; // FIXME: Remove when we find nicer way of logging CFG
@@ -160,7 +160,7 @@ protected IRubyObject commonYieldPath(ThreadContext context, Block block, Block.
}
}

protected void promoteToFullBuild(ThreadContext context) {
private void promoteToFullBuild(ThreadContext context) {
if (context.runtime.isBooting() && !Options.JIT_KERNEL.load()) return; // don't JIT during runtime boot

if (callCount >= 0) {
@@ -182,7 +182,6 @@ protected void promoteToFullBuild(ThreadContext context) {
if (callCount < 0) return;

if (callCount++ >= Options.JIT_THRESHOLD.load()) {
callCount = -1;
context.runtime.getJITCompiler().buildThresholdReached(context, this);
}
}

0 comments on commit c60643a

Please sign in to comment.