| Summary: | OProfile can't be started with Eclipse Plug-in | ||
|---|---|---|---|
| Product: | z_Archived | Reporter: | Eric <eas> |
| Component: | LinuxTools | Assignee: | OProfile Inbox <linux.oprofile-inbox> |
| Status: | CLOSED FIXED | QA Contact: | |
| Severity: | blocker | ||
| Priority: | P3 | CC: | akurtakov, jjohnstn, kksebasti, overholt, sgehwolf |
| Version: | unspecified | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Linux | ||
| Whiteboard: | |||
|
Description
Eric
I am also not able to get it working on a real machine...details might follow. Hope the stackstrace is enought for the moment. (In reply to comment #1) > I am also not able to get it working on a real machine...details might follow. > Hope the stackstrace is enought for the moment. Since you are getting the sudo error, it looks like you ran install.sh and install-noconsolehelper.sh afterwards. You want to only run one of them. Since you are on CentOS, you'd want to use install.sh only. Make sure you have the usermode package installed. On a physical machine, Eclipse oprofile should work after that. (In reply to comment #0) > Used Software: > Running CentOS 5.4-i386-server VMWare Image from [1]. Since you are running Eclipse oprofile from within a VM, you have to run oprofile in timer interrupt mode. If the module gets loaded like this (as root): $ modprobe oprofile timer=1 And you attempt to profile from within Eclipse you'll likely get the following error: "You cannot specify any performance eventsbecause Oprofile is in timer mode" This is due to the fact that the Eclipse integration of oprofile explicitly sets the event via opcontrol. I've changed the summary of this bug to reflect that this isn't supported at the moment. Yet, I think we should. We'd need to do a couple of things to support this: 1. Have a way to determine if the module should get loaded in timer interrupt mode 2. Make sure to be able to do this in a secure way. I.e. There is no option to opcontrol which directs it to load the module in timer interrupt mode. Hence, we can't use the opcontrol wrapper we use at this time. 3. Don't set events explicitly if in timer interrupt mode. Here is the sequence of commands Eclipse oprofile emits to opcontrol: # opcontrol --reset # opcontrol --setup --separate=none --no-vmlinux --image=/path/to/binary --callgraph=0 --event=default # opcontrol --start # oprofile/org.eclipse.linuxtools.oprofile.core/natives/linux/scripts/opcontrol --dump # opcontrol --shutdown This only works on a physical machine. Trying to execute # opcontrol --deinit # modprobe oprofile timer=1 # opcontrol --setup --separate=none --no-vmlinux --image=/path/to/binary --callgraph=0 --event=default in a VM gives this error: You cannot specify any performance events because Oprofile is in timer mode Using this instead: # opcontrol --setup --separate=none --no-vmlinux --image=/path/to/binary does not yield an error. This pretty much describes what needs to be done to support this. Maybe everything got a bit confusing. #1 As I have stated it does _not_ work for me in - VM AND - on a physical machine (CentOS 5.6 + Eclipse Indigo) #2 Before posting the stacktrace I executed both uninstall scripts and just executed the 'install.sh' #3 I would like to direct your attention to 'Caused by: java.lang.NullPointerException' in the stacktrace. I am not able to do anything within Eclipse concerning OProfile. There is no possibility for me to configure OProfile in any way in the 'Profile Configuration'. #4 After exectuing $ modprobe oprofile timer=1 Following stacktrace can be obtained: java.lang.NoClassDefFoundError: Could not initialize class org.eclipse.linuxtools.oprofile.core.Oprofile at org.eclipse.linuxtools.oprofile.core.linux.LinuxOpcontrolProvider.setupDaemon(LinuxOpcontrolProvider.java:182) at org.eclipse.linuxtools.oprofile.launch.launching.AbstractOprofileLaunchConfigurationDelegate.oprofileSetupDaemon(AbstractOprofileLaunchConfigurationDelegate.java:130) at org.eclipse.linuxtools.oprofile.launch.launching.OprofileLaunchConfigurationDelegate.preExec(OprofileLaunchConfigurationDelegate.java:42) at org.eclipse.linuxtools.oprofile.launch.launching.AbstractOprofileLaunchConfigurationDelegate.launch(AbstractOprofileLaunchConfigurationDelegate.java:66) at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:853) at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:702) at org.eclipse.debug.internal.ui.DebugUIPlugin.buildAndLaunch(DebugUIPlugin.java:924) at org.eclipse.debug.internal.ui.DebugUIPlugin$8.run(DebugUIPlugin.java:1128) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54) #5 What I am gonna do: Tomorrow I will verify the error message on the real machine. I will put a configured VM image onto a FTP server showing the bug. Before working around the problem, maybe someone could have a try on the VM image since it reflects the errors which also occur on the real machine. Well, I tried on my Pentium III running CentOS 5.6 --- First, timer mode was enabled by default as described by [1]. To enable performance counters the kernel needs to be started with 'lapic' command This can be done in '/boot/grub/menu.lst' The command line will look like kernel /vmlinuz-2.6.18-238.12.1.el5 ro root=/dev/VolGroup00/LogVol00 rhgb quiet lapic [1]...http://oprofile.sourceforge.net/faq/ (Why is OProfile in timer mode on x86? I have performance counters...) --- It was then possible to do profiling using performance counters with OProfile. However, in Eclipse profiling with OProfile did not work. Any ideas? Stack trace below >>> eclipse.buildId=I20110613-1736 java.version=1.6.0_20 java.vendor=Sun Microsystems Inc. BootLoader constants: OS=linux, ARCH=x86, WS=gtk, NL=en_US Framework arguments: -product org.eclipse.epp.package.cpp.product Command-line arguments: -os linux -ws gtk -arch x86 -product org.eclipse.epp.package.cpp.product Error Sat Aug 06 18:55:00 CEST 2011 An internal error occurred during: "Launching test". java.lang.ExceptionInInitializerError at org.eclipse.linuxtools.oprofile.core.linux.LinuxOpcontrolProvider.setupDaemon(LinuxOpcontrolProvider.java:182) at org.eclipse.linuxtools.oprofile.launch.launching.AbstractOprofileLaunchConfigurationDelegate.oprofileSetupDaemon(AbstractOprofileLaunchConfigurationDelegate.java:130) at org.eclipse.linuxtools.oprofile.launch.launching.OprofileLaunchConfigurationDelegate.preExec(OprofileLaunchConfigurationDelegate.java:42) at org.eclipse.linuxtools.oprofile.launch.launching.AbstractOprofileLaunchConfigurationDelegate.launch(AbstractOprofileLaunchConfigurationDelegate.java:66) at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:854) at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:703) at org.eclipse.debug.internal.ui.DebugUIPlugin.buildAndLaunch(DebugUIPlugin.java:928) at org.eclipse.debug.internal.ui.DebugUIPlugin$8.run(DebugUIPlugin.java:1132) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54) Caused by: java.lang.NullPointerException at org.eclipse.linuxtools.oprofile.core.opxml.info.InfoAdapter.createHeaders(InfoAdapter.java:131) at org.eclipse.linuxtools.oprofile.core.opxml.info.InfoAdapter.process(InfoAdapter.java:124) at org.eclipse.linuxtools.oprofile.core.linux.OpxmlRunner.run(OpxmlRunner.java:111) at org.eclipse.linuxtools.oprofile.core.linux.LinuxOpxmlProvider$OpInfoRunner.run(LinuxOpxmlProvider.java:55) at org.eclipse.linuxtools.oprofile.core.linux.LinuxOpxmlProvider$OpInfoRunner.run0(LinuxOpxmlProvider.java:46) at org.eclipse.linuxtools.oprofile.core.daemon.OpInfo.getInfo(OpInfo.java:85) at org.eclipse.linuxtools.oprofile.core.Oprofile._initializeOprofileCore(Oprofile.java:94) at org.eclipse.linuxtools.oprofile.core.Oprofile.initializeOprofileModule(Oprofile.java:64) at org.eclipse.linuxtools.oprofile.core.Oprofile.<clinit>(Oprofile.java:43) ... 9 more <<< Is this problem still reproducible with Linux tools 1.2 release? No reply for a year. Closing. Please reopen if you still see the problem with Linux Tools 2.2 release. |