Skip to content

Commit

Permalink
Use callTarget.id instead of hashCode in OptimizedTruffleRuntime and …
Browse files Browse the repository at this point in the history
…TraceSplittingListener

This format is consistent with the format for splits present in the
"[engine] opt" lines when tracing compilation.
  • Loading branch information
rwstauner committed Apr 15, 2024
1 parent 2a77e42 commit 6915cc8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Expand Up @@ -1295,7 +1295,7 @@ private static String formatStackFrame(FrameInstance frameInstance, CallTarget t
if (target instanceof OptimizedCallTarget) {
OptimizedCallTarget callTarget = ((OptimizedCallTarget) target);
if (callTarget.isSplit()) {
builder.append(" <split-").append(Integer.toHexString(callTarget.hashCode())).append(">");
builder.append(" <split-").append(callTarget.id).append(">");
}
}

Expand Down
Expand Up @@ -66,7 +66,7 @@ public static void install(OptimizedTruffleRuntime runtime) {
public void onCompilationSplit(OptimizedDirectCallNode callNode) {
OptimizedCallTarget callTarget = callNode.getCallTarget();
if (callTarget.getOptionValue(OptimizedRuntimeOptions.TraceSplitting)) {
String label = String.format("split %3s-%08x-%-4s ", splitCount++, 0xFFFF_FFFFL & callNode.getCurrentCallTarget().hashCode(), callNode.getCallCount());
String label = String.format("split %3s-%s-%-4s ", splitCount++, callNode.getCurrentCallTarget().id, callNode.getCallCount());
final Map<String, Object> debugProperties = callTarget.getDebugProperties();
debugProperties.put("SourceSection", extractSourceSection(callNode));
OptimizedTruffleRuntime.getRuntime().logEvent(callTarget, 0, label, debugProperties);
Expand Down

0 comments on commit 6915cc8

Please sign in to comment.