From 9eba6cd1bb1ba5073d0cb32cc440e5b640b0c6a1 Mon Sep 17 00:00:00 2001 From: "wonhyoung2.park" Date: Fri, 14 Oct 2011 18:45:34 +0900 Subject: [PATCH] [title] Oprofile bug fix [Type] [Module] [Priority] [CQ#] [Redmine#] [Problem] [Cause] [Solution] [TestCase] --- .../oprofile/core/processor/eventinfo/OpInfoProcessor.java | 3 +++ .../oprofile/core/processor/modeldata/ModelDataProcessor.java | 3 +++ 2 files changed, 6 insertions(+) diff --git a/org.eclipse.linuxtools.oprofile.core/src/com/samsung/linuxplatform/oprofile/core/processor/eventinfo/OpInfoProcessor.java b/org.eclipse.linuxtools.oprofile.core/src/com/samsung/linuxplatform/oprofile/core/processor/eventinfo/OpInfoProcessor.java index 379e0d4..67d6e05 100644 --- a/org.eclipse.linuxtools.oprofile.core/src/com/samsung/linuxplatform/oprofile/core/processor/eventinfo/OpInfoProcessor.java +++ b/org.eclipse.linuxtools.oprofile.core/src/com/samsung/linuxplatform/oprofile/core/processor/eventinfo/OpInfoProcessor.java @@ -44,6 +44,9 @@ public class OpInfoProcessor{ try { resultStr = session.run(COMMAND_COUNTER_NO, null); + if(resultStr.startsWith("/opt/home/root # ")){ + resultStr = resultStr.substring(17, resultStr.length()); + } } catch (Exception e) { throw new InterruptedException(); } diff --git a/org.eclipse.linuxtools.oprofile.core/src/com/samsung/linuxplatform/oprofile/core/processor/modeldata/ModelDataProcessor.java b/org.eclipse.linuxtools.oprofile.core/src/com/samsung/linuxplatform/oprofile/core/processor/modeldata/ModelDataProcessor.java index 6616527..74ce5b8 100644 --- a/org.eclipse.linuxtools.oprofile.core/src/com/samsung/linuxplatform/oprofile/core/processor/modeldata/ModelDataProcessor.java +++ b/org.eclipse.linuxtools.oprofile.core/src/com/samsung/linuxplatform/oprofile/core/processor/modeldata/ModelDataProcessor.java @@ -73,6 +73,9 @@ public class ModelDataProcessor{ } try { + if(resultStr.startsWith("/opt/home/root # ")){ + resultStr = resultStr.substring(19,resultStr.length()); + } saxParser.parse(new InputSource(new StringReader(resultStr)),handler); } catch (Exception e) { e.printStackTrace(); -- 2.7.4