Understanding Profiler Agent Parameters
By Jiri Sedlacek-Oracle on Nov 07, 2006
Anytime the profiled application is started for Profiler direct attach, the
-agentpath argument of
java command is used to load the Profiler agent into JVM. For Profile Project action this happens automatically and you don't have to care about it. But when you are using the Attach Profiler action, you have to start the profiled application manually and provide correct
-agentpath argument. Synopsis of the argument is:
path_to_agent_libraryis full path to Profiler agent binary, on Windows
path_to_profiler_lib_diris full path to Profiler
libdirectory, on Windows
comm_port_numberis Profiler agent communication port, must meet the value set in Profiler Options, default is
timeout_in_secsis optional timeout value in seconds which defines the time for which the agent waits for Profiler GUI connection; if elapsed, the agent breaks profiled application startup and stops its JVM. If not provided, default value
0is used which means no timeout
timeout_in_secs option is useful when you use some kind of automated connection of Profiler GUI to the agent or just when you are not sure that the Profiler GUI will be able to connect to the agent. The timeout ensures that profiled application won't stay blocked when connection fails. The Profiler itself uses timeout for Profile Project action for J2SE projects, its value is 10 seconds.
Note that you don't have to construct the
-agentpath argument manually, the Attach Wizard will generate it for you - you can just copy-paste it to the console.