Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Test and Performance Tools Platform (TPTP) » How to profile as "Eclipse Application"
How to profile as "Eclipse Application" [message #106179] Mon, 23 July 2007 16:07 Go to next message
Eclipse UserFriend
Originally posted by: jamesb.broadcom.com

Hi all,

I'm trying to profile the CDT debug plugins to identify hotspots in our
Launch configuration or the bits we run off.

Using a 32-bit platform, I can create a simple hello world app,
right-click Profile As->Java Application, select Execution Time analysis
and get reasonable timing output for main and other called methods. All
good so far!

However if I try to do the same thing using Profile As->Eclipse
Application (as I would to debug), there are a number of problems:
1) The Project workspace path has been mangled. i.e. instead of using
../runtimeEclipseApplication/.... (as shown in the debug as/profile as
dialog) it ends up creating directories with paths like:
/home/jamesb/"/home/jamesb/jamesb-work/.metadata/
or /home/jamesb/"file:/....

It seems that somewhere a quote ' " ' is being passed as part of the
workspace path, and a workspace is being created, with literal quotes,
relative to my home directory...
(If I simply perform a debug launch, everything works as expected.)

2) Finally, when I exit the application, nothing has been instrumented,
and in the Profile perspective, Execution Time Analysis is empty.
Obviously I haven't configured it properly (though it did "just work" for
the simple java app)...

I've had a look in the help and a google for tutorials/docs on how to
profile an Eclipse application/Eclipse plugins, and have so far drawn a
blank.

Has anyone else seen either of these problem, or can anyone point me in
the right direction for a solution?

Many thanks,

James
Re: How to profile as "Eclipse Application" [message #106201 is a reply to message #106179] Mon, 23 July 2007 17:32 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: jamesb.broadcom.com

Right, perhaps I was a bit hasty to post to the newsgroup.

Item 1 looks like a bug to me, I have filed a report --
https://bugs.eclipse.org/bugs/show_bug.cgi?id=197512.

Problem 2 is due to my own incompetence -- all the classes had been
excluded from instrumentation, I believe... (I still haven't managed to
make it work yet due to the bug in 1 :( ).

James
Re: How to profile as "Eclipse Application" [message #106268 is a reply to message #106201] Tue, 24 July 2007 10:57 Go to previous messageGo to next message
Asaf Yaffe is currently offline Asaf YaffeFriend
Messages: 333
Registered: July 2009
Senior Member
James Blackburn wrote:
> Right, perhaps I was a bit hasty to post to the newsgroup.
>
> Item 1 looks like a bug to me, I have filed a report --
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=197512.
>
> Problem 2 is due to my own incompetence -- all the classes had been
> excluded from instrumentation, I believe... (I still haven't managed to
> make it work yet due to the bug in 1 :( ).
>
> James
>

James,

A possible workaround to the problem is to launch your Eclipse
application outside of the workbench (as a standalone Java application)
and attach to it from the workbench.

More information is available in the TPTP on line documentation (search
for standalone profiling or profiling in "enabled" mode) and in the
JVMTI Profiler Readme file (located with the JVMTI runtime files, in the
org.eclipse.tptp.platform.jvmti.runtime* plugin).

HTH,
Asaf

--
Asaf Yaffe
Eclipse TPTP Committer, JVMTI Profiler
Re: How to profile as "Eclipse Application" [message #106435 is a reply to message #106268] Wed, 25 July 2007 10:01 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: jamesb.broadcom.com

Thanks for your response Asaf.

> A possible workaround to the problem is to launch your Eclipse
> application outside of the workbench (as a standalone Java application)
> and attach to it from the workbench.

Unfortunately I'm having little luck getting even an external Agent
Controller working correctly.

I thought I would use the external Agent Controller (as it's not clear
from the JVMTI readme where TPTP_AC_HOME is if launching the IAC
externally...). So I followed the instructions on setting up the external
agent controller, set up all my paths, etc. And started the server with
ACStart.sh. ps shows the server process is running.

When I go to run SampleClient, however, I get:
bash:jamesb> SampleClient

Connected to the Agent Controller on "localhost" at port number 10006
ERROR: Unable to get agent org.eclipse.tptp.TimeCollector
Press any key to exit...

Similary running Eclipse specifying the agent gives:
Error occurred during initialization of VM
agent library failed to init: JPIBootLoader

Google seems to be sparse on both of these error messages. I *think* I've
followed all the getting_started instructions to the letter. Any ideas?

James
Re: How to profile as "Eclipse Application" [message #106449 is a reply to message #106268] Wed, 25 July 2007 10:22 Go to previous message
Eclipse UserFriend
Originally posted by: jamesb.broadcom.com

Ugh!

Well it seems running my HelloWorld App (and Eclipse App) from within
Eclipse, using the External Agent works! So likely it's a Java path issue
when using the shell :s

At least there's progress :D

Is it worth filing a bug report about the IAC not working under x86_64, or
is this a known problem (It's difficult to know whether my issue has been
reported before...)

James
Previous Topic:Problems starting Agent Controller TPTP-4.4.0
Next Topic:Monitoring with static parser
Goto Forum:
  


Current Time: Fri Dec 19 21:04:46 GMT 2014

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

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