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

Adding the ability to trace native methods #130

Merged
merged 2 commits into from
Jun 23, 2015
Merged

Conversation

jbachorik
Copy link
Collaborator

Resolves #115

With this patch it is possible to trace native methods. There is no difference in usage to the non-native methods.

Eg. the following trace scripts will work on all methods of the Test class regardless of whether they are native or not.

@BTrace                                                                                                                                                                                                       
public class NativeTracker {                                                                                                                                                                           
    @OnMethod(clazz="Test", method="/.*/")                                                                                                                                                         
    public static void nativeMethod(@Self Object self, @ProbeClassName String pcn, ProbeMethodName String pmn, String msg) {                                                                                      
        println("entering: " + pcn + "." + pmn);                                                                                                                                                      
        println("msg = " + msg);                                                                                                                                                                              
    }                                                                                                                                                                                                         
}  

@jbachorik jbachorik self-assigned this Jun 19, 2015
@jbachorik jbachorik added this to the 1.3.1 milestone Jun 19, 2015
@jbachorik jbachorik merged commit 82cb537 into master Jun 23, 2015
@jbachorik jbachorik deleted the native-methods branch September 25, 2015 13:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant