FaqProfilerAttachingToRunningApp

When I attach to a running application, and want to do "Analyze Performance - Entire Application", why does it say it can give me profiling results only for threads started after I attached the Profiler to the application?

This is because at the moment of attachment the existing, running threads of your application are in arbitrary states. For example, some thread's call stack may look like
a()->b()->c()
. Since we don't know when the application called all these methods, or whether these methods called anything before, we can't build a call tree that is normally presented to you as a result of CPU profiling. In order to obtain consistent results, the tool has to wait for a new thread(s) to start.

Having said that, we should also admit that even for a thread that is already running, it is still possible in theory to obtain results in the form of a flat profile. It will be incomplete, in the sense that it will not reflect the timings for calls initiated before the Profiler attached to the application, but it will likely still be useful. We are going to implement this enhancement in one of the future Milestone releases.


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