Better inline instrumentation callbacks in interpreter.

While instrumentation callbacks (MethodEnterEvent, MethodExitEvent and
DexPcMovedEvent) are inlined, the given arguments (this object, method and
current dex pc) are "constructed" even if the callback results in a no-op
(because no listener is attached) and these arguments are not used.

This CL improves these parts of code by explicitely test whether a listener is
attached before calling the callback. Thus, parameters are only created if
a listener is attached. In the case no listener is attached, we prevent from
loading from memory the 'this' object and the method and prevent from computing
the dex pc (which is the difference between the code start address and the
current instruction address).

Change-Id: Ia93aeca1eaa6c1fc644e932eb67001d46b1cf429
2 files changed
tree: f8abb4fdb8781738c622ca90de2e4426a649c56e
  1. .gitignore
  3. build/
  4. jdwpspy/
  5. src/
  6. test/
  7. tools/