[eclipse-linuxtools/f18] Fix Eclipse Bugzilla Perf Bug 402191.

Roland Grunberg rgrunber at fedoraproject.org
Tue May 21 17:57:58 UTC 2013


commit 597e360fd4c5fdf35a785aa0b7ce10c02cb504cb
Author: Roland Grunberg <rgrunber at redhat.com>
Date:   Tue May 21 12:40:30 2013 -0400

    Fix Eclipse Bugzilla Perf Bug 402191.

 eclipse-linuxtools.spec |    7 ++++++-
 perf-402191.patch       |   40 ++++++++++++++++++++++++++++++++++++++++
 2 files changed, 46 insertions(+), 1 deletions(-)
---
diff --git a/eclipse-linuxtools.spec b/eclipse-linuxtools.spec
index c02b828..ff66f6a 100644
--- a/eclipse-linuxtools.spec
+++ b/eclipse-linuxtools.spec
@@ -2,7 +2,7 @@
 
 Name:           eclipse-linuxtools
 Version:        1.2.0
-Release:        5%{?dist}
+Release:        6%{?dist}
 Summary:        Linux specific Eclipse plugins
 
 License:        EPL
@@ -11,6 +11,7 @@ Source0:        http://git.eclipse.org/c/linuxtools/org.eclipse.linuxtools.git/s
 Patch0:         remove-parent.patch
 Patch1:         disable-libhover-lttng.patch
 Patch2:         disable-jacoco-maven-plugin.patch
+Patch3:         perf-402191.patch
 
 BuildRequires: tycho
 BuildRequires: tycho-extras  
@@ -129,6 +130,7 @@ Integrate Systemtap's profiling and tracing capabilities with the CDT.
 %patch0
 %patch1 -p1
 %patch2 -p1
+%patch3 -p1
 
 %pom_disable_module lttng
 %pom_disable_module libhover
@@ -284,6 +286,9 @@ popd
 %doc systemtap/org.eclipse.linuxtools.systemtap-feature/epl-v10.html
 
 %changelog
+* Tue May 21 2013 Roland Grunberg <rgrunber at redhat.com> 1.2.0-6
+- Fix Eclipse Bugzilla Perf Bug 402191.
+
 * Mon Feb 4 2013 <swagiaal at redhat.com> 1.2.0-5
 - Actually remove 'Requires: kernel-debuginfo' from systemtap.
 
diff --git a/perf-402191.patch b/perf-402191.patch
new file mode 100644
index 0000000..2e692f5
--- /dev/null
+++ b/perf-402191.patch
@@ -0,0 +1,40 @@
+From 19e9bf1b29d5d70f18c21071f499b738f8dd0558 Mon Sep 17 00:00:00 2001
+From: Camilo Bernal <cabernal at redhat.com>
+Date: Fri, 1 Mar 2013 16:58:57 -0500
+Subject: [PATCH] Bug 402191: Fix for  Perf failing when obtaining source line
+ numbers
+
+Catch number format exception and leave line number as -1 when "?"
+is encountered.
+
+Change-Id: I30f430c759a76dd48eb3f5c94467e10854440d74
+Reviewed-on: https://git.eclipse.org/r/10793
+Reviewed-by: Roland Grunberg <rgrunber at redhat.com>
+IP-Clean: Roland Grunberg <rgrunber at redhat.com>
+Tested-by: Roland Grunberg <rgrunber at redhat.com>
+---
+ .../src/org/eclipse/linuxtools/internal/perf/PerfCore.java        | 8 +++++++-
+ 1 file changed, 7 insertions(+), 1 deletion(-)
+
+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 0b85080..7c88a8a 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
+@@ -647,7 +647,13 @@ public class PerfCore {
+ 						//if (PerfPlugin.DEBUG_ON) System.err.println("Parsed line ref without being in valid block, shouldn't happen.");
+ 						break;
+ 					} else {
+-						currentSym.addPercent(Integer.parseInt(items[1]), percent);
++						int lineNum = -1;
++						try {
++							lineNum = Integer.parseInt(items[1]);
++						} catch (NumberFormatException e) {
++							// leave line number as -1
++						}
++						currentSym.addPercent(lineNum, percent);
+ 						// Symbol currently in 'Unfiled Symbols' but we now know the actual parent
+ 						if (currentSym.getParent().getName().equals(PerfPlugin.STRINGS_UnfiledSymbols)) {
+ 							currentSym.getParent().removeChild(currentSym);
+-- 
+1.8.1.4
+


More information about the scm-commits mailing list