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

Marcus Hirt hirt at openjdk.java.net
Thu Aug 20 14:12:15 UTC 2020


On Wed, 19 Aug 2020 22:32:17 GMT, Joshua Matsuoka <jmatsuoka at openjdk.org> wrote:

> 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.

Marked as reviewed by hirt (Lead).

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

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


More information about the jmc-dev mailing list