<div dir="ltr">Hi all!<br><br>What are your thoughts on an event to record uses of reflection? <br>The event could contain a field for the action being taken (accessing a field, invoking a method, etc). It would be an instant event with a stacktrace. In the case of Quarkus, it's useful to know where and how often reflection is being used so that we know where to focus efforts if we want to reduce reflection usage (for performance reasons and also for compatibility with Native Image). This information is probably helpful in other use cases as well. <br><br>This is a specific case of the more general problem of method tracing: <a href="https://bugs.openjdk.org/browse/JDK-8249859">https://bugs.openjdk.org/browse/JDK-8249859</a><br><br>One potential problem is that if a Java program uses a lot of reflection, the overhead of such an event might be large, if we emit an event for every single usage. To avoid that, this event could be throttled similar to how allocation sampling is done. This would be ok if we want a general picture of reflection usage. And if a user doesn't want to miss any unique accesses, they could set the rate to unlimited. <br><br><div>Are there any other foreseeable problems with an event like this?  <br><br>Thanks!<br></div><div>Robert Toyonaga</div></div>