|
|
Re: oprofile: hangs on Parsing OProfile Data [message #662802 is a reply to message #662778] |
Fri, 01 April 2011 02:03 |
Will 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
|
|
|
|
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.04411 seconds