Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Backport] 8273612: Fix for JDK-8272873 causes timeout in running some tests with -Xcomp #187

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/hotspot/share/compiler/compilationPolicy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -894,6 +894,10 @@ bool CompilationPolicy::is_method_profiled(const methodHandle& method) {

// Determine is a method is mature.
bool CompilationPolicy::is_mature(Method* method) {
if (Arguments::is_compiler_only()) {
// Always report profiles as immature with -Xcomp
return false;
}
methodHandle mh(Thread::current(), method);
MethodData* mdo = method->method_data();
if (mdo != NULL) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,7 @@ public void test() throws Exception {
"Multiple times invoked method should have method data");
// The method may or may not be mature if it's compiled with limited profile.
if (compLevel != CompilerWhiteBoxTest.COMP_LEVEL_LIMITED_PROFILE) {
/* a method is not mature in Xcomp mode with tiered compilation disabled,
see NonTieredCompPolicy::is_mature */
Asserts.assertEQ(isMature, !(Platform.isComp() && !TIERED),
Asserts.assertEQ(isMature, !Platform.isComp(),
"Unexpected isMature state for multiple times invoked method");
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ public void test() throws Exception {
isMature = CompilerToVMHelper.isMature(metaspaceMethodData);
/* a method is not mature for -Xcomp and -Tiered,
see NonTieredCompPolicy::is_mature */
Asserts.assertEQ(!IS_XCOMP || TIERED, isMature,
Asserts.assertEQ(!IS_XCOMP, isMature,
"Unexpected isMature state for compiled method");
HotSpotResolvedJavaMethod resolvedMethod
= CTVMUtilities.getResolvedMethod(method);
Expand All @@ -94,7 +94,7 @@ public void test() throws Exception {
isMature = CompilerToVMHelper.isMature(metaspaceMethodData);
Asserts.assertNE(metaspaceMethodData, 0L,
"Got null MDO after reprofile");
Asserts.assertEQ(TIERED && IS_XCOMP, isMature,
Asserts.assertFalse(isMature,
"Got unexpected isMature state after reprofiling");
}
}
Loading