Assuming I want to trace method calls in all the classes in packages com.abc
and com.def
I put the following in my tracing script:
@OnMethod(clazz = "/com\\.(abc|def)\\..*/", method = "/.*/")
ran the script, but the output only contained method calls in com.abc
package.
I changed the above line to:
@OnMethod(clazz = "/com\\.def\\..*/", method = "/.*/")
and ran the script again. The output contained method calls in com.def
package.
So what's wrong with the part "(abc|def)
"?
I've tried to find some information under the following link:
https://github.com/btraceio/btrace/wiki/BTrace-Annotations
The description is very abstract:
/regex/ is a standard regular expression used to identify the class names
Does it support OR-relation?