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

[BTRACE-121] Kind.CALL support for overlapping instrumentation is not optimal #69

Closed
jbachorik opened this issue Aug 28, 2014 · 1 comment

Comments

@jbachorik
Copy link
Collaborator

[reporter="j.bachorik", created="Mon, 21 Jul 2014 13:05:21 +0200"]

When a method is instrumented with multiple overlapping Kind.CALL handlers the injected code is far from optimal. For each handler all the values currently on the stack will be backed up to local variables before calling the actual handler code and restored afterwards.

Eg. in a situation when 2 handlers are matching a certain method call we would get:

backup_stack(1) -> stores the values from stack in local variables
reload_required_vals(1) -> reloads the values accessed from the handler
call_handler(1)
restore_stack(1) -> copies the values from the new local variables on to stack
backup_stack(2) -> stores the values from stack in local variables again
reload_required_vals(2) -> reloads the values accessed from the handler
call_handler(2)
restore_stack(2) -> copies the values from the new local variables on to stack

Ideally, this situation should be recognized and only one backup set of the stack values should be used

@jbachorik jbachorik added this to the 1.3 milestone Aug 28, 2014
@jbachorik jbachorik removed this from the 1.3 milestone Jan 26, 2015
@github-actions
Copy link

Stale issue message

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant