[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[news.eclipse.tools.hyades] Re: Profiling Applet running in Browser Java Plugin

Hi Vasu,

In order to profile an applet running within a browser, you need to find a way to configure the browser to invoke the applet's JVM with an additional JVM argument: "-XrunpiAgent", or "-XrunpiAgent:server=controlled". The former will start running the applet immediately, and the latter will cause the JVM (and the applet along with it) to pause execution until a profiler attaches to it. This is probably very browser-dependant, and not all browsers may support doing this. To attach the profiler to the applet, click the "Profile" button in the main toolbar and create a new "Attach - Java Process" launch configuration. Find your agent, set your profiling options, and you're ready to go. If you picked the "server=controlled" option, the applet will start running when you do a "Start monitoring" on the agent in the profiling monitor view. This is useful if you don't want to miss anything that happens at startup.

I should mention, though, that this is the *hard* way to profile applets. There's a much easier way - do it outside the browser. Simply click on the "Profile..." button in the main toolbar and create a new "Java Applet" launch configuration. This will run the applet in a small applet viewer application.

Thanks,
Curt


Vasu wrote:

Hi,

I am a Hyades newbie and was trying to find how I can profile an applet running under Browser Java plugin. I would appreciate any pointers on this.

Thank you,
Vasu