Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Linux Tools Project » oprofile: hangs on Parsing OProfile Data
oprofile: hangs on Parsing OProfile Data [message #662778] Thu, 31 March 2011 21:59 Go to next message
Will  is currently offline Will Friend
Messages: 5
Registered: March 2011
Junior Member
Trying to use the OProfile plugin with Eclipse 3.6.2 on Archlinux x86_64. As far as I can tell, OProfile works from the command line.

The plugin itself sometimes seems to work when I run my application with no inputs in which case it just prints out its usage statement and then exits. Sometimes the OProfile tab doesn't come up at all, but sometimes it comes up saying either that no samples were found or it shows one sample in some random function. This seems to make sense as it doesn't take very long for the program to print out its usage statement.

However, profiling any more substantial a run (e.g. still < 1 second) leads to a progress dialog popping up after it has finished which says "Parsing OProfile Data". It doesn't seem to be using any CPU or accessing the harddrive, and it stays at 0% with the Cancel button grayed-out indefinitely.

Any ideas?
Re: oprofile: hangs on Parsing OProfile Data [message #662797 is a reply to message #662778] Fri, 01 April 2011 01:07 Go to previous messageGo to next message
Will  is currently offline Will Friend
Messages: 5
Registered: March 2011
Junior Member
Additionally, when it's hung, I see

opreport -X --details

running. If I kill that process, the progress dialog closes and the OProfile tab reports "No profiling data is on the system."

If I run that command myself in the terminal, I get a lot of data but it finishes/exits more or less immediately. Dunno why it'd hang when run by eclipse.
Re: oprofile: hangs on Parsing OProfile Data [message #662802 is a reply to message #662778] Fri, 01 April 2011 02:03 Go to previous messageGo to next message
Will  is currently offline Will Friend
Messages: 5
Registered: March 2011
Junior Member
So, it's not a problem w/ opreport itself. I can replace the opreport binary with a bash script that just does

cat opout

where opout is the output I generate by running opreport -X -details on the command line and it still hangs. However, it actually works if I trim down the output (remove some of the data segments at the end).

So, I'm currently thinking that the issue is with the handing of opreport's input/output streams by the plugin. This happens in org.eclipse.linuxtools.oprofile.core.linux.OpxmlRunner around line 218. I think the plugin needs to be reading opreport's output as it runs instead of waiting for it to terminate. If opreport's output fills up the inputstream's buffer, it'll cause the hang.

From http://download.oracle.com/javase/1.4.2/docs/api/java/lang/P rocess.html :
Because some native platforms only provide limited buffer size for standard input and output streams, failure to promptly write the input stream or read the output stream of the subprocess may cause the subprocess to block, and even deadlock.

I'll try to test a patch myself, altho I'm not entirely clear on how to turn this source code into an eclipse plugin...

[Updated on: Fri, 01 April 2011 02:48]

Report message to a moderator

Re: oprofile: hangs on Parsing OProfile Data [message #662814 is a reply to message #662778] Fri, 01 April 2011 04:38 Go to previous messageGo to next message
Will  is currently offline Will Friend
Messages: 5
Registered: March 2011
Junior Member
Yea, that was it. Here's an updated OpxmlRunner.java. Changes were made in handleModelData and getEventNames.

http://pastebin.com/Yaqkj5Aa

Maybe I should make a bug report or something..

[Updated on: Fri, 01 April 2011 04:38]

Report message to a moderator

Re: oprofile: hangs on Parsing OProfile Data [message #663016 is a reply to message #662778] Sat, 02 April 2011 03:25 Go to previous messageGo to next message
Will  is currently offline Will Friend
Messages: 5
Registered: March 2011
Junior Member
https://bugs.eclipse.org/bugs/show_bug.cgi?id=341621
Re: oprofile: hangs on Parsing OProfile Data [message #663529 is a reply to message #662778] Tue, 05 April 2011 14:00 Go to previous messageGo to next message
Severin Gehwolf is currently offline Severin GehwolfFriend
Messages: 40
Registered: June 2010
Member
Thanks for finding and debugging this! Your work is very much appreciated. I'll follow up on the bug once the fix is pushed.

--Severin
Re: oprofile: hangs on Parsing OProfile Data [message #698272 is a reply to message #662778] Tue, 19 July 2011 07:29 Go to previous messageGo to next message
siliconarm is currently offline siliconarmFriend
Messages: 5
Registered: May 2011
Junior Member
I have the same problem, how can I install this patch?

Thanks!
Re: oprofile: hangs on Parsing OProfile Data [message #698685 is a reply to message #698272] Wed, 20 July 2011 00:55 Go to previous messageGo to next message
Severin Gehwolf is currently offline Severin GehwolfFriend
Messages: 40
Registered: June 2010
Member
Give me a few days and I'll try to get this fix in. After that it should be available via our nightly update-site.

--Severin
Re: oprofile: hangs on Parsing OProfile Data [message #699057 is a reply to message #698685] Wed, 20 July 2011 18:24 Go to previous messageGo to next message
Severin Gehwolf is currently offline Severin GehwolfFriend
Messages: 40
Registered: June 2010
Member
Fix pushed. It should be in updates-nightly by tomorrow. Let me know if that works for you. Thanks!
Re: oprofile: hangs on Parsing OProfile Data [message #699791 is a reply to message #699057] Fri, 22 July 2011 10:08 Go to previous messageGo to next message
siliconarm is currently offline siliconarmFriend
Messages: 5
Registered: May 2011
Junior Member
Is not yet available today (download.eclipse.org/technology/linuxtools/updates-nightly)
There are another repository to download it?

Thank you so much for your help.
Re: oprofile: hangs on Parsing OProfile Data [message #699846 is a reply to message #699791] Fri, 22 July 2011 13:09 Go to previous messageGo to next message
Severin Gehwolf is currently offline Severin GehwolfFriend
Messages: 40
Registered: June 2010
Member
Sorry about this. Try this repository from our hudson builds instead:

https://hudson.eclipse.org/hudson/view/Tycho + Maven/job/linuxtools-master/lastSuccessfulBuild/artifact/releng/org.eclipse.linuxtools.releng-site/target/repository/

Note that you need to make sure that the spaces in the URL are NOT encoded as %20 when entering the URL as repo location for a newly added repository in p2.

Thanks,
Severin
Re: oprofile: hangs on Parsing OProfile Data [message #702492 is a reply to message #662778] Tue, 26 July 2011 12:51 Go to previous message
siliconarm is currently offline siliconarmFriend
Messages: 5
Registered: May 2011
Junior Member
Thanks Severin it works perfectly!

Thank you so much for your help.
Previous Topic:reconfigure project hanging up
Next Topic:libhover install problem
Goto Forum:
  


Current Time: Thu Apr 18 22:47:59 GMT 2024

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

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

Back to the top