Skip to content

Commit

Permalink
[GR-58203]
Browse files Browse the repository at this point in the history
PullRequest: graal/18825
  • Loading branch information
dougxc committed Sep 17, 2024
2 parents 4c77bc1 + 71d7168 commit d20905b
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
import java.nio.file.Path;
import java.nio.file.Paths;
import java.util.Objects;
import java.util.concurrent.atomic.AtomicBoolean;
import java.util.stream.Collectors;
import java.util.stream.Stream;

Expand Down Expand Up @@ -202,14 +203,23 @@ public String formatLamdaName(ResolvedJavaMethod m) {
throw GraalError.shouldNotReachHere(String.format("No file for method %s found in %s, strict profiles, abort", s, loadDir)); // ExcludeFromJacocoGeneratedReport
}
} catch (IOException e) {
e.printStackTrace();
boolean wasSet = profileReplayPrologueExceptionPrinted.getAndSet(true);
if (!wasSet) {
e.printStackTrace();
}
}
}
return new ProfileReplaySupport(lambdaNameFormatter, expectedResult, expectedCodeSignature, expectedGraphSignature, profileFilter, profileSaveFilter);
}
return null;
}

/**
* Guard to prevent flood of stack traces when CTRL-C'ing tasks such as
* {@code mx benchmark compile-all:fuzzedClasses}.
*/
private static final AtomicBoolean profileReplayPrologueExceptionPrinted = new AtomicBoolean();

/**
* Finishes a previously started profile record/replay (see {@link #profileReplayPrologue}.
* Both, for record and replay, the method validates various expectations (see
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ public static long compileMethod(long methodHandle, boolean useProfilingInfo,
HotSpotResolvedJavaMethod method = runtime.unhand(HotSpotResolvedJavaMethod.class, methodHandle);
HotSpotCompilationRequest request = new HotSpotCompilationRequest(method, entryBCI, 0L);
try (CompilationContext ignored = HotSpotGraalServices.openLocalCompilationContext(request)) {
CompilationTask task = new CompilationTask(runtime, compiler, request, useProfilingInfo, false, eagerResolving, installAsDefault);
CompilationTask task = new CompilationTask(runtime, compiler, request, useProfilingInfo, false, false, eagerResolving, installAsDefault);
long allocatedBytesBefore = 0;
long timeBefore = 0;
if (timeAndMemConsumer != null) {
Expand Down

0 comments on commit d20905b

Please sign in to comment.