Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Test and Performance Tools Platform (TPTP) » Application controlled start/stop profiling within eclipse
Application controlled start/stop profiling within eclipse [message #96412] Thu, 19 April 2007 08:56 Go to next message
Eclipse User
Originally posted by: guy.coleman.prolog.uk.com

Hi,

I've been profiling Java applications with TPTP from within Eclipse
(using the Profile As -> Java Application menu items) and it's been
working very well.

I now want to profile some applications that have a long start up time,
and I don't want to start profiling until the startup is over.

I understand that if I ran the application stand alone and used
server=application I could control when profiling is started/stopping
from within the application.

I can't see a way to do this from within the profiling options in
Eclipse. There is a "Automatically start monitoring when application is
launched" check box, but the documentation doesn't cover how to then
start profiling later.

Am I missing something? Thanks,
-Guy Coleman
Re: Application controlled start/stop profiling within eclipse [message #96427 is a reply to message #96412] Thu, 19 April 2007 10:32 Go to previous messageGo to next message
Paul Slauenwhite is currently offline Paul Slauenwhite
Messages: 970
Registered: July 2009
Senior Member
Hi Guy,
Once you start your application stand-alone, you can attach to the
Profiler agent in the TPTP workbench (Run >> Profile... >> Attach - Java
Application).

Paul
"Guy Coleman" <guy.coleman@prolog.uk.com> wrote in message
news:f07as1$9op$1@build.eclipse.org...
> Hi,
>
> I've been profiling Java applications with TPTP from within Eclipse (using
> the Profile As -> Java Application menu items) and it's been working very
> well.
>
> I now want to profile some applications that have a long start up time,
> and I don't want to start profiling until the startup is over.
>
> I understand that if I ran the application stand alone and used
> server=application I could control when profiling is started/stopping from
> within the application.
>
> I can't see a way to do this from within the profiling options in Eclipse.
> There is a "Automatically start monitoring when application is launched"
> check box, but the documentation doesn't cover how to then start profiling
> later.
>
> Am I missing something? Thanks,
> -Guy Coleman
Re: Application controlled start/stop profiling within eclipse [message #96469 is a reply to message #96412] Thu, 19 April 2007 12:43 Go to previous messageGo to next message
Asaf Yaffe is currently offline Asaf Yaffe
Messages: 333
Registered: July 2009
Senior Member
Guy,

The "application" mode (server=application) should be used when you want
to control the profiler from within the application code. You use the
TPTP org.eclipse.hyades.collection.profiler.Profiler class to notify the
profiler when to start and when to stop monitoring.

This feature should work with the "old" (JVMPI) profiler. It is not
supported by the new JVMTI Profiler for Java 5/6.

To attach to a running application (as described in Paul's post), you
need to launch your application with "server=enabled" (or without the
server argument as "enabled" is the default) and not with
"server=application".

HTH,
Asaf


Guy Coleman wrote:
> Hi,
>
> I've been profiling Java applications with TPTP from within Eclipse
> (using the Profile As -> Java Application menu items) and it's been
> working very well.
>
> I now want to profile some applications that have a long start up time,
> and I don't want to start profiling until the startup is over.
>
> I understand that if I ran the application stand alone and used
> server=application I could control when profiling is started/stopping
> from within the application.
>
> I can't see a way to do this from within the profiling options in
> Eclipse. There is a "Automatically start monitoring when application is
> launched" check box, but the documentation doesn't cover how to then
> start profiling later.
>
> Am I missing something? Thanks,
> -Guy Coleman


--
Asaf Yaffe
Eclipse TPTP Committer, JVMTI Profiler
Re: Application controlled start/stop profiling within eclipse [message #96530 is a reply to message #96412] Fri, 20 April 2007 17:58 Go to previous message
No real name is currently offline No real name
Messages: 404
Registered: July 2009
Senior Member
If you uncheck the option "Automatically start monitoring when application
is launched", then the agent will start in "pause" mode. You can start
monitoring the agent using the "Start Monitoring" toolbar item of the
profiling monitor view.

Thanks,
Ali Mehregani


"Guy Coleman" <guy.coleman@prolog.uk.com> wrote in message
news:f07as1$9op$1@build.eclipse.org...
> Hi,
>
> I've been profiling Java applications with TPTP from within Eclipse (using
> the Profile As -> Java Application menu items) and it's been working very
> well.
>
> I now want to profile some applications that have a long start up time,
> and I don't want to start profiling until the startup is over.
>
> I understand that if I ran the application stand alone and used
> server=application I could control when profiling is started/stopping from
> within the application.
>
> I can't see a way to do this from within the profiling options in Eclipse.
> There is a "Automatically start monitoring when application is launched"
> check box, but the documentation doesn't cover how to then start profiling
> later.
>
> Am I missing something? Thanks,
> -Guy Coleman
Previous Topic:Concering bug 144950
Next Topic:can't launch agent controller server on linux, missing libraries
Goto Forum:
  


Current Time: Sat Oct 25 04:40:53 GMT 2014

Powered by FUDForum. Page generated in 0.01991 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software