I am trying to profile functions in my java application using VisualVM (eclipse plug-in). Right now when I run an application, eclipse opens VisualVM and takes me to the profilers tab where I can start profiling by pressing the CPU or Memory buttons. Unfortunately, in the time that I take to manually do this, I lose significant number to iterations in my application to get a precise result.
I know I can set the default profiler setting for an application under Tools->Options->Profiling. But is there an option in VisualVM where it can automatically fire the profiler on seeing a particular main function/application being launched.