On 11/7/2013 1:20 PM, Max Rydahl Andersen wrote:
On Wed, Nov 06, 2013 at 10:43:34PM +0800, Rob Stryker wrote:
>
> This block of code is also a bit inconvenient since it happens after 95%
> of the launch code but before the vmrunner.run(etc), so it requires us
> to basically copy a superclass's entire 300 line method in order to
> sneak the profiling bit in before the launch is run.
Why do you need 300 line method to add this ?
It's what other server adapters do too for enabling profile is it not ?
Maybe we got it in the wrong place since this actually sounds like
something that all server adapters should be able to benefit from as
long as they are launched
with pure java.
I have added a profile integration with JBT servers based on the
integration of WTP servers.
That feature has worked with TPTP.
> Anyway, any advice on how this works, what kinda changes it can
make to
> the launch, or how to set up my env to test it, would be very helpful.
Install a Profiler plugin, like YourKit
(
http://www.yourkit.com/features/eclipse/) which supports
Eclipse notion of Profile runs.
Then you should be able to run a profiler against any java launch,
including our server adapter.
I have tried to start a server from the Servers view using the Profile
button.
It works for Tomcat, but doesn't work for JBoss AS.
I have tried Tomcat 7, AS 7.1.1, AS 7.2.0, EAP 6.1 and YourKit 12.
As I can see, YourKit integrates with WTP Tomcat and generic adapter. I
suppose we would have to add the integration with YourKit or use manual
settings.
When starting a server in the debug or run mode, it can be profiled from
YourKit UI.
Snjeza
/max