8180487: HotSpotResolvedJavaMethod.setNotInlineable() should be renamed to represent actual behavior

Rename setNotInlineable() to setNotInlineableOrCompileable()

Reviewed-by: dnsimon, kvn
This commit is contained in:
Yasumasa Suenaga 2017-05-18 16:31:16 -07:00
parent cd0c6f3398
commit 6e36f51f27
6 changed files with 13 additions and 13 deletions

View File

@ -459,9 +459,9 @@ final class CompilerToVM {
native long getLocalVariableTableStart(HotSpotResolvedJavaMethodImpl method);
/**
* Determines if {@code method} should not be inlined or compiled.
* Sets flags on {@code method} indicating that it should never be inlined or compiled by the VM.
*/
native void doNotInlineOrCompile(HotSpotResolvedJavaMethodImpl method);
native void setNotInlineableOrCompileable(HotSpotResolvedJavaMethodImpl method);
/**
* Invalidates the profiling information for {@code method} and (re)initializes it such that

View File

@ -57,9 +57,9 @@ public interface HotSpotResolvedJavaMethod extends ResolvedJavaMethod {
boolean hasReservedStackAccess();
/**
* Manually adds a DontInline annotation to this method.
* Sets flags on {@code method} indicating that it should never be inlined or compiled by the VM.
*/
void setNotInlineable();
void setNotInlineableOrCompileable();
/**
* Returns true if this method is one of the special methods that is ignored by security stack

View File

@ -318,10 +318,10 @@ final class HotSpotResolvedJavaMethodImpl extends HotSpotMethod implements HotSp
}
/**
* Manually adds a DontInline annotation to this method.
* Sets flags on {@code method} indicating that it should never be inlined or compiled by the VM.
*/
public void setNotInlineable() {
compilerToVM().doNotInlineOrCompile(this);
public void setNotInlineableOrCompileable() {
compilerToVM().setNotInlineableOrCompileable(this);
}
/**

View File

@ -1003,7 +1003,7 @@ C2V_VMENTRY(jlong, getMaxCallTargetOffset, (JNIEnv*, jobject, jlong addr))
return -1;
C2V_END
C2V_VMENTRY(void, doNotInlineOrCompile,(JNIEnv *, jobject, jobject jvmci_method))
C2V_VMENTRY(void, setNotInlineableOrCompileable,(JNIEnv *, jobject, jobject jvmci_method))
methodHandle method = CompilerToVM::asMethod(jvmci_method);
method->set_not_c1_compilable();
method->set_not_c2_compilable();
@ -1770,7 +1770,7 @@ JNINativeMethod CompilerToVM::methods[] = {
{CC "getImplementor", CC "(" HS_RESOLVED_KLASS ")" HS_RESOLVED_KLASS, FN_PTR(getImplementor)},
{CC "getStackTraceElement", CC "(" HS_RESOLVED_METHOD "I)" STACK_TRACE_ELEMENT, FN_PTR(getStackTraceElement)},
{CC "methodIsIgnoredBySecurityStackWalk", CC "(" HS_RESOLVED_METHOD ")Z", FN_PTR(methodIsIgnoredBySecurityStackWalk)},
{CC "doNotInlineOrCompile", CC "(" HS_RESOLVED_METHOD ")V", FN_PTR(doNotInlineOrCompile)},
{CC "setNotInlineableOrCompileable", CC "(" HS_RESOLVED_METHOD ")V", FN_PTR(setNotInlineableOrCompileable)},
{CC "isCompilable", CC "(" HS_RESOLVED_METHOD ")Z", FN_PTR(isCompilable)},
{CC "hasNeverInlineDirective", CC "(" HS_RESOLVED_METHOD ")Z", FN_PTR(hasNeverInlineDirective)},
{CC "shouldInlineMethod", CC "(" HS_RESOLVED_METHOD ")Z", FN_PTR(shouldInlineMethod)},

View File

@ -215,8 +215,8 @@ public class CompilerToVMHelper {
return CTVM.getLocalVariableTableStart((HotSpotResolvedJavaMethodImpl)method);
}
public static void doNotInlineOrCompile(HotSpotResolvedJavaMethod method) {
CTVM.doNotInlineOrCompile((HotSpotResolvedJavaMethodImpl)method);
public static void setNotInlineableOrCompileable(HotSpotResolvedJavaMethod method) {
CTVM.setNotInlineableOrCompileable((HotSpotResolvedJavaMethodImpl)method);
}
public static void reprofile(HotSpotResolvedJavaMethod method) {

View File

@ -71,10 +71,10 @@ public class DoNotInlineOrCompileTest {
boolean hasNeverInlineDirective = CompilerToVMHelper.hasNeverInlineDirective(method);
Asserts.assertFalse(hasNeverInlineDirective, "Unexpected initial " +
"value of property 'hasNeverInlineDirective'");
CompilerToVMHelper.doNotInlineOrCompile(method);
CompilerToVMHelper.setNotInlineableOrCompileable(method);
hasNeverInlineDirective = CompilerToVMHelper.hasNeverInlineDirective(method);
Asserts.assertTrue(hasNeverInlineDirective, aMethod
+ " : hasNeverInlineDirective is false even after doNotInlineOrCompile'");
+ " : hasNeverInlineDirective is false even after setNotInlineableOrCompileable'");
}
private static List<Executable> createTestCases() {