Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 366835

Summary: NPE profiling with OProfile on Juno M4
Product: z_Archived Reporter: Andrew Overholt <overholt>
Component: LinuxToolsAssignee: Roland Grunberg <rgrunber>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: kksebasti
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Whiteboard:

Description Andrew Overholt CLA 2011-12-15 11:59:11 EST
Build id: 20111215-0110
EPP package: http://build.eclipse.org/technology/epp/epp_build/juno/download/20111215-0115/20111215-0115_eclipse-linuxtools-juno-M4-linux.gtk.x86_64.tar.gz

Fedora 16, x86_64

Using the above EPP package I tried the canonical factorial example.  After right-clicking on the project node and selecting "Profile with OProfile" I got an error dialogue and the following exception in the workspace log:

!ENTRY org.eclipse.core.jobs 4 2 2011-12-15 11:54:33.350
!MESSAGE An internal error occurred during: "Launching factorial".
!STACK 0
java.lang.NullPointerException
        at org.eclipse.linuxtools.oprofile.core.Oprofile.getTimerMode(Oprofile.java:172)
        at org.eclipse.linuxtools.oprofile.core.linux.LinuxOpcontrolProvider.setupDaemon(LinuxOpcontrolProvider.java:185)
        at org.eclipse.linuxtools.oprofile.launch.launching.AbstractOprofileLaunchConfigurationDelegate.oprofileSetupDaemon(Ab        at org.eclipse.linuxtools.oprofile.launch.launching.OprofileLaunchConfigurationDelegate.preExec(OprofileLaunchConfigur
        at org.eclipse.linuxtools.oprofile.launch.launching.AbstractOprofileLaunchConfigurationDelegate.launch(AbstractOprofil        at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:855)
        at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:704)
        at org.eclipse.debug.internal.ui.DebugUIPlugin.buildAndLaunch(DebugUIPlugin.java:951)
        at org.eclipse.debug.internal.ui.DebugUIPlugin$8.run(DebugUIPlugin.java:1155)
        at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
Comment 1 Roland Grunberg CLA 2011-12-16 12:00:49 EST
Have been able to reproduce the error by ensuring the oprofile kernel module is loaded prior to doing any profiling. From there if a manual oprofile launch is attempted, then this error occurs. Testing out a fix.
Comment 2 Roland Grunberg CLA 2011-12-16 14:23:16 EST
cc74a23bc9a8ca6a10f28b04cac82f2fbb523cd7 should resolve this issue.
Comment 3 Roland Grunberg CLA 2011-12-23 10:21:18 EST
Resolving as fixed.