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

Use callTarget.id instead of hashCode in OptimizedTruffleRuntime and TraceSplittingListener #8654

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

rwstauner
Copy link

@rwstauner rwstauner commented Mar 27, 2024

This format is consistent with the format for splits present in the
"[engine] opt" lines when tracing compilation.

Using --engine.TraceCompilation --engine.TraceSplitting --engine.TraceTransferToInterpreter
the output changes from

[engine] split 297-493b01ef-1     Truffle::RegexpOperations.match_in_region                   |AST   99|Tier 1|Calls/Thres       5/    1|CallsAndLoop/Thres      17/  400|SourceSection /Users/rwstauner/src/truffle-ws/truffleruby/src/main/ruby/truffleruby/core/truffle/regexp_operations.rb~29:881-943
[engine] opt done   id=1722  Truffle::RegexpOperations.match_in_region <split-1722> |Tier 2|Time    90(  42+48  )ms|AST   99|Inlined   2Y   0N|IR    326/   956|CodeSize    3804|Addr 0x11743dcc0|Timestamp 6753643229750|Src regexp_operations.rb:76
[engine] transferToInterpreter at
  Truffle::RegexpOperations.match_in_region(../../../truffle-ws/truffleruby/src/main/ruby/truffleruby/core/truffle/regexp_operations.rb:76) <split-493b01ef>

to

[engine] split 297-1722-1     Truffle::RegexpOperations.match_in_region                   |AST   99|Tier 1|Calls/Thres       5/    1|CallsAndLoop/Thres      17/  400|SourceSection /Users/rwstauner/src/truffle-ws/truffleruby/src/main/ruby/truffleruby/core/truffle/regexp_operations.rb~29:881-943
[engine] opt done   id=1722  Truffle::RegexpOperations.match_in_region <split-1722> |Tier 2|Time    92(  42+50  )ms|AST   99|Inlined   2Y   0N|IR    326/   956|CodeSize    3804|Addr 0x1176b89c0|Timestamp 6604360084708|Src regexp_operations.rb:76
[engine] transferToInterpreter at
  Truffle::RegexpOperations.match_in_region(../../../truffle-ws/truffleruby/src/main/ruby/truffleruby/core/truffle/regexp_operations.rb:76) <split-1722>

The id is a public final

Currently this keeps the format of "splitCount-splitId-callCount" in the TraceSplittingListener the same, but if that isn't valuable it might be nice to reformat it so that each line has split-1722 which might make finding those easier.

What do you think about this? Do we need anything else here?

@oracle-contributor-agreement oracle-contributor-agreement bot added the OCA Verified All contributors have signed the Oracle Contributor Agreement. label Mar 27, 2024
@fniephaus fniephaus requested a review from chumer April 2, 2024 08:24
@nirvdrum
Copy link
Contributor

I think we should also update the line in TraceSplittingListener#onCompilationSplit. It uses the call target hash code as well.

…TraceSplittingListener

This format is consistent with the format for splits present in the
"[engine] opt" lines when tracing compilation.
@rwstauner rwstauner changed the title Use callTarget.id in OptimizedTruffleRuntime.formatStackFrame instead of hashCode Use callTarget.id instead of hashCode in OptimizedTruffleRuntime and TraceSplittingListener Apr 15, 2024
@rwstauner
Copy link
Author

I looked for files that contain OptimizedCallTarget and then looked for uses of hashCode and TraceSplittingListenener seemed to be the only other relevant one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
OCA Verified All contributors have signed the Oracle Contributor Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants