thesuhas / orca

WebAssembly Transformation Library for the Component Model
Apache License 2.0
0 stars 0 forks source link

Instrumentation Design #12

Open thesuhas opened 4 days ago

thesuhas commented 4 days ago

How should instrumentation look like? What data would the visitor need?

To uniquely identify a location, one would need the index of an instruction in the function as discussed in #2 . One can uniquely identify if an instruction has to be instrumented as indicated by the InstrumentType enum.

On the first scan of the .wat, we can change InstrumentType to associated value. Second scan as we hit one of this, we do the instrumentation, and then change it back to InstrumentType::NotInstrumented and look for the next one that has a InstrumentType value that is not NotInstrumented.

thesuhas commented 4 days ago

This is now working!