Make it possible to get a single method start event with all the parameters
Closed this issue · 0 comments
Currently, the method start, the initial field states, and the arguments are tracked by separate events. Make it possible to transform these recording events to a single event in the runtime part.
For example, track a new event that fires at the start of the method, right after all other events are fired:
trackMethodStart
trackFieldState
*trackLocalVariableState
*- A new event to signal there are no more params.
This way, when the runtime receives the last event it can compile a new event with all the previously recorded data. This could be useful for a logging runtime.
Related cleanup:
- Rename track lambda start in API to track lambda definition.
- Rename class/method visitor pairs to match each others name.
As an alternative, instead of an extra event it might be possible to enhance the API to make it possible to record get all these data as a single event. For example, the caller might create a POJO with all the related data. This would make life easier in the runtime part, but make the instrumentation logic a bit more complex, so for now, I decided to keep the current events and add an extra signal at the end of the params.