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

add hooks #12

Merged
merged 3 commits into from
Jul 10, 2024
Merged

add hooks #12

merged 3 commits into from
Jul 10, 2024

Conversation

wucke13
Copy link
Collaborator

@wucke13 wucke13 commented Jun 27, 2024

Pull Request Overview

This pull request adds a mechanism for downstream developer specifiable hooks, that hopefully is zero cost when unused.

Testing Strategy

This pull request was tested by a custom benchmark to assess performance impact.

TODO or Help Wanted

This pull request still needs more benchmarks, and feedback on the proposed API.

Formatting

  • Ran cargo fmt
  • Ran cargo check
  • Ran cargo build

Github Issue

This pull request closes #11

Author

Signed-off-by: wucke13 [email protected]

@wucke13 wucke13 force-pushed the dev/add-hooks branch 2 times, most recently from c743c88 to 01ea353 Compare July 3, 2024 09:30
@valexandru
Copy link
Collaborator

The API proposed looks good. It might be just accidental, but you also pushed the requirements onto this branch.

wucke13 added 3 commits July 3, 2024 16:47
This is quite useful for example when doing statement coverage. One
could store a MPSC tx end inside a BranchHookSet in order to send the
current program counter on every branching instruction. Stateless are
still possible and should be zero cost, they can be implemented by just
using an empty struct on which the HookSet trait is implemented.
@wucke13 wucke13 enabled auto-merge July 9, 2024 09:24
@wucke13 wucke13 added this pull request to the merge queue Jul 10, 2024
Merged via the queue into main with commit 853d244 Jul 10, 2024
4 checks passed
@wucke13 wucke13 deleted the dev/add-hooks branch August 15, 2024 08:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

investigate mechanism to allow user-insertable hooks
3 participants