RFR: 6887: Agent instrumentation fails silently if method descriptors don't match

Joshua Matsuoka jmatsuoka at openjdk.java.net
Wed Aug 19 22:37:45 UTC 2020


Hi,

This PR addresses JMC-6887. Currently when the agent is given an XML description that has an otherwise correct probe
definition, but an incorrect method descriptor the instrumentation will inject the event classes but not the method,
essentially failing silently.

The JFRTransformDescriptor will now track whether the ClassVisitor has found a matching method or not, and in the event
that the ClassVisitor reaches the end of the class without finding a matching method it will log a warning to the user
that no matching method was found. This will also catch the case where a non-existent method is specified for
instrumentation, which will currently fail silently in the same way.

-------------

Commit messages:
 - 6887: Agent instrumentation fails silently if method descriptors don't match

Changes: https://git.openjdk.java.net/jmc/pull/105/files
 Webrev: https://webrevs.openjdk.java.net/jmc/105/webrev.00
  Issue: https://bugs.openjdk.java.net/browse/JMC-6887
  Stats: 142 lines in 4 files changed: 141 ins; 0 del; 1 mod
  Patch: https://git.openjdk.java.net/jmc/pull/105.diff
  Fetch: git fetch https://git.openjdk.java.net/jmc pull/105/head:pull/105

PR: https://git.openjdk.java.net/jmc/pull/105


More information about the jmc-dev mailing list