Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Linux Tools Project » OProfile plug in problems (doesn't work)(Library errors for operf, fatal errors for opcontrol)
OProfile plug in problems (doesn't work) [message #1453909] Mon, 27 October 2014 17:42 Go to next message
Mila Gorobets is currently offline Mila GorobetsFriend
Messages: 3
Registered: October 2014
Junior Member
I've been struggling with this problem for a few days now.

I have Nvidia Nsight which is built on Eclipse 3.8. So I went to "Install New Software..." and found the OProfile version for Juno, installed it.

Made a new configuration, but when I run it, I get an error:

FATAL: An error occurred running opcontrol.

Reason:
Exit code of opcontrol indicates failure.
Look for additional information in the Error Log.


I don't know where the error log is for Opcontrol. What is the file even called? I searched the computer (locate opcontrol) and it found 2 locations, but one was the executable, and the other one the archive (I guess, it's a .gz). Can't find any error log for oprofile either.

I also figured, oh, maybe the Luna one works, but it actually gives the same error when I use opcontrol. If I specify to use operf, it can't find an included library (added via LD_LIBRARY_PATH to the Environment tab) and won't run. Though this creates an operf log in my directory.

Any chance of this working? I really want it to, but I don't want to spend a week trying to fix it.


Re: OProfile plug in problems (doesn't work) [message #1453924 is a reply to message #1453909] Mon, 27 October 2014 18:12 Go to previous messageGo to next message
Jeff Johnston is currently offline Jeff JohnstonFriend
Messages: 215
Registered: July 2009
Senior Member
The Error log is referring to the Eclipse error log. You can find it by going to:

Help->About Eclipse->Installation->Configuration->View Error Log (on Luna)...your older version may have a more direct route to the View Error Log button.

You can look at the error log as well by going to your workspace and looking at

.metadata/.log

The log may or may not contain more information about the error.
Re: OProfile plug in problems (doesn't work) [message #1453942 is a reply to message #1453924] Mon, 27 October 2014 18:45 Go to previous messageGo to next message
Mila Gorobets is currently offline Mila GorobetsFriend
Messages: 3
Registered: October 2014
Junior Member
I installed Luna to test this on as well, and it can't find the libraries specific in Environment either when I use Operf. In the log for Luna it says:
!ENTRY org.eclipse.linuxtools.oprofile.core 4 0 2014-10-27 12:33:07.200
!MESSAGE opreport process error output: warning: /no-vmlinux could not be found.


When I use try to use Opcontrol in Luna it tells me that it could not fild an Opcontrol provider. I want to run the install.sh, but I can't find it. If I go to add new software to Luna, it says Oprofile is already installed and wont do anything.

Now back to the Juno (3.eight). I found the log file. When I run with the Operf option, I get this:
!ENTRY org.eclipse.linuxtools.oprofile.core 4 0 2014-10-27 12:40:17.486
!MESSAGE opreport process error output: warning: /no-vmlinux could not be found.


So same error as on Luna.

With Opcontrol, I got the same error message originally as with Luna, but I was able to run the install.sh script, after which the log file contained:
!ENTRY org.eclipse.linuxtools.oprofile.core 4 0 2014-10-27 12:43:06.060
!MESSAGE opcontrol process error output: Failed to open profile device: Device or resource busy
Couldn't start oprofiled.
Check the log file "/var/lib/oprofile/samples/oprofiled.log" and kernel syslog



So I'm guessing Luna has the same issue. I get the same error message (device or resource busy) when I try opcontrol from command line.

BTW, I am running Ubuntu 14.04LTS, though I'm not sure that matters.

Does that clear things up more? I'm gonna go google the error and report back if I fix it.
Re: OProfile plug in problems (doesn't work) [message #1453989 is a reply to message #1453942] Mon, 27 October 2014 20:24 Go to previous messageGo to next message
Mila Gorobets is currently offline Mila GorobetsFriend
Messages: 3
Registered: October 2014
Junior Member
Well, some progress.

I closed the eclipse I had open and launched a new terminal. In the terminal I exported the LD_LIBRARY_PATH values first and started eclipse from the same terminal window after.

Profiler now runs, but complains about
_mcleanup: gmon.out: Permission denied


My code runs and I get the printf statements I expected. I can also view the OProfile output.

To me it seems like setting Environment paths in configuration doesn't work properly. Or I don't do it properly.
Re: OProfile plug in problems (doesn't work) [message #1454906 is a reply to message #1453989] Tue, 28 October 2014 22:17 Go to previous message
Jeff Johnston is currently offline Jeff JohnstonFriend
Messages: 215
Registered: July 2009
Senior Member
The _mcleanup message is due to you having -pg specified for your project and when it is run, the working directory ends up being one where the id used to run the program does not have permissions to write to that directory. It has nothing to do with OProfile (gmon.out is for gprof).

Regarding setting environment variables. There are two sets of environment variables. If you set the ones under Project Properties, those environment variables are only used when you build your project. Environment variables for profiling and running need to be set in the Profiling launch configuration. If you have done so, it is possible that there is a bug in the OProfile plug-in that is not passing these on when the program is launched under OProfile and you should open a bug against Linux Tools OProfile plug-in.
Previous Topic:gconv problem in Luna under windows
Next Topic:wrong gcov result
Goto Forum:
  


Current Time: Fri Apr 19 21:06:01 GMT 2024

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

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

Back to the top