Skip to content

Commit

Permalink
[GR-9505] Enable guarantees that check thread states.
Browse files Browse the repository at this point in the history
PullRequest: graal/1397
  • Loading branch information
Christian Wimmer committed May 10, 2018
2 parents 7ebd0d8 + 6030982 commit 5dc95ab
Showing 1 changed file with 5 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -308,10 +308,7 @@ private static void enterSlowPathSafepointCheck() throws Throwable {
Safepoint.setSafepointRequested(Safepoint.SafepointRequestValues.RESET);
return;
}

// GR-9505
// VMError.guarantee(VMThreads.StatusSupport.isStatusJava(), "Attempting to do a safepoint
// check when not in Java mode");
VMError.guarantee(VMThreads.StatusSupport.isStatusJava(), "Attempting to do a safepoint check when not in Java mode");

try {
/*
Expand Down Expand Up @@ -363,12 +360,10 @@ public static void transitionNativeToJava() {
@SubstrateForeignCallTarget
@Uninterruptible(reason = "Must not contain safepoint checks")
private static void enterSlowPathNativeToJava() {
// GR-9505
// VMError.guarantee(!VMThreads.StatusSupport.isStatusJava(),
// "Attempting to do a Native-to-Java transition when already in Java mode");
// VMError.guarantee(!VMThreads.StatusSupport.isStatusIgnoreSafepoints(CEntryPointContext.getCurrentIsolateThread()),
// "When safepoints are disabled, the thread can only be in Native mode, so the fast path
// transition must succeed and this slow path must not be called");
VMError.guarantee(!VMThreads.StatusSupport.isStatusJava(),
"Attempting to do a Native-to-Java transition when already in Java mode");
VMError.guarantee(!VMThreads.StatusSupport.isStatusIgnoreSafepoints(CEntryPointContext.getCurrentIsolateThread()),
"When safepoints are disabled, the thread can only be in Native mode, so the fast path transition must succeed and this slow path must not be called");

Statistics.incSlowPathFrozen();
try {
Expand Down

0 comments on commit 5dc95ab

Please sign in to comment.