Skip to main content
aboutsummaryrefslogtreecommitdiffstats
path: root/perf
diff options
context:
space:
mode:
authorWainer dos Santos Moschetta2015-10-09 20:32:14 +0000
committerAlexander Kurtakov2015-10-10 10:35:43 +0000
commit39192a02820fc09dab1094c6f439e20ddbe80801 (patch)
treef3df2bb7800cfc7f16f5dafb37ae4e1fa16dcdc2 /perf
parent4a6bc9fa6642eea6813d65f6ad8e34d593923ec0 (diff)
downloadorg.eclipse.linuxtools-39192a02820fc09dab1094c6f439e20ddbe80801.tar.gz
org.eclipse.linuxtools-39192a02820fc09dab1094c6f439e20ddbe80801.tar.xz
org.eclipse.linuxtools-39192a02820fc09dab1094c6f439e20ddbe80801.zip
Bug 479462 - fix perf annotated symbols without line number
Fix NPE on perf when annotated symbol hasn't associated line on source code. Change-Id: I82458b40d121c878750b0d2c11be6ce3c705ded1 Signed-off-by: Wainer dos Santos Moschetta <wainersm@linux.vnet.ibm.com> Reviewed-on: https://git.eclipse.org/r/57874 Tested-by: Hudson CI Reviewed-by: Alexander Kurtakov <akurtako@redhat.com>
Diffstat (limited to 'perf')
-rw-r--r--perf/org.eclipse.linuxtools.perf/src/org/eclipse/linuxtools/internal/perf/PerfCore.java7
1 files changed, 6 insertions, 1 deletions
diff --git a/perf/org.eclipse.linuxtools.perf/src/org/eclipse/linuxtools/internal/perf/PerfCore.java b/perf/org.eclipse.linuxtools.perf/src/org/eclipse/linuxtools/internal/perf/PerfCore.java
index d1ecedf6ac..d1d7d1e7ff 100644
--- a/perf/org.eclipse.linuxtools.perf/src/org/eclipse/linuxtools/internal/perf/PerfCore.java
+++ b/perf/org.eclipse.linuxtools.perf/src/org/eclipse/linuxtools/internal/perf/PerfCore.java
@@ -624,7 +624,12 @@ public class PerfCore {
} else {
int lineNum = -1;
try {
- lineNum = Integer.parseInt(items[1]);
+ /*
+ * May not have line number when parsing a line like "100.00 [vdso][7ffce9fdbda0]"
+ */
+ if( items.length > 1) {
+ lineNum = Integer.parseInt(items[1]);
+ }
} catch (NumberFormatException e) {
// leave line number as -1
}

Back to the top