Or my pain with the Eclipse Profiling package.
My task for today – find a performance problem with our Eclipse application. Rather than use the sampling profiler built-in in to the VM (-hprof option) I wanted to use a more accurate tracing profiler. So my painful journey began.
- Find the Eclipse Test and Performance Tools Platform website (https://www.eclipse.org/tptp/)
- TPTP website hides the installation instructions – however Google found them here (https://www.eclipse.org/tptp/home/downloads/installguide/InstallGuide42.html)
- Using the update site (https://eclipse.org/tptp/updates/site.xml) recommend in the installation instructions, try to find the features. It’s slow, insanely slow.
- From 4.2.1 select the Tracing and Profiling package – get warned of errors because I don’t have all required plugins
- Use the Select required – get errors because it can’t find the required EMF dependency (among others)
- Now try the manual steps (https://www.eclipse.org/tptp/home/downloads/installguide/InstallGuide42.html#install_manual) of getting the All TPTP file
(https://www.eclipse.org/downloads/download.php?file=/tptp/4.2.0/TPTP-4.2.0-200606190100A/tptp.runtime-TPTP-4.2.0.zip) from an Eclipse download site. Hint don’t choose the main site it’s slow, try anything else (I used Indiana).
- Unzip the download files in your eclipse directory.
- Restart Eclipse
- Now I get the option to Analyze my code (a static analysis tool – like PMD. BTW why the duplication of effort?), but no “Profile As…” item in my toolbar/context menus (https://www.eclipse.org/articles/Article-TPTP-Profiling-Tool/tptpProfilingArticle.html)
– what gives? Now I suspect that the right components were always on my disk I just didn’t know how to activate them.
- Now I’ve got a copy of TPTP 4.2.x installed maybe I can retry the update site and find a missing feature. But no joy just more wasted time.
- Off to try a commercial profiler for a few days. At least I will get a trial version that does the job.
- Tried YourKit profile v5.5 (https://www.yourkit.com/overview/index.jsp) – it installs quickly and easily.
- But when I try to profile a SWT application it dies. A quick glance at the release notes suggests that I need the YourKit Beta 6 (https://www.yourkit.com/eap/index.jsp#change_list) to profile SWT applications.
- Next problem getting proper trace information requires Java 1.5 (we develop against ancient and creaky 1.4.x).
- Finally after 3 hours I’m actually profiling an app.
- YourKit is having some problems too (https://forums.yourkit.com/viewtopic.php?t=767) I can only get the CPU sampling not tracing to work. In the end I’ve only succeeded in getting a graphical version of hprof (with better stack traces).
Does anyone else think this completely insane? Does anyone from the TPTP project care?
Update: What I would like from the TPTP people at Eclipse:
- An Update mechanism that knows how to get emf.core and the other missing plug-ins or
- Change the installation instructions to include a description of the dependancies. and
- Include instructions on how to activate the profiler et al. once its installed.