[jbosstools-dev] Question on ASTools profiling

Max Rydahl Andersen manderse at redhat.com
Fri Nov 8 05:49:27 EST 2013


On Fri, Nov 08, 2013 at 03:42:00PM +0800, Rob Stryker wrote:
>Example:
>   public void launch(etc etc) {
>        code 1
>        code 2
>        code 3
>        etc etc etc
>        code 100
>        // WHERE WE WANT TO PUT PROFILING HOOK
>        runner.run(etc);
>   }

Yes, you want this injected *before* the run and *after* you have done whatever setup you want/need.
Unless you make sure to not overwrite what the profiler might be adding.

>if we instead did:
>    profilingCode();
>    new JavaLaunchDelegate.launch(etc);
>
>Then we have the new values from profiling code potentially being 
>overwritten by the code in JavaLaunchDelegate, which will use the 
>values already set, basically.
>
>But I'm not familiar with profiling which is why I was asking Snjezana.

What profilers normally need to do is add a jar to the agent parameter in java and possibly
set some properties dependent on the other flags/values present.

I would go look where this profiler call is otherwise used in other server adapters to see
how they do it.

/max



More information about the jbosstools-dev mailing list