|
|
||
Felipe Leme's BlogCommunity: Java Tools ArchivesConfiguring Eclipse TPTP (a.k.a PQP) profiler on LinuxPosted by felipeal on June 26, 2008 at 07:23 PM | Permalink | Comments (3)After struggling for weeks and almost giving up, I finally managed to have the Eclipse TPTP profiler working on my Ubuntu 64bits box! As this was a painful and unbelievably hard experience (because of Eclipse TPTP, not Ubuntu/Linux, BTW), I'm going to share a few tips here. First of all, this is going to be a quick and dirty blog. I don't have the time, patience, or motivation to do a detailed step-by-step tutorial - there are plenty available (Got google?). The problem is, you follow them and something just is not there or does not work, then you got stuck - the idea here is to provide clues on why you got stuck and how to get going. So, let's assume you installed TPTP and try to profile a web application (which is already configured and can be ran as 'Run As -> Run on Server'). You right-click in the project, do a 'Profile As -> Profile on Server') and then... nothing. No exception, no error, no frogs failing from sky, nothing. Actually, there is one symptom: the monitor dialog opens, but empty. I knew from previous (and frustrated) attempts that the profiler needs to run an agent (which is OS-specific) and if the agent is not running, it pops up an error message (stating that the agent is not running - when I first got that message a few weeks ago, I google for it and figure that out). As the message didn't pop up this time, I figured some exception has been just ignored by Eclipse's UI, so I decide to do a tail -f on the .log file (located on WORKSPACE_DIR/.metadata), and bingo: got a message saying that the script could not be executed. (PS: I don't have the log messages anymore, so I won't be able to copy and paste the exact message). I will ignore for now the fact that when you download a linux tarball the proper files necessary to run the application should have all necessary executable bits turned on and jump to the point where I had to cd to ECLIPSE_INSTALL/plugins/org.eclipse.tptp.platform.ac.linux_em64t_4.4.1.v200804021410/agent_controller/bin and do a 'chmod +x *'. Once I did it, I tried to run again and got: [: 46: ==: unexpected operator Looking at those lines, I found some marvels of modern shell spripting: if [ x$TEMP == x ]; then export TEMP=/tmp fi As a lazy bum with a 10GB /tmp partition, I just commented it to: #if [ x$TEMP == x ]; then export TEMP=/tmp #fi Running it again, I got a new error now, something like (again, I don't have the output anymore): ACServer: error while loading shared libraries: ../lib/libtptpUtils.so: short file Sounded weird, so I decided to take a look on that file: # file ../lib/libtptpUtils.so ASCII Text Very nice: not only the files on bin are not executable, but the libraries that should be a symbolic link are text files which the name of the real libraries! Never saw such think, whoever did that deserves a Duke Award! Specially because I could fix it with a quick shell command: for i in `file *|grep -i ascii|cut -f 1 -d : `; do new=`cat $i`; rm $i ;ln -s $new $i; doneNow that I fixed the broken files provided in the tarball, I got an 'easy' problem: # ./ACStart.sh ACServer: error while loading shared libraries: libstdc++.so.5: cannot open shared object file: No such file or directoryAfter I couple of minutes googleing and apt-cache searching: And now: # ./ACStart.sh Starting Agent Controller. ACServer started successfully. # ./ACStop.sh Shutting down the Agent Controller... ACServer stopped. In other words, at this point I knew the non-java (the agent) part of the profiler will work, so I could try it again in the UI (notice that the only Ubuntu-specific issue here was the missing libstdc++5; all the rest was bad packaging by the PTPT project). Back to Eclipse, I did the "Profile As" again, and... nothing. I mean, know I saw same status bar messages saying the profiler received events and such, and a 'ps -aef|grep AC' shows the agent running. But I couldn't figure out how to get the results in real time (I could export a report in HTML, which is not useful for the kind of profiling I was going to do). After googleing around, it looked like I should be able to right click the profiler elements in the Monitor view and select a 'Opening With -> Execution Statistics' editor (see? I'm even using the correct Eclipse terms at this point :-). But looks like the bastard is not available, even though when I installed the TPTP/Web project I select the option to install all the dependencies. At this point, I thought that the only plausible issue was some missing plugin to visualize the results. I triggered the Eclipse update panel again and expanded all TPTP options to see if I found something with a reasonable name that could solve the issue... and nothing. So, as a last and desperate resource, I decided to install all remaining TPTP plugins (including some BIRT stuff), and... voilĂ , it worked! Seriously, I finally got the execution statistics, method statistics, etc. I was so thrilled that I almost cried! But instead, I decided to write this quick block. And for those non-believers (I was such one), here is a screenshot:
PS: regarding the meaning of PQP, I will leave the explanation to the Brazilian readers :-) Extra! Extra! Lomboz has gone open source!Posted by felipeal on January 22, 2004 at 11:23 AM | Permalink | Comments (7)Lomboz - a J2EE plug-in for Eclipse - has become open source. That is great news for the Eclipse and Open Source communities. A couple of days ago I was browsing the Web to get more information about JOnAS and JORAM. As both products are offered by the same entity (ObjectWeb), I decided to take a look at their repository. Then, once I clicked on that link, I got the suprise: it said Lomboz was their top download project for the last 30 days!!! If you do not understand my reaction let me tell a little bit of history: one of the main complaints about Eclipse is the lack of a free (as free-speech) J2EE plug-in, especially something that offered JSP editing and debugging capabilities. So, if you wanted a fully-integrated J2EE environment on top on Eclipse, you would need to install MyEclipseIde (which is an awesome product, but not free) or Lomboz (which was free but as free-beer, but not as free-speech). I think MyEclipseIDE is a better product, although Lomboz is more popular because it is free. But even though it was free, Lomboz had many limitations and bugs that couldn't be fixed by the community (as it was a closed-source product). To make things even more complicated, Lomboz was hosted on SourceForge, which would suggest it was indeed open-source (but the truth is that they used SF resources only for forums and bug reporting). What intrigues me most though (and hence the reason I am posting this message) is the fact that Lomboz transition to the OSS (Open Source Software) world has not been heralded as someone would expect - in fact, if you google for "Lomboz Open source", the only notification you will find is Eteration's news page, which does not even mentioned *when* that happened. I like Eclipse - and that comes from a Emacs junkie, whose favorite IDE is called JDK. It's the only IDE that have a nice look feel on Linux, for instance. But the fact that you have to install a lot of plug-ins to make it fully-productive is a pain. Specially when a plug-in breaks something and then you have to re-install Eclipse (and all the plug-ins). So, now that one of the last pieces of the puzzle has been found, I think it is time for an OSS project that creates an Eclipse distribution bundled with a couple of nice OSS plug-ins (like Lomboz, XMen, JFaceJDBC, etc..) integrated with bundled servers (like JBoss, Tomcat, HSQLDB, etc). We could even call it something like ESAD (Eclipse Studio Application Development) or EIE (Eclipse Integrated Environment) - although I think the first option would have some brand/copyright issues :-). | ||
|
|