jnativetracer is JVMTI agent to check callstack(s) to native (JNI) call.
You can get all callstacks which include native call.
$ make JAVA_HOME=/path/to/jdk
Pass -agentpath:/path/to/libjnativetracer.so
to java
.
dumpstack=true
- Dump stack traces in each native calls.
trigger=<class>::<field>
- Set trigger field. Field should be
boolean
type. If this field set totrue
, jnativetracer starts tracing all native calls, and this field set tofalse
, jnativetracer stops tracing.
- Set trigger field. Field should be
global=false
- Show native call info in
trigger
thread only. - This option affects when
trigger
is set.
- Show native call info in
$ cd example
$ javac SystemGC.java
$ java -agentpath:/path/to/libjnativetracer.so=global=false,dumpstack=true,trigger=SystemGC::isTrace SystemGC
The GNU Lesser General Public License, version 3.0