Skip to content

Conversation

procdump
Copy link

The aim of this PR is to respect the VM_TRACE_DIR variable and hence dump the instruction trace in the provided directory.

I've managed to wrap up a working setup with this code on top of mollusk-svm 0.6.1. I've only had to silence the lack of the trace method of the ContextObject trait by bringing a dummy back.

Please have a look. I'm not pretty sure if this is the right place for the AsBytes trait. I'm also unsure about the possibility of passing an error back if writing of the files fails due to some reason.

then for each VM dump registers and instructions in this directory.
@LucasSte LucasSte requested a review from Lichtso September 29, 2025 14:53
@Lichtso
Copy link
Collaborator

Lichtso commented Sep 29, 2025

I think it would be beneficial to do this (exporting the traces to files via environment variables) on the SVM side (see discussion anza-xyz/agave#7709 (comment)) as that would allow us to further join it with the program-id across CPIs, which we don't know at this low level here.

@procdump
Copy link
Author

procdump commented Sep 29, 2025

I think it would be beneficial to do this (exporting the traces to files via environment variables) on the SVM side (see discussion anza-xyz/agave#7709 (comment)) as that would allow us to further join it with the program-id across CPIs, which we don't know at this low level here.

Right, we're on the same page. Is this the place you're referring to or I'm missing some context and there's a better one?

@Lichtso
Copy link
Collaborator

Lichtso commented Sep 29, 2025

Is this the place you're referring to or I'm missing some context and there's a better one?

I will figure that out when I update the SBPF dependency in the monorepo to adopt #71. All places that interact with
https://github.com/anza-xyz/agave/blob/70ad4f09f9f34a0ba519410caf46015291956a64/program-runtime/src/invoke_context.rs#L205 need to be refactored.

@procdump
Copy link
Author

procdump commented Oct 2, 2025

Since anza-xyz/agave#8285 got merged I'm closing this PR.

@procdump procdump closed this Oct 2, 2025
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.

2 participants