FaqProfilerInstrumentSpecialJavaMethods

How do I instrument/not instrument special Java methods?

When profiling applications, the following methods are not instrumented by default:

  • Method.invoke()
  • Getter/setter methods
  • Empty methods

You can choose to instrument these methods by creating a custom profiling configuration and then selecting the type of method you want to instrument in the Advanced Settings.

When Method.invoke() is checked, all calls done using Java Reflection (i.e. the java.lang.reflect.Method.invoke() call) are followed and instrumented.

The other two options specify whether the IDE instruments methods that either get/set object fields or that do not contain any executable code.

Typically it does not make sense to instrument these methods, since the HotSpot JVM optimizes them very efficiently and normally their execution time is negligible. When instrumented, however, they may contribute to the profiling overhead noticeably. Check these boxes only if you want to find out whether, or how many times, some of these methods are called.



Back to NetBeans IDE Profiling FAQs

Back to NetBeans User FAQs

Not logged in. Log in, Register

By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo