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

Transaction profiles #547

Merged
merged 39 commits into from
Jan 26, 2024
Merged

Transaction profiles #547

merged 39 commits into from
Jan 26, 2024

Conversation

tilk
Copy link
Member

@tilk tilk commented Dec 20, 2023

This PR adds transaction profiles. A profile contains a per-cycle information about:

  • Which transactions/methods were running. For running methods, which transaction/method called.
  • Which transactions wanted to run but couldn't, and which conflicting transaction was running instead.
  • Which methods were locked, but not running.

TODO:

  • Calculating statistics for the entire profile.
  • Options, filtering and sorting in the command line tool.
  • Running profile generation in CI to check for regressions.
  • Non-inverted call graphs (transactions to called methods).
  • User documentation (document the script and the profile option)

In the future:

  • Some way of visualizing profiles.

@tilk tilk added transactions Transaction framework tests Tests and testbenches (not infrastructure) labels Dec 20, 2023
Copy link
Contributor

@lekcyjna123 lekcyjna123 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall it looks good. I did some related changes, please check if #552 can be useful.

test/transactions/test_methods.py Show resolved Hide resolved
transactron/profiler.py Outdated Show resolved Hide resolved
transactron/profiler.py Outdated Show resolved Hide resolved
@lekcyjna123
Copy link
Contributor

According to the point:

Some way of visualizing profiles.

I am currently thinking about two possible way:

  • Something similar to waveform, where we have a one timeline for each transaction. It is green if it is running, blue when not ready and red if conflicting, ready and not running
  • Graph between transactions and methods. Edges in such graph can visualise how often conflict on these methods/transactions caused a stall of one of them.

@tilk
Copy link
Member Author

tilk commented Jan 4, 2024

I am currently thinking about two possible way:

  • Something similar to waveform, where we have a one timeline for each transaction. It is green if it is running, blue when not ready and red if conflicting, ready and not running

  • Graph between transactions and methods. Edges in such graph can visualise how often conflict on these methods/transactions caused a stall of one of them.

Both ideas are great, but I think this should be left for a future PR. For now, I'm writing a command-line script which will show transaction and method statistics using inverted call trees (methods to transactions). Normal call trees (transactions to methods) might be useful too.

@tilk tilk marked this pull request as ready for review January 10, 2024 14:51
transactron/profiler.py Outdated Show resolved Hide resolved
test/common/profiler.py Outdated Show resolved Hide resolved
test/common/profiler.py Outdated Show resolved Hide resolved
@tilk tilk merged commit ae764c3 into master Jan 26, 2024
8 checks passed
@tilk tilk deleted the tilk/transaction-profiles branch January 26, 2024 09:16
github-actions bot pushed a commit that referenced this pull request Jan 26, 2024
@lekcyjna123 lekcyjna123 mentioned this pull request Mar 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tests Tests and testbenches (not infrastructure) transactions Transaction framework
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants