Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoland Grunberg2012-08-17 18:53:37 +0000
committerAlexander Kurtakov2012-09-01 07:54:54 +0000
commit1154a99df73bfdd3815d56af74e44cc76a3d54a9 (patch)
tree8686027b4a907fbd76b2a8b30b96f3618ae000a1
parentc5653c9bcee31f73b01938875d1ec56b64f8d79b (diff)
downloadorg.eclipse.linuxtools-1154a99df73bfdd3815d56af74e44cc76a3d54a9.tar.gz
org.eclipse.linuxtools-1154a99df73bfdd3815d56af74e44cc76a3d54a9.tar.xz
org.eclipse.linuxtools-1154a99df73bfdd3815d56af74e44cc76a3d54a9.zip
387145 Perf should support parsing for newer versions.
Newer versions of perf have changed the format for specifying the event used in the headers. The parsing should take this into account. Change-Id: I2ea6df2d49b7cdd03f93fe4a7b800758e4868dd6 Reviewed-on: https://git.eclipse.org/r/7531 Tested-by: Hudson CI Reviewed-by: Alexander Kurtakov <akurtako@redhat.com> IP-Clean: Alexander Kurtakov <akurtako@redhat.com> Tested-by: Alexander Kurtakov <akurtako@redhat.com>
-rw-r--r--perf/org.eclipse.linuxtools.perf/src/org/eclipse/linuxtools/internal/perf/PerfCore.java9
1 files changed, 7 insertions, 2 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 8162caf2ce..112f5882db 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
@@ -441,9 +441,14 @@ public class PerfCore {
if (monitor != null && monitor.isCanceled()) { RefreshView(); return; }
// line containing report information
if ((line.startsWith("#"))) {
- if (line.contains("Events:")) {
+ if (line.contains("Events:") || line.contains("Samples:")) {
String[] tmp = line.trim().split(" ");
- currentEvent = new PMEvent(tmp[tmp.length - 1]);
+ String event = tmp[tmp.length - 1];
+ // In this case, the event name is single quoted
+ if (line.contains("Samples:")){
+ event = event.substring(1, event.length() -1);
+ }
+ currentEvent = new PMEvent(event);
invisibleRoot.addChild(currentEvent);
currentCommand = null;
currentDso = null;

Back to the top