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

Consider adding tracing to the Host interface #1189

Closed
bobbinth opened this issue Jan 9, 2024 · 1 comment · Fixed by #1198
Closed

Consider adding tracing to the Host interface #1189

bobbinth opened this issue Jan 9, 2024 · 1 comment · Fixed by #1198
Assignees
Labels
assembly Related to Miden assembly processor Related to Miden VM processor
Milestone

Comments

@bobbinth
Copy link
Contributor

bobbinth commented Jan 9, 2024

The Host interface provides several several hooks which could be useful for monitor execution of the VM, however, it may be good to introduce a dedicated "tracing" hook so that event/debug hooks wouldn't need to be overloaded with trancing info.

To do this, we could add the following method to the Host interface:

fn on_trace<S: ProcessState>(&mut self, process: &S, trace_id: u32)

Then, in the assembly, we'd introduce a new instruction:

trace.<tace_id>

This instruction would behave similarly to the emit instruction - but would trigger on_trace() function.

We could also then add an option to ExecutionOption to turn tracing on or off. For example, it could look something like:

pub struct ExecutionOptions {
    max_cycles: u32,
    expected_cycles: u32,
    enable_tracing: bool
}
@bobbinth bobbinth added assembly Related to Miden assembly processor Related to Miden VM processor labels Jan 9, 2024
@bobbinth bobbinth changed the title Consider adding tracing to the Host interface. Consider adding tracing to the Host interface Jan 11, 2024
@bobbinth bobbinth added this to the v0.8 milestone Jan 11, 2024
@Fumuran Fumuran linked a pull request Jan 15, 2024 that will close this issue
1 task
@Fumuran Fumuran moved this from Todo to In Progress in Builder's testnet Jan 16, 2024
@bobbinth
Copy link
Contributor Author

Closed by #1198.

@github-project-automation github-project-automation bot moved this from In Progress to Done in Builder's testnet Jan 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
assembly Related to Miden assembly processor Related to Miden VM processor
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants