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

Move bank instrumentation to bank.{read/write} #227

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

mandolaerik
Copy link
Contributor

No description provided.

@mandolaerik
Copy link
Contributor Author

This makes sure instrumentation works also for device-internal accesses, which allows a clean migration of sideband banks to the transaction interface. This also moves the feature further away from the memop, which means:

  • the reported size is deduced from byte enables, rather than taken from the transaction
  • the reported initiator is harder to reach; our workaround is to convey it in a session variable back-door, which in some cases will cause an incorrect initiator to be reported in instrumentation callbacks after read/write if SIM_transaction_wait interacts with reentrancy.

@syssimics
Copy link
Contributor

Verification #12409052: fail

@mandolaerik mandolaerik force-pushed the pr/move-bank-instrumentation-to-bank-read/write branch from 90cdf54 to 76fdecd Compare October 26, 2023 19:55
@syssimics
Copy link
Contributor

Verification #12409305: pass

@mandolaerik
Copy link
Contributor Author

mandolaerik commented Oct 27, 2023

Trigger Jenkins
Jenkins

@mandolaerik
Copy link
Contributor Author

Jenkins looks ok

Copy link
Contributor

@lwaern-intel lwaern-intel left a comment

Choose a reason for hiding this comment

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

Somewhat surprised this shuffling of calls to the _callback family doesn't break anything.

You don't think VP passing is mostly due to their own local copy-pasting of these methods?

@mandolaerik
Copy link
Contributor Author

VP passing is probably due to their tests not relying much on bank instrumentation (in part because bank instrumentation don't work for sideband accesses before this PR).

I think their copied overrides will cause callbacks to be called twice, but things that do rely on bank instrumentation are likely on the form "wait for next access", where a double callback probably isn't disruptive.

@mandolaerik
Copy link
Contributor Author

Here is the issue for fixing this in VP.

@mandolaerik
Copy link
Contributor Author

Before merging this, I should also add a release note.

@mandolaerik
Copy link
Contributor Author

I can see that the VP duplication issue is scheduled for fixing before nov 17, so we can consider waiting for that.

@mandolaerik mandolaerik force-pushed the pr/move-bank-instrumentation-to-bank-read/write branch from 76fdecd to 1ec9514 Compare October 27, 2023 14:23
Comment on lines +529 to +531
that if <tt>read</tt> or <tt>write</tt> is overridden in a bank,
then instrumentation callbacks will only be called if they
call <tt>default()</tt>.</add-note></build-id>
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This perhaps deserves a discussion, there are probably valid use cases for read/write overrides where this change will be a regression. I don't know what to do about that.

@syssimics
Copy link
Contributor

Verification #12413771: pass

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants