Up

Javana: A System for Building Customized Java Program Analysis Tools

Javana: A System for Building Customized Java Program Analysis Tools
1 · 2 · 3 · 4

1 VM uses event handling mechanism to send events when an object is created, moved or collected, a method gets compiled or re-compiled, thread created, switchd, etc. 2 Dynamic binary instrumentator handles everything (in user space): bytecode interpretation, JIT work, JNI, VM work, but it excludes kernel-level system calls. It useful if the goal is deep understanding of the application's behavior: memory usage, cache misses, etc. Java VM is instrumented. 3 DBI takes as input a specification provided by user—what to be instrumented.

Running a dynamic binary instrumentation tool underneath a virtual machine requires that the instrumentation tool can deal with self-modifying code.

Is it a problem? Can static instrumentator work with self-modifying code?

VM triggers—empty native C functions, handled by DBI, all other information (function names, etc.) DBI knows from symbol information of VM. For vertical map method AVL tree and 4 object AVL tree are used: instruction pointers to method and object information. Fighting the using of absolute time: run uninstrumented, write stategy, and then run instrumented with this strategy. They include Javana triggers into Jikes RVM (JVM written in Java). DBI in Javana is DIOTA (for Linux and x86), it is similar to PIN and Valgrind.

pages 4—13 skipped

13 Static instrumentation cannot be used for analyzing Java applications because it cannot deal with dynamically generated code.

Sergey Vartanov, 2007–2020