From bcb9a3546ca85ffc8debdb339e804e0580c8a358 Mon Sep 17 00:00:00 2001 From: jooyoul_lee Date: Wed, 6 Nov 2013 10:20:50 +0900 Subject: [PATCH] [Title] process map change bug fixed [Desc.] [Issue] --- .../swap/channel/data/ProcessInfoPackage.java | 11 ++++++---- .../swap/logparser/MessageParser.java | 24 +++++++++++----------- 2 files changed, 19 insertions(+), 16 deletions(-) diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/swap/channel/data/ProcessInfoPackage.java b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/swap/channel/data/ProcessInfoPackage.java index e53201a..884eeda 100644 --- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/swap/channel/data/ProcessInfoPackage.java +++ b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/swap/channel/data/ProcessInfoPackage.java @@ -67,9 +67,12 @@ public class ProcessInfoPackage { return (sec * 1000000 + nano / 1000); } - - public ProcessInfo getBaseProcessInfo() - { - return processSnapshots.get(0); + + public ProcessInfo getLastProcessInfo() { + int size = processSnapshots.size(); + if (size < 0) { + return null; + } + return processSnapshots.get(size - 1); } } diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/swap/logparser/MessageParser.java b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/swap/logparser/MessageParser.java index 0e25f73..25270a2 100755 --- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/swap/logparser/MessageParser.java +++ b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/swap/logparser/MessageParser.java @@ -284,16 +284,16 @@ public class MessageParser { // bug!!! System.out.println("bug occurred!!"); } - ProcessInfo baseProcessInfo = pInfoPack.getBaseProcessInfo(); + ProcessInfo lastProcessInfo = pInfoPack.getLastProcessInfo(); ProcessInfo pInfo = new ProcessInfo(); pInfo.setPid(pid); - pInfo.setPpid(baseProcessInfo.getPpid()); - pInfo.setStartTime(baseProcessInfo.getStartTime()); - pInfo.setMainTargetBinaryPath(baseProcessInfo.getMainTargetBinaryPath()); - pInfo.getLibObjs().addAll(baseProcessInfo.getLibObjs()); - pInfo.getLibObjHash().putAll(baseProcessInfo.getLibObjHash()); - pInfo.setLowestAddress(baseProcessInfo.getLowestAddress()); - pInfo.setHighestAddress(baseProcessInfo.getHighestAddress()); + pInfo.setPpid(lastProcessInfo.getPpid()); + pInfo.setStartTime(changeTime); + pInfo.setMainTargetBinaryPath(lastProcessInfo.getMainTargetBinaryPath()); + pInfo.getLibObjs().addAll(lastProcessInfo.getLibObjs()); + pInfo.getLibObjHash().putAll(lastProcessInfo.getLibObjHash()); + pInfo.setLowestAddress(lastProcessInfo.getLowestAddress()); + pInfo.setHighestAddress(lastProcessInfo.getHighestAddress()); pInfoPack.getProcessSnapshots().add(pInfo); @@ -310,15 +310,15 @@ public class MessageParser { pInfo.getLibObjHash().put(libPath, libObj); // log - System.out.println("MAP CHANGED MAP " + System.out.println("MAP CHANGED ADD " + AnalyzerUtil.toHexdecimal(id) + " libPath : " + libPath + " low : " + AnalyzerUtil.toHexdecimal(lowAddr) - + " high: " + AnalyzerUtil.toHexdecimal(highAddr)); + + " high: " + AnalyzerUtil.toHexdecimal(highAddr) + " chage time : " + changeTime.getSaveFormat() + " total count : " + pInfo.getLibObjs().size()); } else { - System.out.println("MAP CHANGED UNMAP " + System.out.println("MAP CHANGED REMOVE " + AnalyzerUtil.toHexdecimal(id) + " libPath : " + libPath + " low : " + AnalyzerUtil.toHexdecimal(lowAddr) - + " high: " + AnalyzerUtil.toHexdecimal(highAddr)); + + " high: " + AnalyzerUtil.toHexdecimal(highAddr) + " chage time : " + changeTime.getSaveFormat()+ " total count : " + pInfo.getDepLibCount()); int size = libObjs.size(); for (int i = 0; i < size; i++) { -- 2.7.4