diff options
author | Wainer dos Santos Moschetta | 2015-10-13 19:14:01 +0000 |
---|---|---|
committer | Alexander Kurtakov | 2015-10-14 06:10:19 +0000 |
commit | 61975ca2d237b544446643d5ef0264b65b5746f0 (patch) | |
tree | d46998dd96595da26c4881b3e8ccf85015a64b0f /perf | |
parent | 5ff78035c8026fa61dc1908c840c1b1e44b2a593 (diff) | |
download | org.eclipse.linuxtools-61975ca2d237b544446643d5ef0264b65b5746f0.tar.gz org.eclipse.linuxtools-61975ca2d237b544446643d5ef0264b65b5746f0.tar.xz org.eclipse.linuxtools-61975ca2d237b544446643d5ef0264b65b5746f0.zip |
Bug 477829 - fix to assembly view that hangs
Similar fix as that applied to perf record to obtain source line:
redirect /dev/null to perf annotate input will avoid it of waiting forever.
Change-Id: I320fb400c1038409a30592b6e93d80826c7f89b8
Signed-off-by: Wainer dos Santos Moschetta <wainersm@linux.vnet.ibm.com>
Reviewed-on: https://git.eclipse.org/r/58099
Tested-by: Hudson CI
Reviewed-by: Alexander Kurtakov <akurtako@redhat.com>
Diffstat (limited to 'perf')
2 files changed, 7 insertions, 3 deletions
diff --git a/perf/org.eclipse.linuxtools.perf.tests/src/org/eclipse/linuxtools/internal/perf/tests/DataManipulatorTest.java b/perf/org.eclipse.linuxtools.perf.tests/src/org/eclipse/linuxtools/internal/perf/tests/DataManipulatorTest.java index d282d3c674..9f6d7b846e 100644 --- a/perf/org.eclipse.linuxtools.perf.tests/src/org/eclipse/linuxtools/internal/perf/tests/DataManipulatorTest.java +++ b/perf/org.eclipse.linuxtools.perf.tests/src/org/eclipse/linuxtools/internal/perf/tests/DataManipulatorTest.java @@ -38,7 +38,7 @@ public class DataManipulatorTest { "disassembly data", path); //$NON-NLS-1$ sdData.parse(); - String expected = "perf annotate -i " + path.toOSString() + "perf.data"; //$NON-NLS-1$ + String expected = "sh -c perf annotate -i " + path.toOSString() + "perf.data < /dev/null"; //$NON-NLS-1$ assertEquals(expected, sdData.getPerfData().trim()); } diff --git a/perf/org.eclipse.linuxtools.perf/src/org/eclipse/linuxtools/internal/perf/SourceDisassemblyData.java b/perf/org.eclipse.linuxtools.perf/src/org/eclipse/linuxtools/internal/perf/SourceDisassemblyData.java index e63da557c1..1d3109def3 100644 --- a/perf/org.eclipse.linuxtools.perf/src/org/eclipse/linuxtools/internal/perf/SourceDisassemblyData.java +++ b/perf/org.eclipse.linuxtools.perf/src/org/eclipse/linuxtools/internal/perf/SourceDisassemblyData.java @@ -46,8 +46,12 @@ public class SourceDisassemblyData extends AbstractDataManipulator { } protected String [] getCommand(String workingDir) { - return new String[] { "perf", "annotate", //$NON-NLS-1$ //$NON-NLS-2$ - "-i", workingDir + "perf.data" }; //$NON-NLS-1$ //$NON-NLS-2$ + /* + * Some versions of perf annotate hangs waiting for some input that never comes. + * Redirecting an empty file or /dev/null to its input will avoid this. + */ + return new String[] { "sh", "-c", "perf annotate -i " + workingDir + "perf.data" + //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ + " < /dev/null" }; //$NON-NLS-1$ } }
\ No newline at end of file |