Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Linux Tools Project » Rob.
Rob. [message #568899] Sat, 29 May 2010 13:52 Go to next message
Robert Simpson is currently offline Robert SimpsonFriend
Messages: 11
Registered: May 2010
Junior Member
Hi,

Having got eclipse installed and working and oprofiler running from the command line, I've been trying to install the plugin.

(I think) I've followed the instructions in http://wiki.eclipse.org/Linux_Tools_Project/OProfile/User_Gu ide, including building opxml and installing it as it wasn't on my system at all.

When I try to profile c++ in Eclipse I get the error: "An error occurred with opxml The xml output could not be read..."

Running opxml info gives:
"oprofile: could not open unit mask description file /usr/local/share/oprofile//x64-64/hammer/unit masks"

and indeed there is no oprofile directory in /usr/local/share.

Any ideas how to proceed? What have I missed?
Re: opxml installation [message #568973 is a reply to message #568899] Wed, 02 June 2010 21:40 Go to previous messageGo to next message
Roland Grunberg is currently offline Roland GrunbergFriend
Messages: 27
Registered: December 2009
Junior Member
Robert Simpson wrote on Sat, 29 May 2010 09:52
> Hi,
>
> Having got eclipse installed and working and oprofiler running from the command line, I've been trying to install the plugin.
>
> (I think) I've followed the instructions in http://wiki.eclipse.org/Linux_Tools_Project/OProfile/User_Gu ide, including building opxml and installing it as it wasn't on my system at all.
>
> When I try to profile c++ in Eclipse I get the error: "An error occurred with opxml The xml output could not be read..."
>
> Running opxml info gives:
> "oprofile: could not open unit mask description file /usr/local/share/oprofile//x64-64/hammer/unit masks"
>
> and indeed there is no oprofile directory in /usr/local/share.
>
> Any ideas how to proceed? What have I missed?


If you try the following from the command-line does it succeed ?

opcontrol --image=/path/to/the/binary
opcontrol --start
/path/to/the/binary
opcontrol --stop

If not, then I believe this is being caused by opcontrol itself (which is part of a set of tools used by the eclipse-oprofile plugin).

However, the fact that opcontrol was looking for some files in /usr/local/share would indicate that you compiled oprofile locally. Did you run 'make install' afterwards? If not, then I think this would need to be done, and might be the reason the files are not present.
Re: opxml installation [message #568998 is a reply to message #568973] Thu, 03 June 2010 04:23 Go to previous messageGo to next message
Robert Simpson is currently offline Robert SimpsonFriend
Messages: 11
Registered: May 2010
Junior Member
It works fine from the command line (except I had to 'sudo' the opcontrol commands).

I think I did a make install but can you tell me the directory? If I missed it out can I just go back and do a make install or do I need to recompile everything?
Re: opxml installation [message #569012 is a reply to message #568998] Thu, 03 June 2010 15:26 Go to previous messageGo to next message
Roland Grunberg is currently offline Roland GrunbergFriend
Messages: 27
Registered: December 2009
Junior Member
Robert Simpson wrote on Thu, 03 June 2010 00:22
> It works fine from the command line (except I had to 'sudo' the opcontrol commands).
>
> I think I did a make install but can you tell me the directory? If I missed it out can I just go back and do a make install or do I need to recompile everything?


There should be an oprofile directory created in /usr/local/share by default after running make install. You could try looking on your system if by any chance it may be somewhere else, but if you did just a basic ./configure, without adding any flags like --prefix, or --datadir then there's no reason for it to be anywhere else. In fact, I think that even if you did, oprofile should use the values you specified when searching.

Also, after starting opcontrol, executing your binary, then stopping it, does running 'opxml sessions' show a session named "current" under some event name in the xml. If so, then does running opxml model-data [event_name] [session_name] output xml data on that session?
Re: opxml installation [message #569024 is a reply to message #568899] Thu, 03 June 2010 19:01 Go to previous messageGo to next message
Roland Grunberg is currently offline Roland GrunbergFriend
Messages: 27
Registered: December 2009
Junior Member
I was able to reproduce your problem on the command-line. Specifically, running opxml info gave me the error about not finding the the unit mask description file in "/usr/share/oprofile...". (seems like i got the opposite of what you got).
The compilation of oprofile installed all the necessary files in /usr/local/share/oprofile, so i just made a symlink in /usr/share to that location. opxml info worked after that.

I'm not quite sure why it was looking in the wrong directory. I think it might have something to do with the fact that installing oprofile-devel (needed for opxml compilation) brought in oprofile, which may have changed some settings causing opxml to look in the wrong folder afterwards.
I'll look into this, but for now, assuming a successfull compilation of oprofile, you should try finding where the unit_masks file gets installed, and then make a symlink from the top-level oprofile directory to wherever opxml is expecting to find the actual folder.
Re: opxml installation [message #569721 is a reply to message #569024] Thu, 08 July 2010 15:45 Go to previous message
Dan Lea is currently offline Dan LeaFriend
Messages: 2
Registered: July 2010
Junior Member
I had the same problem after building oprofile-devel from source in Ubuntu. I soft linked /usr/local/share/oprofile to /usr/share/oprofile (the install of Ubuntu's build) to fix the problem, though I expect this could result in build inconsistencies.

Note that it's looking for the files in usr/local - not sure you had it the same way round in your post Roland.
Previous Topic:Refresh coverage
Next Topic:failed to map segment from shared object
Goto Forum:
  


Current Time: Thu Apr 25 02:15:04 GMT 2024

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

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

Back to the top