Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Linux Tools Project » OProfile on openSUSE 11.1
OProfile on openSUSE 11.1 [message #2562] Tue, 17 February 2009 07:49 Go to next message
Mikael Springer is currently offline Mikael Springer
Messages: 20
Registered: July 2009
Junior Member
Hi.

I'd like to try the OProfile plugin on openSUSE 11.1. I tried installing
according to the instructions but of course it failed since Fedora is
the only supported platform at the moment. But is there anything I can
do to make this work besides hacking the plugin itself? Is support for
other distros (openSUSE, Ubuntu ...) planned in the near future?

Regards, Micke.

(Great work by the way, I love the Valgrind plugin)
Re: OProfile on openSUSE 11.1 [message #2591 is a reply to message #2562] Tue, 17 February 2009 09:24 Go to previous messageGo to next message
Axel Mueller is currently offline Axel Mueller
Messages: 1949
Registered: July 2009
Senior Member
Mikael Steen Springer wrote:

> Hi.

> I'd like to try the OProfile plugin on openSUSE 11.1. I tried installing
> according to the instructions but of course it failed since Fedora is
> the only supported platform at the moment. But is there anything I can
> do to make this work besides hacking the plugin itself? Is support for
> other distros (openSUSE, Ubuntu ...) planned in the near future?

> Regards, Micke.

> (Great work by the way, I love the Valgrind plugin)
I also had problems with OProfile plugin on Gentoo.
- no events are shown in the run configuration
- I can start the profiler (verified with opcontrol --status in an
external console) but I do not see any results in Eclipse (the directory
/var/lib/oprofile/samples/current is filled with samples info). The
OProfile view is completely empty!

The Eclipse log shows some errors:
Unhandled event loop exception
java.lang.IllegalArgumentException: Argument cannot be null
at org.eclipse.swt.SWT.error(SWT.java:3761)
at org.eclipse.swt.SWT.error(SWT.java:3695)
at org.eclipse.swt.SWT.error(SWT.java:3666)
at org.eclipse.swt.widgets.Widget.error(Widget.java:446)
at org.eclipse.swt.widgets.Text.setText(Text.java:1894)
at
org.eclipse.linuxtools.oprofile.ui.view.OprofiledLogDialog.c reateCustomArea(OprofileViewLogReaderAction.java:137)
at
org.eclipse.jface.dialogs.MessageDialog.createDialogArea(Mes sageDialog.java:233)
at
org.eclipse.jface.dialogs.IconAndMessageDialog.createDialogA ndButtonArea(IconAndMessageDialog.java:212)
at
org.eclipse.jface.dialogs.IconAndMessageDialog.createContent s(IconAndMessageDialog.java:191)
at org.eclipse.jface.window.Window.create(Window.java:431)
at org.eclipse.jface.dialogs.Dialog.create(Dialog.java:1089)
at org.eclipse.jface.window.Window.open(Window.java:790)
at
org.eclipse.linuxtools.oprofile.ui.view.OprofileViewLogReade rAction.run(OprofileViewLogReaderAction.java:64)
at org.eclipse.jface.action.Action.runWithEvent(Action.java:498 )
at
org.eclipse.jface.action.ActionContributionItem.handleWidget Selection(ActionContributionItem.java:583)
at
org.eclipse.jface.action.ActionContributionItem.access$2(Act ionContributionItem.java:500)
at
org.eclipse.jface.action.ActionContributionItem$5.handleEven t(ActionContributionItem.java:411)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :84)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1158)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.ja va:3401)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :3033)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a:2382)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2346)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:21 98)
at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:493)
at
org.eclipse.core.databinding.observable.Realm.runWithDefault (Realm.java:288)
at
org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java:488)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:149)
at
org.eclipse.ui.internal.ide.application.IDEApplication.start (IDEApplication.java:113)
at
org.eclipse.equinox.internal.app.EclipseAppHandle.run(Eclips eAppHandle.java:193)
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:386)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:179)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java: 549)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:504)
at org.eclipse.equinox.launcher.Main.run(Main.java:1236)
at org.eclipse.equinox.launcher.Main.main(Main.java:1212)



Axel

P.S. the libhover and Valgrind plugins are working like a charm.


Before you ask
- search this forum
- see the FAQ http://wiki.eclipse.org/CDT/User/FAQ
- google
Re: OProfile on openSUSE 11.1 [message #2620 is a reply to message #2562] Tue, 17 February 2009 10:11 Go to previous messageGo to next message
Kent Sebastian is currently offline Kent Sebastian
Messages: 32
Registered: July 2009
Member
Mikael Steen Springer wrote:

> Hi.

> I'd like to try the OProfile plugin on openSUSE 11.1. I tried installing
> according to the instructions but of course it failed since Fedora is
> the only supported platform at the moment. But is there anything I can
> do to make this work besides hacking the plugin itself? Is support for
> other distros (openSUSE, Ubuntu ...) planned in the near future?

> Regards, Micke.

> (Great work by the way, I love the Valgrind plugin)

Hello,

Could you provide more details as to what failed and when? Did the install
script give an error or was it an error dialog from within Eclipse?

It used to be Fedora only because of the use of rpm in the install script,
but that since has been removed. While I haven't tested on OpenSUSE or
others, I don't see an immediate reason why it wouldn't work.. unless
consolehelper isn't available.
Re: OProfile on openSUSE 11.1 [message #2649 is a reply to message #2591] Tue, 17 February 2009 10:41 Go to previous messageGo to next message
Kent Sebastian is currently offline Kent Sebastian
Messages: 32
Registered: July 2009
Member
Hello,

Just to be sure, did you run the install script (install.sh) in the
org.eclipse.linuxtools.oprofile.core_0.1.0.200901141551/nati ves/linux/scripts
directory? I imagine this extra non-standard step is going to cause a lot
of problems for users of this plugin..

Axel Mueller wrote:
> I also had problems with OProfile plugin on Gentoo.
> - no events are shown in the run configuration

Was there an error dialog before opening the run config? Try going into
the eclipse plugin directory, look for a dir named
org.eclipse.linuxtools.oprofile.core.linux.x86 (or x86_64), then into
os/linux/x86(_64) and run `./opxml info`. Does it spew some XML or give an
error message?

> - I can start the profiler (verified with opcontrol --status in an
> external console) but I do not see any results in Eclipse (the directory
> /var/lib/oprofile/samples/current is filled with samples info). The
> OProfile view is completely empty!

The view will only populate after a launch from within eclipse, or by
clicking Refresh View in the view's toolbar menu. If samples exist and a
Refresh View doesn't populate it, there's a big problem :) In the same
directory as above, try running `./opxml model-data <event> current` and
see if there is an error message.


This is odd also because both of these errors should have sent up error
dialogs...

> The Eclipse log shows some errors:
> Unhandled event loop exception
> java.lang.IllegalArgumentException: Argument cannot be null
...

Now this one is curious :) but I imagine it stems from the same source as
the other issues.


Thanks for trying out the plugin :) let me know your results and we'll try
to get this working for you

-Kent
Re: OProfile on openSUSE 11.1 [message #2678 is a reply to message #2649] Tue, 17 February 2009 10:54 Go to previous messageGo to next message
Axel Mueller is currently offline Axel Mueller
Messages: 1949
Registered: July 2009
Senior Member
Kent Sebastian wrote:

> Hello,

> Just to be sure, did you run the install script (install.sh) in the
>
org.eclipse.linuxtools.oprofile.core_0.1.0.200901141551/nati ves/linux/scripts
> directory? I imagine this extra non-standard step is going to cause a lot
> of problems for users of this plugin..
Yes I dit it. The popup window in the run configuration was very helpful
to remind me.

> Axel Mueller wrote:
>> I also had problems with OProfile plugin on Gentoo.
>> - no events are shown in the run configuration

> Was there an error dialog before opening the run config? Try going into
> the eclipse plugin directory, look for a dir named
> org.eclipse.linuxtools.oprofile.core.linux.x86 (or x86_64), then into
> os/linux/x86(_64) and run `./opxml info`. Does it spew some XML or give an
> error message?
/opxml: /lib/libc.so.6: version `GLIBC_2.8' not found (required by
/opxml)
Ah, I have glibc 2.6.1 installed (the latest stable version on Gentoo). I
guess that's the origin of my problems.

Axel


Before you ask
- search this forum
- see the FAQ http://wiki.eclipse.org/CDT/User/FAQ
- google
Re: OProfile on openSUSE 11.1 [message #2705 is a reply to message #2678] Tue, 17 February 2009 11:00 Go to previous messageGo to next message
Kent Sebastian is currently offline Kent Sebastian
Messages: 32
Registered: July 2009
Member
Axel Mueller wrote:
> /opxml: /lib/libc.so.6: version `GLIBC_2.8' not found (required by /opxml)
> Ah, I have glibc 2.6.1 installed (the latest stable version on Gentoo).
> I guess that's the origin of my problems.
>
> Axel
>

And this is the caveat of the oprofile plugin. It needs the native
binary to communicate with OProfile due to EPL/GPL incompatibilities. I
foresee these native bits being a problem for cross distribution
compatibility.

The source for opxml is in the
org.eclipse.linuxtools.oprofile.core_0.1.0.200901141551/nati ves/linux/opxml
directory. A `make` and `mv` to the aforementioned opxml directory
should fix it. Let me know how it goes :)


-Kent
Re: OProfile on openSUSE 11.1 [message #4055 is a reply to message #2705] Wed, 18 February 2009 03:42 Go to previous messageGo to next message
Axel Mueller is currently offline Axel Mueller
Messages: 1949
Registered: July 2009
Senior Member
Kent Sebastian wrote:

> Axel Mueller wrote:
>> /opxml: /lib/libc.so.6: version `GLIBC_2.8' not found (required by /opxml)
>> Ah, I have glibc 2.6.1 installed (the latest stable version on Gentoo).
>> I guess that's the origin of my problems.
>>
>> Axel
>>

> And this is the caveat of the oprofile plugin. It needs the native
> binary to communicate with OProfile due to EPL/GPL incompatibilities. I
> foresee these native bits being a problem for cross distribution
> compatibility.

> The source for opxml is in the
> org.eclipse.linuxtools.oprofile.core_0.1.0.200901141551/nati ves/linux/opxml
> directory. A `make` and `mv` to the aforementioned opxml directory
> should fix it. Let me know how it goes :)
OK, I recompiled opxml and put it in the aforementioned directory. Calling
opxml from the command line now works. However, I still have problems with
the Eclipse plugin.
- no events are shown in the launch configuration
- the oprofile view is now filled with some data but I can only see the
top of the tree (100% in myapp); I cannot dive in deeper (opreport shows
much more)
- there are still errors in the Eclipse error log

Axel


Before you ask
- search this forum
- see the FAQ http://wiki.eclipse.org/CDT/User/FAQ
- google
Re: OProfile on openSUSE 11.1 [message #4124 is a reply to message #4055] Wed, 18 February 2009 03:51 Go to previous messageGo to next message
Axel Mueller is currently offline Axel Mueller
Messages: 1949
Registered: July 2009
Senior Member
Some more things that do not work:
- I cannot open the oprofiled log
- if I double click the session to save it a dialog appears to ask for the
session name but the OK button is greyed out; btw, this option is *not*
obvious and easy to find, I would prefer a right click options menu

One more thing. When I start profiling I am asked for the root password
4(!) times. That is really annoying. Is it normal or just another error in
my setup?

Please, feel free to use me as a beta tester.

Axel


Before you ask
- search this forum
- see the FAQ http://wiki.eclipse.org/CDT/User/FAQ
- google
Re: OProfile on openSUSE 11.1 [message #4192 is a reply to message #4055] Wed, 18 February 2009 09:59 Go to previous messageGo to next message
Kent Sebastian is currently offline Kent Sebastian
Messages: 32
Registered: July 2009
Member
Oh boy, I expected some problems with 0.1 but not this many ;)

Axel Mueller wrote:
> OK, I recompiled opxml and put it in the aforementioned directory.
> Calling opxml from the command line now works. However, I still have
> problems with the Eclipse plugin.
> - no events are shown in the launch configuration

What is the output of `opxml info`? In the 'defaults' section, does the
'log-file' path correct? Does the oprofile command `ophelp` show events?

> - the oprofile view is now filled with some data but I can only see the
> top of the tree (100% in myapp); I cannot dive in deeper (opreport shows
> much more)

If the samples were not created from a launch within Eclipse then the
view will not show the data properly, this was fixed to show an error in
SVN a while back. The reason is the plugin is expecting a single binary
to be in the samples; as in, opcontrol is setup with an --image=<binary>
filter (the plugin isn't meant to be a direct front-end to oprofile,
rather to make oprofile useful to c/c++ Eclipse devs).

If the binary was profiled from within Eclipse and it doesn't show any
symbols/samples, but opreport does, file a bug at eclipse.org and attach
sample files please :)

> - there are still errors in the Eclipse error log

Which? :) If it's a readerSpawner error (or something similar) that's
a cdt issue which has eluded many people AFAIK.
Re: OProfile on openSUSE 11.1 [message #4262 is a reply to message #4124] Wed, 18 February 2009 10:15 Go to previous messageGo to next message
Kent Sebastian is currently offline Kent Sebastian
Messages: 32
Registered: July 2009
Member
Axel Mueller wrote:
> Some more things that do not work:
> - I cannot open the oprofiled log

See the previous message. Although, are you still getting the same SWT
null argument error as before?

> - if I double click the session to save it a dialog appears to ask for
> the session name but the OK button is greyed out; btw, this option is
> *not* obvious and easy to find, I would prefer a right click options menu

Thanks for the suggestion :) Although I'm hesitant because only the
default session can be saved to another name (limitation of opcontrol).
Is 'OK' always greyed out even after you input a name? There should be
an error message if so..

> One more thing. When I start profiling I am asked for the root password
> 4(!) times. That is really annoying. Is it normal or just another error
> in my setup?

On my machine entering the rootpw once via this consolehelper mechanism
keeps the authentication for a few seconds, so I only notice it once.
But indeed, opcontrol is run a few times before launching (and once
after the launch finishes), so if the root auth is only given for a
single command then you would see it multiple times. I will look into this.

As you can see, the need for root access to use oprofile causes some
headaches when trying to use it in userspace.

> Please, feel free to use me as a beta tester.

Excellent, I certainly will ;)


Thanks for your help,

Kent
Re: OProfile on openSUSE 11.1 [message #4332 is a reply to message #4192] Thu, 19 February 2009 02:48 Go to previous messageGo to next message
Axel Mueller is currently offline Axel Mueller
Messages: 1949
Registered: July 2009
Senior Member
Kent Sebastian wrote:

> Oh boy, I expected some problems with 0.1 but not this many ;)

> Axel Mueller wrote:
>> OK, I recompiled opxml and put it in the aforementioned directory.
>> Calling opxml from the command line now works. However, I still have
>> problems with the Eclipse plugin.
>> - no events are shown in the launch configuration

> What is the output of `opxml info`? In the 'defaults' section, does the
> 'log-file' path correct?
Yes.

> Does the oprofile command `ophelp` show events?
Yes.

>> - the oprofile view is now filled with some data but I can only see the
>> top of the tree (100% in myapp); I cannot dive in deeper (opreport shows
>> much more)

> If the samples were not created from a launch within Eclipse then the
> view will not show the data properly, this was fixed to show an error in
> SVN a while back. The reason is the plugin is expecting a single binary
> to be in the samples; as in, opcontrol is setup with an --image=<binary>
> filter (the plugin isn't meant to be a direct front-end to oprofile,
> rather to make oprofile useful to c/c++ Eclipse devs).

> If the binary was profiled from within Eclipse and it doesn't show any
> symbols/samples, but opreport does, file a bug at eclipse.org and attach
> sample files please :)
The samples were created from a launch within Eclipse.

>> - there are still errors in the Eclipse error log

> Which? :) If it's a readerSpawner error (or something similar) that's
> a cdt issue which has eluded many people AFAIK.
There is the error I mentioned in my first message and the readerSpawner
error.

BTW, I am using oprofile 0.9.3. AFAIK, there was no change in the output
format in the latest 0.9.4 (there is nothing mentioned in the Release
Notes).

Axel


Before you ask
- search this forum
- see the FAQ http://wiki.eclipse.org/CDT/User/FAQ
- google
Re: OProfile on openSUSE 11.1 [message #4402 is a reply to message #4262] Thu, 19 February 2009 03:07 Go to previous messageGo to next message
Axel Mueller is currently offline Axel Mueller
Messages: 1949
Registered: July 2009
Senior Member
Kent Sebastian wrote:

> Axel Mueller wrote:
>> Some more things that do not work:
>> - I cannot open the oprofiled log

> See the previous message. Although, are you still getting the same SWT
> null argument error as before?
Yes.

>> - if I double click the session to save it a dialog appears to ask for
>> the session name but the OK button is greyed out; btw, this option is
>> *not* obvious and easy to find, I would prefer a right click options menu

> Thanks for the suggestion :) Although I'm hesitant because only the
> default session can be saved to another name (limitation of opcontrol).
Then I would suggest to use the view menu (where the menu item to view the
log resides). That was the first place for me to look (as an longstanding
Eclipse user).

> Is 'OK' always greyed out even after you input a name? There should be
> an error message if so..
I get an NullPointer exception in the log for *every* character I type in.

java.lang.NullPointerException
at
org.eclipse.linuxtools.oprofile.core.daemon.OpInfo.getDefaul t(OpInfo.java:137)
at
org.eclipse.linuxtools.oprofile.core.Oprofile.getDefaultSamp lesDirectory(Oprofile.java:166)
at
org.eclipse.linuxtools.oprofile.ui.view.OprofileViewDoubleCl ickListener$SaveSessionValidator.isValid(OprofileViewDoubleC lickListener.java:141)
at
org.eclipse.jface.dialogs.InputDialog.validateInput(InputDia log.java:246)
at org.eclipse.jface.dialogs.InputDialog$1.modifyText(InputDial og.java:172)
at
org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListe ner.java:167)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :84)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1158)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.ja va:3401)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :3033)
at org.eclipse.jface.window.Window.runEventLoop(Window.java:825 )
at org.eclipse.jface.window.Window.open(Window.java:801)
at
org.eclipse.linuxtools.oprofile.ui.view.OprofileViewDoubleCl ickListener.doubleClick(OprofileViewDoubleClickListener.java :68)
at
org.eclipse.jface.viewers.StructuredViewer$1.run(StructuredV iewer.java:799)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37)
at org.eclipse.core.runtime.Platform.run(Platform.java:880)
at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:48)
at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:17 5)
at
org.eclipse.jface.viewers.StructuredViewer.fireDoubleClick(S tructuredViewer.java:797)
at
org.eclipse.jface.viewers.AbstractTreeViewer.handleDoubleSel ect(AbstractTreeViewer.java:1419)
at
org.eclipse.jface.viewers.StructuredViewer$4.widgetDefaultSe lected(StructuredViewer.java:1173)
at
org.eclipse.jface.util.OpenStrategy.fireDefaultSelectionEven t(OpenStrategy.java:237)
at org.eclipse.jface.util.OpenStrategy.access$0(OpenStrategy.ja va:234)
at org.eclipse.jface.util.OpenStrategy$1.handleEvent(OpenStrate gy.java:295)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :84)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1158)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.ja va:3401)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :3033)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a:2382)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2346)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:21 98)
at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:493)
at
org.eclipse.core.databinding.observable.Realm.runWithDefault (Realm.java:288)
at
org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java:488)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:149)
at
org.eclipse.ui.internal.ide.application.IDEApplication.start (IDEApplication.java:113)
at
org.eclipse.equinox.internal.app.EclipseAppHandle.run(Eclips eAppHandle.java:193)
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:386)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:179)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java: 549)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:504)
at org.eclipse.equinox.launcher.Main.run(Main.java:1236)
at org.eclipse.equinox.launcher.Main.main(Main.java:1212)


>> One more thing. When I start profiling I am asked for the root password
>> 4(!) times. That is really annoying. Is it normal or just another error
>> in my setup?

> On my machine entering the rootpw once via this consolehelper mechanism
> keeps the authentication for a few seconds, so I only notice it once.
> But indeed, opcontrol is run a few times before launching (and once
> after the launch finishes), so if the root auth is only given for a
> single command then you would see it multiple times. I will look into this.
Perhaps there is something different in my configuration. I am using
Gentoo and consolehelper is not widely used there.

> As you can see, the need for root access to use oprofile causes some
> headaches when trying to use it in userspace.

>> Please, feel free to use me as a beta tester.

> Excellent, I certainly will ;)
You're welcome :)

> Thanks for your help,

> Kent

Axel


Before you ask
- search this forum
- see the FAQ http://wiki.eclipse.org/CDT/User/FAQ
- google
Re: OProfile on openSUSE 11.1 [message #4472 is a reply to message #4402] Thu, 19 February 2009 03:51 Go to previous messageGo to next message
Axel Mueller is currently offline Axel Mueller
Messages: 1949
Registered: July 2009
Senior Member
>>> One more thing. When I start profiling I am asked for the root password
>>> 4(!) times. That is really annoying. Is it normal or just another error
>>> in my setup?

>> On my machine entering the rootpw once via this consolehelper mechanism
>> keeps the authentication for a few seconds, so I only notice it once.
>> But indeed, opcontrol is run a few times before launching (and once
>> after the launch finishes), so if the root auth is only given for a
>> single command then you would see it multiple times. I will look into this.
> Perhaps there is something different in my configuration. I am using
> Gentoo and consolehelper is not widely used there.

Hmm, I found the root of this problem. Gentoo does not use/provide
pam_timestamp anymore. They removed all the Redhat stuff from their pam
modules.

Axel


Before you ask
- search this forum
- see the FAQ http://wiki.eclipse.org/CDT/User/FAQ
- google
Re: OProfile on openSUSE 11.1 [message #4541 is a reply to message #4402] Thu, 19 February 2009 10:58 Go to previous messageGo to next message
Kent Sebastian is currently offline Kent Sebastian
Messages: 32
Registered: July 2009
Member
Axel Mueller wrote:
>> Thanks for the suggestion :) Although I'm hesitant because only the
>> default session can be saved to another name (limitation of opcontrol).
> Then I would suggest to use the view menu (where the menu item to view
> the log resides). That was the first place for me to look (as an
> longstanding Eclipse user).

I will change this for 0.2, thanks :)

>> Is 'OK' always greyed out even after you input a name? There should be
>> an error message if so..
> I get an NullPointer exception in the log for *every* character I type in.
> java.lang.NullPointerException
> at
> org.eclipse.linuxtools.oprofile.core.daemon.OpInfo.getDefaul t(OpInfo.java:137)
<snip>

So it seems this (and the oprofiled log reader error) stem from the
defaults section of `opxml info` not being read/set properly. As to why,
I'm puzzled.. Are all the paths in the defaults section correct?

What version of Gentoo/kernel/Eclipse/oprofile etc are you running?
Perhaps I'll try to reproduce it in a VM.

Could you perhaps check out the plugin from svn HEAD and run the tests?

svn co
http://dev.eclipse.org/svnroot/technology/org.eclipse.linuxt ools/oprofile/trunk/org.eclipse.linuxtools.oprofile.core
svn co
http://dev.eclipse.org/svnroot/technology/org.eclipse.linuxt ools/oprofile/trunk/org.eclipse.linuxtools.oprofile.core.tes ts
svn co
http://dev.eclipse.org/svnroot/technology/org.eclipse.linuxt ools/oprofile/trunk/org.eclipse.linuxtools.oprofile.core.lin ux.x86
svn co
http://dev.eclipse.org/svnroot/technology/org.eclipse.linuxt ools/oprofile/trunk/org.eclipse.linuxtools.oprofile.core.lin ux.x86_64
svn co
http://dev.eclipse.org/svnroot/technology/org.eclipse.linuxt ools/oprofile/trunk/org.eclipse.linuxtools.oprofile.launch
svn co
http://dev.eclipse.org/svnroot/technology/org.eclipse.linuxt ools/oprofile/trunk/org.eclipse.linuxtools.oprofile.ui

(you will probably have to rebuild opxml again, I've opened a bug to
have opxml built with an appropriate version of glibc for 0.2)

Thanks,

Kent
Re: OProfile on openSUSE 11.1 [message #4611 is a reply to message #4472] Thu, 19 February 2009 10:59 Go to previous messageGo to next message
Kent Sebastian is currently offline Kent Sebastian
Messages: 32
Registered: July 2009
Member
Axel Mueller wrote:
>> Perhaps there is something different in my configuration. I am using
>> Gentoo and consolehelper is not widely used there.
>
> Hmm, I found the root of this problem. Gentoo does not use/provide
> pam_timestamp anymore. They removed all the Redhat stuff from their pam
> modules.
>
> Axel
>

Ah, I'll have to look into other ways to do this then. There is a bug
open for 0.2.

Thanks for finding it :)


-Kent
Re: OProfile on openSUSE 11.1 [message #4680 is a reply to message #4332] Thu, 19 February 2009 11:09 Go to previous messageGo to next message
Kent Sebastian is currently offline Kent Sebastian
Messages: 32
Registered: July 2009
Member
Axel Mueller wrote:
>> If the binary was profiled from within Eclipse and it doesn't show any
>> symbols/samples, but opreport does, file a bug at eclipse.org and
>> attach sample files please :)
> The samples were created from a launch within Eclipse.

Was the binary compiled with optimization -O? -g? It is possible that
the samples oprofile gathered did not correlate to source lines,
although a check of `opannotate --source` should verify that.

Could you post the output of `opreport -l`, `opannotate --source` and
tar the sample files and put them somewhere I can access (eg
rapidshare.com)? If not for the binary in question, then perhaps a
similar reduced case. It would be most helpful :)

> BTW, I am using oprofile 0.9.3. AFAIK, there was no change in the output
> format in the latest 0.9.4 (there is nothing mentioned in the Release
> Notes).

The plugin works on Fedora 9 which has oprofile 0.9.3, so I don't think
that would be an issue.

Thanks,


-Kent
Re: OProfile on openSUSE 11.1 [message #4749 is a reply to message #4541] Thu, 19 February 2009 15:13 Go to previous messageGo to next message
Kent Sebastian is currently offline Kent Sebastian
Messages: 32
Registered: July 2009
Member
Kent Sebastian wrote:
> Could you perhaps check out the plugin from svn HEAD and run the tests?
>
> svn co
> http://dev.eclipse.org/svnroot/technology/org.eclipse.linuxt ools/oprofile/trunk/org.eclipse.linuxtools.oprofile.core
>
> svn co
> http://dev.eclipse.org/svnroot/technology/org.eclipse.linuxt ools/oprofile/trunk/org.eclipse.linuxtools.oprofile.core.tes ts
>
> svn co
> http://dev.eclipse.org/svnroot/technology/org.eclipse.linuxt ools/oprofile/trunk/org.eclipse.linuxtools.oprofile.core.lin ux.x86
>
> svn co
> http://dev.eclipse.org/svnroot/technology/org.eclipse.linuxt ools/oprofile/trunk/org.eclipse.linuxtools.oprofile.core.lin ux.x86_64
>
> svn co
> http://dev.eclipse.org/svnroot/technology/org.eclipse.linuxt ools/oprofile/trunk/org.eclipse.linuxtools.oprofile.launch
>
> svn co
> http://dev.eclipse.org/svnroot/technology/org.eclipse.linuxt ools/oprofile/trunk/org.eclipse.linuxtools.oprofile.ui
>
>
> (you will probably have to rebuild opxml again, I've opened a bug to
> have opxml built with an appropriate version of glibc for 0.2)
>
> Thanks,
>
> Kent

Actually you could use the linuxtools nightly update site:
http://download.eclipse.org/technology/linuxtools/updates-ni ghtly

It would still require an opxml rebuild.

Thanks,


-Kent
Re: OProfile on openSUSE 11.1 [message #4817 is a reply to message #4680] Fri, 20 February 2009 02:50 Go to previous messageGo to next message
Axel Mueller is currently offline Axel Mueller
Messages: 1949
Registered: July 2009
Senior Member
Kent Sebastian wrote:

> Axel Mueller wrote:
>>> If the binary was profiled from within Eclipse and it doesn't show any
>>> symbols/samples, but opreport does, file a bug at eclipse.org and
>>> attach sample files please :)
>> The samples were created from a launch within Eclipse.

> Was the binary compiled with optimization -O? -g? It is possible that
> the samples oprofile gathered did not correlate to source lines,
> although a check of `opannotate --source` should verify that.
There was no optimization activated. The executable has debug symbols
included.

> Could you post the output of `opreport -l`, `opannotate --source` and
> tar the sample files and put them somewhere I can access (eg
> rapidshare.com)? If not for the binary in question, then perhaps a
> similar reduced case. It would be most helpful :)
Unfortunately, I cannot give you the opreport output. The testes
application is closed source. I can try to reproduce this at home with a
small sample project.

Axel


Before you ask
- search this forum
- see the FAQ http://wiki.eclipse.org/CDT/User/FAQ
- google
Re: OProfile on openSUSE 11.1 [message #4886 is a reply to message #4749] Fri, 20 February 2009 03:56 Go to previous messageGo to next message
Axel Mueller is currently offline Axel Mueller
Messages: 1949
Registered: July 2009
Senior Member
> Actually you could use the linuxtools nightly update site:
> http://download.eclipse.org/technology/linuxtools/updates-ni ghtly

> It would still require an opxml rebuild.
Still doesn't work.

Here is the output (only the frist lines) of 'opxml info'

<?xml version="1.0" encoding="UTF-8"?>
<info>
<num-counters>4</num-counters>
<cpu-frequency>2800</cpu-frequency>
<defaults>
<sample-dir>/var/lib/oprofile/samples/</sample-dir>
<lock-file>/var/lib/oprofile/lock</lock-file>

<log-file>/var/lib/oprofile/samples/oprofiled.log</log-file >
<dump-status>/var/lib/oprofile/complete_dump</dump-status>
</defaults>
<event-list counter="0">
<event>
<name>GLOBAL_POWER_EVENTS</name>
<description>time during which processor is not
stopped</description>
<value>29</value>
<minimum>6000</minimum>
<unit-mask>
<type>mandatory</type>
<default>1</default>
<mask>
<value>1</value>

<description>mandatory</description>
</mask>
</unit-mask>
</event>
<event>
<name>BPU_FETCH_REQUEST</name>
<description>instruction fetch requests from the
branch predict unit</description>

....

The output of 'opxml model-data GLOBAL_POWER_EVENTS current'
( I have changed the name of the application to MYAPP for obvious reasons).

<?xml version="1.0" encoding="UTF-8"?>
<model-data>
<image name="/home/amueller/sources/MYAPP" count="716
3">
<symbols>
<symbol name=".plt"
file="/home/amueller/sources/MYAPP" count="10">
<sample>
<count>10</count>
<line>0</line>
</sample>
</symbol>
....


So, opxml seems to work on the command line.

Axel


Before you ask
- search this forum
- see the FAQ http://wiki.eclipse.org/CDT/User/FAQ
- google
Re: OProfile on openSUSE 11.1 [message #4954 is a reply to message #4886] Fri, 20 February 2009 04:32 Go to previous messageGo to next message
Axel Mueller is currently offline Axel Mueller
Messages: 1949
Registered: July 2009
Senior Member
Hold your breath. It is now nearly working!!

At least I can choose the events in the launch configuration and have a
look on the oprofiled log.

Guess what, I have substituted the opxml in the x86_64 directory with the
32bit exe!!! I am running a 32bit OS!
I came to this strange idea because there was a log entry from the p2
installer mocking about something in the x86_64 directory.

Well, the OProfile View still doesn't show any samples but perhaps this
has a similar problem.

My setup:
Eclipse Version: 3.4.1
Build id: M20080911-1700
cdt (5.0.1.200809120802)
sun-jdk-1.6.0.11


Axel


Before you ask
- search this forum
- see the FAQ http://wiki.eclipse.org/CDT/User/FAQ
- google
Re: OProfile on openSUSE 11.1 [message #5018 is a reply to message #4954] Fri, 20 February 2009 04:46 Go to previous messageGo to next message
Axel Mueller is currently offline Axel Mueller
Messages: 1949
Registered: July 2009
Senior Member
Axel Mueller wrote:

> Hold your breath. It is now nearly working!!

> At least I can choose the events in the launch configuration and have a
> look on the oprofiled log.

> Guess what, I have substituted the opxml in the x86_64 directory with the
> 32bit exe!!! I am running a 32bit OS!
> I came to this strange idea because there was a log entry from the p2
> installer mocking about something in the x86_64 directory.
The patch from here https://bugs.eclipse.org/bugs/show_bug.cgi?id=265495
resolves the problem (about the event view not the session view).

Axel


Before you ask
- search this forum
- see the FAQ http://wiki.eclipse.org/CDT/User/FAQ
- google
Re: OProfile on openSUSE 11.1 [message #5084 is a reply to message #5018] Fri, 20 February 2009 10:59 Go to previous messageGo to next message
Kent Sebastian is currently offline Kent Sebastian
Messages: 32
Registered: July 2009
Member
Axel Mueller wrote:
> Axel Mueller wrote:
>
>> Hold your breath. It is now nearly working!!
>
>> At least I can choose the events in the launch configuration and have
>> a look on the oprofiled log.
>
>> Guess what, I have substituted the opxml in the x86_64 directory with
>> the 32bit exe!!! I am running a 32bit OS!
>> I came to this strange idea because there was a log entry from the p2
>> installer mocking about something in the x86_64 directory.
> The patch from here https://bugs.eclipse.org/bugs/show_bug.cgi?id=265495
> resolves the problem (about the event view not the session view).
>
> Axel
>
>

Very odd.. The x86 and x86_64 fragments have a platform filter, and only
one is loaded. If the log entry was something like this:

!MESSAGE Bundle
reference:file:/notnfs/ksebasti/workspace/org.eclipse.linuxt ools.oprofile.core.linux.x86/
[264] was not resolved.
!SUBENTRY 2 org.eclipse.linuxtools.oprofile.core.linux.x86 2 0
2009-02-20 10:20:53.598
!MESSAGE Platform filter did not match: (& (osgi.os=linux) (osgi.arch=x86))

then that's normal (I'm on x86_64).

If the plugin couldn't find the opxml binary then it would spit out an
error saying so, so I'm even more puzzled as to why putting the 32bit
binary in the 64bit fragment helps. That patch was applied to trunk
yesterday but I'm not sure if the nightly update site caught it yet,
although since I'm running the same version as you (except openjdk vs
sun jdk, but that shouldn't be an issue AFAIK), I don't see why it
wouldn't work.

By the session view you mean the samples not showing any details past
the '100% in <binary name>'? I'm looking into this since a colleague of
mine is having the same problem, (although profiling the same binary is
showing results on my system, puzzling yet again).

I'll be sure to test 0.2 on various distros :p


Thanks,

-Kent
Re: OProfile on openSUSE 11.1 [message #5151 is a reply to message #5084] Fri, 20 February 2009 11:24 Go to previous messageGo to next message
Axel Mueller is currently offline Axel Mueller
Messages: 1949
Registered: July 2009
Senior Member
Kent Sebastian wrote:

> Axel Mueller wrote:
>> Axel Mueller wrote:
>>
>>> Hold your breath. It is now nearly working!!
>>
>>> At least I can choose the events in the launch configuration and have
>>> a look on the oprofiled log.
>>
>>> Guess what, I have substituted the opxml in the x86_64 directory with
>>> the 32bit exe!!! I am running a 32bit OS!
>>> I came to this strange idea because there was a log entry from the p2
>>> installer mocking about something in the x86_64 directory.
>> The patch from here https://bugs.eclipse.org/bugs/show_bug.cgi?id=265495
>> resolves the problem (about the event view not the session view).
>>
>> Axel
>>
>>

> Very odd.. The x86 and x86_64 fragments have a platform filter, and only
> one is loaded. If the log entry was something like this:

> !MESSAGE Bundle
>
reference:file:/notnfs/ksebasti/workspace/org.eclipse.linuxt ools.oprofile.core.linux.x86/
> [264] was not resolved.
> !SUBENTRY 2 org.eclipse.linuxtools.oprofile.core.linux.x86 2 0
> 2009-02-20 10:20:53.598
> !MESSAGE Platform filter did not match: (& (osgi.os=linux) (osgi.arch=x86))

> then that's normal (I'm on x86_64).
I don't remember the exact error message but it was different. I do not
see this message now.


> If the plugin couldn't find the opxml binary then it would spit out an
> error saying so, so I'm even more puzzled as to why putting the 32bit
> binary in the 64bit fragment helps. That patch was applied to trunk
> yesterday but I'm not sure if the nightly update site caught it yet,
> although since I'm running the same version as you (except openjdk vs
> sun jdk, but that shouldn't be an issue AFAIK), I don't see why it
> wouldn't work.
I guess the plugin did find the opxml binary (the file was actually there)
but had problems to run it. The patch was not in the nightly build. I
applied it manually.

> By the session view you mean the samples not showing any details past
> the '100% in <binary name>'?
Yes.

> I'm looking into this since a colleague of
> mine is having the same problem, (although profiling the same binary is
> showing results on my system, puzzling yet again).

> I'll be sure to test 0.2 on various distros :p


> Thanks,

> -Kent

Axel


Before you ask
- search this forum
- see the FAQ http://wiki.eclipse.org/CDT/User/FAQ
- google
Re: OProfile on openSUSE 11.1 [message #5219 is a reply to message #2649] Mon, 23 February 2009 08:33 Go to previous messageGo to next message
Mikael Springer is currently offline Mikael Springer
Messages: 20
Registered: July 2009
Junior Member
Kent Sebastian wrote:
> Hello,
>
> Just to be sure, did you run the install script (install.sh) in the
> org.eclipse.linuxtools.oprofile.core_0.1.0.200901141551/nati ves/linux/scripts
> directory? I imagine this extra non-standard step is going to cause a
> lot of problems for users of this plugin..
>

Yes I did but this failed because of the consolehelper dependency. I'm
on openSUSE 11.1 and consolehelper does not seem to be available for
this distro and no one has responded to my question on the forum either.
I guess I could build and install it myself but I would rather not do
that since I don't know if it would break anything else. You use it for
root access, is that correct?

/Micke.
Re: OProfile on openSUSE 11.1 [message #5284 is a reply to message #5219] Mon, 23 February 2009 10:41 Go to previous messageGo to next message
Kent Sebastian is currently offline Kent Sebastian
Messages: 32
Registered: July 2009
Member
Mikael Steen Springer wrote:
> Kent Sebastian wrote:
>> Hello,
>>
>> Just to be sure, did you run the install script (install.sh) in the
>> org.eclipse.linuxtools.oprofile.core_0.1.0.200901141551/nati ves/linux/scripts
>> directory? I imagine this extra non-standard step is going to cause a
>> lot of problems for users of this plugin..
>>
>
> Yes I did but this failed because of the consolehelper dependency. I'm
> on openSUSE 11.1 and consolehelper does not seem to be available for
> this distro and no one has responded to my question on the forum either.
> I guess I could build and install it myself but I would rather not do
> that since I don't know if it would break anything else. You use it for
> root access, is that correct?
>
> /Micke.

Ah yes, a bug has been filed for this, and it's going to be a top
priority for 0.2. It is indeed for root access, since oprofile requires
root for any of its commands.

In the mean time, you can try what Axel suggested here
https://bugs.eclipse.org/bugs/show_bug.cgi?id=265355#c1, and simply
symlink opcontrol in the
org.eclipse.linuxtools.oprofile.core_0.1.0.200901141551/nati ves/linux/scripts
directory to /usr/bin/opcontrol. Let me know if this works for you.

Also, what forums are you referring to?


Thanks,

-Kent
Re: OProfile on openSUSE 11.1 [message #5345 is a reply to message #5284] Tue, 24 February 2009 08:43 Go to previous messageGo to next message
Uwe Stieber is currently offline Uwe Stieber
Messages: 19
Registered: July 2009
Junior Member
Kent, I don't see anything in the OProfile view too. The consolehelper issue
had been "workarounded" (just copied it) and I've run "opcontrol --init" as
root myself, the kernel module is loaded. "opxml info" does spit out some
XML, but still it does not show anything in the view. Refresh view does not
help. Any further hints [where to put a breakpoint]?

Thanks,
--
Uwe Stieber, Wind River


"Kent Sebastian" <ksebasti@redhat.com> wrote in message
news:gnug50$14v$1@build.eclipse.org...
> Mikael Steen Springer wrote:
>> Kent Sebastian wrote:
>>> Hello,
>>>
>>> Just to be sure, did you run the install script (install.sh) in the
>>> org.eclipse.linuxtools.oprofile.core_0.1.0.200901141551/nati ves/linux/scripts
>>> directory? I imagine this extra non-standard step is going to cause a
>>> lot of problems for users of this plugin..
>>>
>>
>> Yes I did but this failed because of the consolehelper dependency. I'm
>> on openSUSE 11.1 and consolehelper does not seem to be available for
>> this distro and no one has responded to my question on the forum either.
>> I guess I could build and install it myself but I would rather not do
>> that since I don't know if it would break anything else. You use it for
>> root access, is that correct?
>>
>> /Micke.
>
> Ah yes, a bug has been filed for this, and it's going to be a top priority
> for 0.2. It is indeed for root access, since oprofile requires root for
> any of its commands.
>
> In the mean time, you can try what Axel suggested here
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=265355#c1, and simply
> symlink opcontrol in the
> org.eclipse.linuxtools.oprofile.core_0.1.0.200901141551/nati ves/linux/scripts
> directory to /usr/bin/opcontrol. Let me know if this works for you.
>
> Also, what forums are you referring to?
>
>
> Thanks,
>
> -Kent
Re: OProfile on openSUSE 11.1 [message #7319 is a reply to message #5345] Tue, 24 February 2009 10:18 Go to previous messageGo to next message
Kent Sebastian is currently offline Kent Sebastian
Messages: 32
Registered: July 2009
Member
Uwe Stieber wrote:
> Kent, I don't see anything in the OProfile view too. The consolehelper issue
> had been "workarounded" (just copied it) and I've run "opcontrol --init" as
> root myself, the kernel module is loaded. "opxml info" does spit out some
> XML, but still it does not show anything in the view. Refresh view does not
> help. Any further hints [where to put a breakpoint]?
>
> Thanks,

Hmm, are there any exceptions logged to the console? Unless the plugin
can't find a contributing opxml fragment, or that plugin can't find the
opxml binary (both cases should pop up an errorDialog) I can't see why
it wouldn't parse the xml properly.

If you're willing to debug it,
org.eclipse.linuxtools.oprofile.ui.view->OprofileView.java:99-120 would
be a good area. Uncomment the sys.out.println at line 105 and if the
results are being parsed correctly, it'll print out the parsed data.
After that, follow if UiRoot is parsed correctly (line 109), perhaps
delving into the UiModelRoot class.

If that doesn't yield any insight, perhaps break at the start of
org.eclipse.linuxtools.oprofile.core->Oprofile.java:getModelData() and
follow the chain of parsing.

Let me know how it goes, thanks :)


-Kent
Re: OProfile on openSUSE 11.1 [message #7332 is a reply to message #5284] Wed, 25 February 2009 04:24 Go to previous messageGo to next message
Mikael Springer is currently offline Mikael Springer
Messages: 20
Registered: July 2009
Junior Member
Kent Sebastian wrote:
> Mikael Steen Springer wrote:
>> Kent Sebastian wrote:
>>> Hello,
>>>
>>> Just to be sure, did you run the install script (install.sh) in the
>>> org.eclipse.linuxtools.oprofile.core_0.1.0.200901141551/nati ves/linux/scripts
>>>
>>> directory? I imagine this extra non-standard step is going to cause a
>>> lot of problems for users of this plugin..
>>>
>>
>> Yes I did but this failed because of the consolehelper dependency. I'm
>> on openSUSE 11.1 and consolehelper does not seem to be available for
>> this distro and no one has responded to my question on the forum either.
>> I guess I could build and install it myself but I would rather not do
>> that since I don't know if it would break anything else. You use it for
>> root access, is that correct?
>>
>> /Micke.
>
> Ah yes, a bug has been filed for this, and it's going to be a top
> priority for 0.2. It is indeed for root access, since oprofile requires
> root for any of its commands.
>
> In the mean time, you can try what Axel suggested here
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=265355#c1, and simply
> symlink opcontrol in the
> org.eclipse.linuxtools.oprofile.core_0.1.0.200901141551/nati ves/linux/scripts
> directory to /usr/bin/opcontrol. Let me know if this works for you.
>
> Also, what forums are you referring to?
>
>
> Thanks,
>
> -Kent

I posted a consolehelper question on the official openSUSE forum. I'll
try Axels method with the symlink and I'll let you know how it works.
Good to hear the consolehelper "problem" is prioritized.

Regards, Micke.
Re: OProfile on openSUSE 11.1 [message #7366 is a reply to message #7319] Mon, 02 March 2009 11:25 Go to previous messageGo to next message
Uwe Stieber is currently offline Uwe Stieber
Messages: 19
Registered: July 2009
Junior Member
Hi Kent,

>> Kent, I don't see anything in the OProfile view too. The consolehelper
>> issue had been "workarounded" (just copied it) and I've run
>> "opcontrol --init" as root myself, the kernel module is loaded. "opxml
>> info" does spit out some XML, but still it does not show anything in the
>> view. Refresh view does not help. Any further hints [where to put a
>> breakpoint]?
>>
>> Thanks,
>
> Hmm, are there any exceptions logged to the console? Unless the plugin
> can't find a contributing opxml fragment, or that plugin can't find the
> opxml binary (both cases should pop up an errorDialog) I can't see why it
> wouldn't parse the xml properly.
>
> If you're willing to debug it,
> org.eclipse.linuxtools.oprofile.ui.view->OprofileView.java:99-120 would be
> a good area. Uncomment the sys.out.println at line 105 and if the results
> are being parsed correctly, it'll print out the parsed data. After that,
> follow if UiRoot is parsed correctly (line 109), perhaps delving into the
> UiModelRoot class.

OpModelRoot#refreshModel() is calling Oprofile.getEvents(). The getEvents()
call returns an empty array, therefor (I guess) nothing is shown. Some where
down, "opxml sessions" is executed. This is returning an empty list too, but
(I guess) it shouldn't?

....
x86_64> ./opxml sessions
<?xml version="1.0" encoding="UTF-8"?>
<sessions>
</sessions>
....

Thanks,
Uwe Stieber, Wind River
Re: OProfile on openSUSE 11.1 [message #7377 is a reply to message #7366] Mon, 02 March 2009 16:58 Go to previous message
Kent Sebastian is currently offline Kent Sebastian
Messages: 32
Registered: July 2009
Member
> OpModelRoot#refreshModel() is calling Oprofile.getEvents(). The getEvents()
> call returns an empty array, therefor (I guess) nothing is shown. Some where
> down, "opxml sessions" is executed. This is returning an empty list too, but
> (I guess) it shouldn't?
>
> ...
> x86_64> ./opxml sessions
> <?xml version="1.0" encoding="UTF-8"?>
> <sessions>
> </sessions>
> ...
>
> Thanks,
> Uwe Stieber, Wind River
>
>

Hmm odd.. the code for getting the session names simply reads the
samples directory (/var/lib/oprofile/samples), and loops through the
struct dirent*s for dir names. To match the events to the samples it
builds up some info from the sample files on disk and matches event
names to session names.

I would say that perhaps the files aren't readable but there's a stat
which should catch it, and otherwise I don't see where it would fail..
I'll admit I'm not too familiar with this part of the code, it was
written by the previous maintainer of the plugin.

If you're willing to debug through opxml.. :) some breakpoints would be:

opxml.cc:412 (jump into get_sessions, also check if opinfo info has
appropriate data)
opxml.cc:426 (jump into session::get_events() and see what session
events are inserted, if any)

and related code paths


Thanks,

Kent
Re: OProfile on openSUSE 11.1 [message #565211 is a reply to message #2562] Tue, 17 February 2009 09:24 Go to previous message
Axel Mueller is currently offline Axel Mueller
Messages: 1949
Registered: July 2009
Senior Member
Mikael Steen Springer wrote:

> Hi.

> I'd like to try the OProfile plugin on openSUSE 11.1. I tried installing
> according to the instructions but of course it failed since Fedora is
> the only supported platform at the moment. But is there anything I can
> do to make this work besides hacking the plugin itself? Is support for
> other distros (openSUSE, Ubuntu ...) planned in the near future?

> Regards, Micke.

> (Great work by the way, I love the Valgrind plugin)
I also had problems with OProfile plugin on Gentoo.
- no events are shown in the run configuration
- I can start the profiler (verified with opcontrol --status in an
external console) but I do not see any results in Eclipse (the directory
/var/lib/oprofile/samples/current is filled with samples info). The
OProfile view is completely empty!

The Eclipse log shows some errors:
Unhandled event loop exception
java.lang.IllegalArgumentException: Argument cannot be null
at org.eclipse.swt.SWT.error(SWT.java:3761)
at org.eclipse.swt.SWT.error(SWT.java:3695)
at org.eclipse.swt.SWT.error(SWT.java:3666)
at org.eclipse.swt.widgets.Widget.error(Widget.java:446)
at org.eclipse.swt.widgets.Text.setText(Text.java:1894)
at
org.eclipse.linuxtools.oprofile.ui.view.OprofiledLogDialog.c reateCustomArea(OprofileViewLogReaderAction.java:137)
at
org.eclipse.jface.dialogs.MessageDialog.createDialogArea(Mes sageDialog.java:233)
at
org.eclipse.jface.dialogs.IconAndMessageDialog.createDialogA ndButtonArea(IconAndMessageDialog.java:212)
at
org.eclipse.jface.dialogs.IconAndMessageDialog.createContent s(IconAndMessageDialog.java:191)
at org.eclipse.jface.window.Window.create(Window.java:431)
at org.eclipse.jface.dialogs.Dialog.create(Dialog.java:1089)
at org.eclipse.jface.window.Window.open(Window.java:790)
at
org.eclipse.linuxtools.oprofile.ui.view.OprofileViewLogReade rAction.run(OprofileViewLogReaderAction.java:64)
at org.eclipse.jface.action.Action.runWithEvent(Action.java:498 )
at
org.eclipse.jface.action.ActionContributionItem.handleWidget Selection(ActionContributionItem.java:583)
at
org.eclipse.jface.action.ActionContributionItem.access$2(Act ionContributionItem.java:500)
at
org.eclipse.jface.action.ActionContributionItem$5.handleEven t(ActionContributionItem.java:411)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :84)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1158)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.ja va:3401)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :3033)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a:2382)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2346)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:21 98)
at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:493)
at
org.eclipse.core.databinding.observable.Realm.runWithDefault (Realm.java:288)
at
org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java:488)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:149)
at
org.eclipse.ui.internal.ide.application.IDEApplication.start (IDEApplication.java:113)
at
org.eclipse.equinox.internal.app.EclipseAppHandle.run(Eclips eAppHandle.java:193)
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:386)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:179)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java: 549)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:504)
at org.eclipse.equinox.launcher.Main.run(Main.java:1236)
at org.eclipse.equinox.launcher.Main.main(Main.java:1212)



Axel

P.S. the libhover and Valgrind plugins are working like a charm.


Before you ask
- search this forum
- see the FAQ http://wiki.eclipse.org/CDT/User/FAQ
- google
Re: OProfile on openSUSE 11.1 [message #565237 is a reply to message #2562] Tue, 17 February 2009 10:11 Go to previous message
Kent Sebastian is currently offline Kent Sebastian
Messages: 32
Registered: July 2009
Member
Mikael Steen Springer wrote:

> Hi.

> I'd like to try the OProfile plugin on openSUSE 11.1. I tried installing
> according to the instructions but of course it failed since Fedora is
> the only supported platform at the moment. But is there anything I can
> do to make this work besides hacking the plugin itself? Is support for
> other distros (openSUSE, Ubuntu ...) planned in the near future?

> Regards, Micke.

> (Great work by the way, I love the Valgrind plugin)

Hello,

Could you provide more details as to what failed and when? Did the install
script give an error or was it an error dialog from within Eclipse?

It used to be Fedora only because of the use of rpm in the install script,
but that since has been removed. While I haven't tested on OpenSUSE or
others, I don't see an immediate reason why it wouldn't work.. unless
consolehelper isn't available.
Re: OProfile on openSUSE 11.1 [message #565258 is a reply to message #2591] Tue, 17 February 2009 10:41 Go to previous message
Kent Sebastian is currently offline Kent Sebastian
Messages: 32
Registered: July 2009
Member
Hello,

Just to be sure, did you run the install script (install.sh) in the
org.eclipse.linuxtools.oprofile.core_0.1.0.200901141551/nati ves/linux/scripts
directory? I imagine this extra non-standard step is going to cause a lot
of problems for users of this plugin..

Axel Mueller wrote:
> I also had problems with OProfile plugin on Gentoo.
> - no events are shown in the run configuration

Was there an error dialog before opening the run config? Try going into
the eclipse plugin directory, look for a dir named
org.eclipse.linuxtools.oprofile.core.linux.x86 (or x86_64), then into
os/linux/x86(_64) and run `./opxml info`. Does it spew some XML or give an
error message?

> - I can start the profiler (verified with opcontrol --status in an
> external console) but I do not see any results in Eclipse (the directory
> /var/lib/oprofile/samples/current is filled with samples info). The
> OProfile view is completely empty!

The view will only populate after a launch from within eclipse, or by
clicking Refresh View in the view's toolbar menu. If samples exist and a
Refresh View doesn't populate it, there's a big problem :) In the same
directory as above, try running `./opxml model-data <event> current` and
see if there is an error message.


This is odd also because both of these errors should have sent up error
dialogs...

> The Eclipse log shows some errors:
> Unhandled event loop exception
> java.lang.IllegalArgumentException: Argument cannot be null
...

Now this one is curious :) but I imagine it stems from the same source as
the other issues.


Thanks for trying out the plugin :) let me know your results and we'll try
to get this working for you

-Kent
Re: OProfile on openSUSE 11.1 [message #565282 is a reply to message #2649] Tue, 17 February 2009 10:54 Go to previous message
Axel Mueller is currently offline Axel Mueller
Messages: 1949
Registered: July 2009
Senior Member
Kent Sebastian wrote:

> Hello,

> Just to be sure, did you run the install script (install.sh) in the
>
org.eclipse.linuxtools.oprofile.core_0.1.0.200901141551/nati ves/linux/scripts
> directory? I imagine this extra non-standard step is going to cause a lot
> of problems for users of this plugin..
Yes I dit it. The popup window in the run configuration was very helpful
to remind me.

> Axel Mueller wrote:
>> I also had problems with OProfile plugin on Gentoo.
>> - no events are shown in the run configuration

> Was there an error dialog before opening the run config? Try going into
> the eclipse plugin directory, look for a dir named
> org.eclipse.linuxtools.oprofile.core.linux.x86 (or x86_64), then into
> os/linux/x86(_64) and run `./opxml info`. Does it spew some XML or give an
> error message?
/opxml: /lib/libc.so.6: version `GLIBC_2.8' not found (required by
/opxml)
Ah, I have glibc 2.6.1 installed (the latest stable version on Gentoo). I
guess that's the origin of my problems.

Axel


Before you ask
- search this forum
- see the FAQ http://wiki.eclipse.org/CDT/User/FAQ
- google
Re: OProfile on openSUSE 11.1 [message #565305 is a reply to message #2678] Tue, 17 February 2009 11:00 Go to previous message
Kent Sebastian is currently offline Kent Sebastian
Messages: 32
Registered: July 2009
Member
Axel Mueller wrote:
> /opxml: /lib/libc.so.6: version `GLIBC_2.8' not found (required by /opxml)
> Ah, I have glibc 2.6.1 installed (the latest stable version on Gentoo).
> I guess that's the origin of my problems.
>
> Axel
>

And this is the caveat of the oprofile plugin. It needs the native
binary to communicate with OProfile due to EPL/GPL incompatibilities. I
foresee these native bits being a problem for cross distribution
compatibility.

The source for opxml is in the
org.eclipse.linuxtools.oprofile.core_0.1.0.200901141551/nati ves/linux/opxml
directory. A `make` and `mv` to the aforementioned opxml directory
should fix it. Let me know how it goes :)


-Kent
Re: OProfile on openSUSE 11.1 [message #565324 is a reply to message #2705] Wed, 18 February 2009 03:42 Go to previous message
Axel Mueller is currently offline Axel Mueller
Messages: 1949
Registered: July 2009
Senior Member
Kent Sebastian wrote:

> Axel Mueller wrote:
>> /opxml: /lib/libc.so.6: version `GLIBC_2.8' not found (required by /opxml)
>> Ah, I have glibc 2.6.1 installed (the latest stable version on Gentoo).
>> I guess that's the origin of my problems.
>>
>> Axel
>>

> And this is the caveat of the oprofile plugin. It needs the native
> binary to communicate with OProfile due to EPL/GPL incompatibilities. I
> foresee these native bits being a problem for cross distribution
> compatibility.

> The source for opxml is in the
> org.eclipse.linuxtools.oprofile.core_0.1.0.200901141551/nati ves/linux/opxml
> directory. A `make` and `mv` to the aforementioned opxml directory
> should fix it. Let me know how it goes :)
OK, I recompiled opxml and put it in the aforementioned directory. Calling
opxml from the command line now works. However, I still have problems with
the Eclipse plugin.
- no events are shown in the launch configuration
- the oprofile view is now filled with some data but I can only see the
top of the tree (100% in myapp); I cannot dive in deeper (opreport shows
much more)
- there are still errors in the Eclipse error log

Axel


Before you ask
- search this forum
- see the FAQ http://wiki.eclipse.org/CDT/User/FAQ
- google
Re: OProfile on openSUSE 11.1 [message #565338 is a reply to message #4055] Wed, 18 February 2009 03:51 Go to previous message
Axel Mueller is currently offline Axel Mueller
Messages: 1949
Registered: July 2009
Senior Member
Some more things that do not work:
- I cannot open the oprofiled log
- if I double click the session to save it a dialog appears to ask for the
session name but the OK button is greyed out; btw, this option is *not*
obvious and easy to find, I would prefer a right click options menu

One more thing. When I start profiling I am asked for the root password
4(!) times. That is really annoying. Is it normal or just another error in
my setup?

Please, feel free to use me as a beta tester.

Axel


Before you ask
- search this forum
- see the FAQ http://wiki.eclipse.org/CDT/User/FAQ
- google
Re: OProfile on openSUSE 11.1 [message #565356 is a reply to message #4055] Wed, 18 February 2009 09:59 Go to previous message
Kent Sebastian is currently offline Kent Sebastian
Messages: 32
Registered: July 2009
Member
Oh boy, I expected some problems with 0.1 but not this many ;)

Axel Mueller wrote:
> OK, I recompiled opxml and put it in the aforementioned directory.
> Calling opxml from the command line now works. However, I still have
> problems with the Eclipse plugin.
> - no events are shown in the launch configuration

What is the output of `opxml info`? In the 'defaults' section, does the
'log-file' path correct? Does the oprofile command `ophelp` show events?

> - the oprofile view is now filled with some data but I can only see the
> top of the tree (100% in myapp); I cannot dive in deeper (opreport shows
> much more)

If the samples were not created from a launch within Eclipse then the
view will not show the data properly, this was fixed to show an error in
SVN a while back. The reason is the plugin is expecting a single binary
to be in the samples; as in, opcontrol is setup with an --image=<binary>
filter (the plugin isn't meant to be a direct front-end to oprofile,
rather to make oprofile useful to c/c++ Eclipse devs).

If the binary was profiled from within Eclipse and it doesn't show any
symbols/samples, but opreport does, file a bug at eclipse.org and attach
sample files please :)

> - there are still errors in the Eclipse error log

Which? :) If it's a readerSpawner error (or something similar) that's
a cdt issue which has eluded many people AFAIK.
Re: OProfile on openSUSE 11.1 [message #565373 is a reply to message #4124] Wed, 18 February 2009 10:15 Go to previous message
Kent Sebastian is currently offline Kent Sebastian
Messages: 32
Registered: July 2009
Member
Axel Mueller wrote:
> Some more things that do not work:
> - I cannot open the oprofiled log

See the previous message. Although, are you still getting the same SWT
null argument error as before?

> - if I double click the session to save it a dialog appears to ask for
> the session name but the OK button is greyed out; btw, this option is
> *not* obvious and easy to find, I would prefer a right click options menu

Thanks for the suggestion :) Although I'm hesitant because only the
default session can be saved to another name (limitation of opcontrol).
Is 'OK' always greyed out even after you input a name? There should be
an error message if so..

> One more thing. When I start profiling I am asked for the root password
> 4(!) times. That is really annoying. Is it normal or just another error
> in my setup?

On my machine entering the rootpw once via this consolehelper mechanism
keeps the authentication for a few seconds, so I only notice it once.
But indeed, opcontrol is run a few times before launching (and once
after the launch finishes), so if the root auth is only given for a
single command then you would see it multiple times. I will look into this.

As you can see, the need for root access to use oprofile causes some
headaches when trying to use it in userspace.

> Please, feel free to use me as a beta tester.

Excellent, I certainly will ;)


Thanks for your help,

Kent
Re: OProfile on openSUSE 11.1 [message #565386 is a reply to message #4192] Thu, 19 February 2009 02:48 Go to previous message
Axel Mueller is currently offline Axel Mueller
Messages: 1949
Registered: July 2009
Senior Member
Kent Sebastian wrote:

> Oh boy, I expected some problems with 0.1 but not this many ;)

> Axel Mueller wrote:
>> OK, I recompiled opxml and put it in the aforementioned directory.
>> Calling opxml from the command line now works. However, I still have
>> problems with the Eclipse plugin.
>> - no events are shown in the launch configuration

> What is the output of `opxml info`? In the 'defaults' section, does the
> 'log-file' path correct?
Yes.

> Does the oprofile command `ophelp` show events?
Yes.

>> - the oprofile view is now filled with some data but I can only see the
>> top of the tree (100% in myapp); I cannot dive in deeper (opreport shows
>> much more)

> If the samples were not created from a launch within Eclipse then the
> view will not show the data properly, this was fixed to show an error in
> SVN a while back. The reason is the plugin is expecting a single binary
> to be in the samples; as in, opcontrol is setup with an --image=<binary>
> filter (the plugin isn't meant to be a direct front-end to oprofile,
> rather to make oprofile useful to c/c++ Eclipse devs).

> If the binary was profiled from within Eclipse and it doesn't show any
> symbols/samples, but opreport does, file a bug at eclipse.org and attach
> sample files please :)
The samples were created from a launch within Eclipse.

>> - there are still errors in the Eclipse error log

> Which? :) If it's a readerSpawner error (or something similar) that's
> a cdt issue which has eluded many people AFAIK.
There is the error I mentioned in my first message and the readerSpawner
error.

BTW, I am using oprofile 0.9.3. AFAIK, there was no change in the output
format in the latest 0.9.4 (there is nothing mentioned in the Release
Notes).

Axel


Before you ask
- search this forum
- see the FAQ http://wiki.eclipse.org/CDT/User/FAQ
- google
Previous Topic:Using autoheader and libtoolize
Next Topic:Autotools with CygWin
Goto Forum:
  


Current Time: Wed Jul 23 14:08:28 EDT 2014

Powered by FUDForum. Page generated in 0.05537 seconds