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

Usage of @Self and @TargetInstance when probing static methods #212

Closed
jikuja opened this issue Mar 26, 2016 · 0 comments
Closed

Usage of @Self and @TargetInstance when probing static methods #212

jikuja opened this issue Mar 26, 2016 · 0 comments
Assignees
Milestone

Comments

@jikuja
Copy link

jikuja commented Mar 26, 2016

I found this http://stackoverflow.com/a/24902885/776884 explaining that @self makes probes to match only non-static functions. Is this explained in documentation?

I found https://btrace.kenai.com/javadoc/dev/com/sun/btrace/annotations/Self.html : Marks a method parameter as the one that should contain *this* instance and https://btrace.kenai.com/javadoc/dev/com/sun/btrace/annotations/Kind.html#ENTRY (sic, javadocs should be updated) Self - the instance enclosing the declaring method or null if that method is null from javadocs.

Neither of those does give a strong hint about function match changes and I have no idea what null if that method is null means.

I did not fully test following but Kind.Call with @TargetInstance has similar problem: probe will match only non-static methods and current documentation has following note: TargetInstance - the target instance of the method call or null if the method is static

@jikuja jikuja changed the title Usage of @Self when probing static methods Usage of @Self and @TargetInstance when probing static methods Mar 26, 2016
@jbachorik jbachorik added this to the 1.3.6 milestone Apr 1, 2016
@jbachorik jbachorik self-assigned this Apr 1, 2016
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

2 participants