How to profile as "Eclipse Application" [message #106179] |
Mon, 23 July 2007 16:07 |
Eclipse User |
|
|
|
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 #106435 is a reply to message #106268] |
Wed, 25 July 2007 10:01 |
Eclipse User |
|
|
|
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 |
Eclipse User |
|
|
|
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
|
|
|
Powered by
FUDForum. Page generated in 0.06079 seconds