Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Linux Tools Project » gprof view show no data on MingW/Windows(gprof view show no data on MingW/Windows)
gprof view show no data on MingW/Windows [message #629659] Wed, 29 September 2010 03:34 Go to next message
No real name is currently offline No real name
Messages: 2
Registered: September 2010
Junior Member
Hi,

I am using Eclipse Helios, and have the binutils directory in my path. I have compiled and linked an application into app.exe, run it to generate the gmon.out, and finally run gprof app.exe gmon.out that prints some textual statistics
that seems ok.

I copied the app.exe and gmon.out into the eclipse workspace, and double click on gmon.out. The dialog box pops up, and I enter the filename for the app.exe.

Still, the gprof view is empty! Sometimes I get an "invalid binary format" messagebox, sometimes not. But I never get any profiling data to display in the gprof Eclipse view.

I use MingW on Windows.

Any suggestions are most welcome!

/John
Re: gprof view show no data on MingW/Windows [message #629716 is a reply to message #629659] Wed, 29 September 2010 07:11 Go to previous messageGo to next message
No real name is currently offline No real name
Messages: 2
Registered: September 2010
Junior Member
Additional date! After building with MingW on Windows using -pg, and running my app.exe, I get a gmon.out file as expected. using the command "gprof app.exe gmon.out", I get a nice profiling report printed as expected.

However, when I use the gpof Eclipse view and double click on the same gmon.out file, and point out app.exe, I get this errors in the Eclipse log:

java.io.IOException: Invalid gmon file
at org.eclipse.linuxtools.gprof.parser.GmonDecoder.readHeader(G monDecoder.java:131)
at org.eclipse.linuxtools.gprof.parser.GmonDecoder.read(GmonDec oder.java:114)
at org.eclipse.linuxtools.gprof.parser.GmonDecoder.read(GmonDec oder.java:104)
at org.eclipse.linuxtools.gprof.view.GmonView.displayGprofView( GmonView.java:200)
at org.eclipse.linuxtools.gprof.action.OpenGmonAction.open(Open GmonAction.java:55)
at org.eclipse.ui.internal.EditorManager$3.run(EditorManager.ja va:701)
at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator .java:70)
at org.eclipse.ui.internal.EditorManager.openExternalEditor(Edi torManager.java:694)
at org.eclipse.ui.internal.EditorManager.openEditorFromDescript or(EditorManager.java:668)
at org.eclipse.ui.internal.EditorManager.openEditor(EditorManag er.java:638)
at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditorBatched( WorkbenchPage.java:2860)
at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditor(Workben chPage.java:2768)
at org.eclipse.ui.internal.WorkbenchPage.access$11(WorkbenchPag e.java:2760)
at org.eclipse.ui.internal.WorkbenchPage$10.run(WorkbenchPage.j ava:2711)
at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator .java:70)
at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPa ge.java:2707)
at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPa ge.java:2691)
at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPa ge.java:2682)
at org.eclipse.ui.ide.IDE.openEditor(IDE.java:651)
at org.eclipse.ui.ide.IDE.openEditor(IDE.java:610)
at org.eclipse.ui.actions.OpenFileAction.openFile(OpenFileActio n.java:99)
at org.eclipse.ui.actions.OpenSystemEditorAction.run(OpenSystem EditorAction.java:99)
at org.eclipse.ui.actions.RetargetAction.run(RetargetAction.jav a:221)
at org.eclipse.ui.navigator.CommonNavigatorManager$3.open(Commo nNavigatorManager.java:185)
at org.eclipse.ui.OpenAndLinkWithEditorHelper$InternalListener. open(OpenAndLinkWithEditorHelper.java:48)
at org.eclipse.jface.viewers.StructuredViewer$2.run(StructuredV iewer.java:845)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:49)
at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:17 5)
at org.eclipse.jface.viewers.StructuredViewer.fireOpen(Structur edViewer.java:843)
at org.eclipse.jface.viewers.StructuredViewer.handleOpen(Struct uredViewer.java:1131)
at org.eclipse.ui.navigator.CommonViewer.handleOpen(CommonViewe r.java:462)
at org.eclipse.jface.viewers.StructuredViewer$6.handleOpen(Stru cturedViewer.java:1235)
at org.eclipse.jface.util.OpenStrategy.fireOpenEvent(OpenStrate gy.java:264)
at org.eclipse.jface.util.OpenStrategy.access$2(OpenStrategy.ja va:258)
at org.eclipse.jface.util.OpenStrategy$1.handleEvent(OpenStrate gy.java:298)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :84)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.ja va:4066)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :3657)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a:2640)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2604)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:24 38)
at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:671)
at org.eclipse.core.databinding.observable.Realm.runWithDefault (Realm.java:332)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java:664)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:149)
at org.eclipse.ui.internal.ide.application.IDEApplication.start (IDEApplication.java:115)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(Eclips eAppHandle.java:196)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .runApplication(EclipseAppLauncher.java:110)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .start(EclipseAppLauncher.java:79)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:369)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:179)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java: 619)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:574)
at org.eclipse.equinox.launcher.Main.run(Main.java:1407)
at org.eclipse.equinox.launcher.Main.main(Main.java:1383)


Why can gprof. exe successfully read my gmon.out file, but the gprof Eclipse viewer cannot?

/John
Re: gprof view show no data on MingW/Windows [message #630824 is a reply to message #629716] Tue, 05 October 2010 04:04 Go to previous message
Xavier Raynaud is currently offline Xavier Raynaud
Messages: 7
Registered: July 2009
Junior Member
It looks like similar to https://bugs.eclipse.org/bugs/show_bug.cgi?id=315027


There is 3 different format for gmon files:

o MAGIC
o BSD
o BSD44

It seems that cygwin/mingW generates BSD gmon files.

Unfortunately, for now, eclipse plug-in only support MAGIC format, which is,
AFAIK, the default one on Linux.
Previous Topic:After upgrade to 2.0 Autotools does not work
Next Topic:unable to get chart view of gmon.out
Goto Forum:
  


Current Time: Thu Apr 17 14:29:26 EDT 2014

Powered by FUDForum. Page generated in 0.03006 seconds