feat: enable register-tracing feature for litesvm by default#574
Conversation
Adds the register-tracing feature flag to litesvm by default. This only registers the tracing hooks - tracing is only activated at runtime when the SBF_TRACE_DIR environment variable is set. No behavior change when the variable is unset.
ecd570a to
c24d066
Compare
|
Forgot to actually explain the idea behind this PR, so here it is. The motivation for enabling register tracing by default is to allow users to obtain tracing out of the box simply by setting an environment variable, without requiring them to rebuild Surfpool from source just to enable this feature. This lowers the barrier to collecting register-level traces and allows users to obtain code coverage more quickly during analysis and testing. This will lower the steps with one from here: https://github.com/procdump/surfpool-examples/blob/843e2d3d69d1fe2a6227f2594a866f8805635598/anchor/code_coverage/README.md#build-surfpool-with-register-tracing An alternative approach would be for Surfpool to publish two sets of binaries: one with register tracing enabled and one without. However, I’m not sure what the current stance is on maintaining multiple binary variants, so enabling it by default (while keeping it runtime-controlled via an environment variable) seemed like the simpler option. |
MicaiahReid
left a comment
There was a problem hiding this comment.
I'm good with it! @lgalabru any objections?
Adds the register-tracing feature flag to surfpool-core by default. This only registers the tracing hooks - tracing is only activated at runtime when the SBF_TRACE_DIR environment variable is set. No behavior change when the variable is unset.