tools: Add new titrace tool to print dynamic instruction counts
Implemented on top of the Tooling Interface (jvmti.h) and works on both
RI and ART (host/target). See README.md for more details.
Example usage:
$> make libtitrace
$> java -agentpath:out/host/linux-x86/lib64/libtitrace.so helloworld
Hello
================================================
TI Trace // Summary
++++++++++++++++++++++++++++++++++++++++++++++++
* Single step counter: 405982
+++++++++++ Instructions Count ++++++++++++
* aconst_null(op:1), count: 734, % of total: 0.180796
* iconst_m1(op:2), count: 470, % of total: 0.115769
* iconst_0(op:3), count: 4246, % of total: 1.04586
* iconst_1(op:4), count: 3585, % of total: 0.883044
* iconst_2(op:5), count: 1068, % of total: 0.263066
............
Test: manual
Change-Id: I0cd1f4f88e54cf8612641128230b8e93157b48ea
7 files changed