[Title] swap source update
authorjooyoul_lee <jy.exe.lee@samsung.com>
Wed, 31 Jul 2013 06:08:11 +0000 (15:08 +0900)
committerjooyoul_lee <jy.exe.lee@samsung.com>
Wed, 31 Jul 2013 06:08:11 +0000 (15:08 +0900)
[Desc.]  -
[Issue]

27 files changed:
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/common/AnalyzerManager.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/common/ElfSymbolExtracter.java [moved from org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/common/ElfSymbolExtractManager.java with 54% similarity]
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/handlers/ReplayTraceHandler.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/logparser/LogInserter.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/logparser/MessageProcess.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/model/AddrSymbolPair.java [new file with mode: 0644]
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/project/AppInfo.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/sql/SqlManager.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/swap/communicator/Communicator30.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/swap/logparser/MessageParser.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/swap/logparser/SWAPLogParser.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/swap/model/RecordEventObject.java [new file with mode: 0644]
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/swap/model/control/ApplicationInst.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/swap/model/control/FunctionInst.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/swap/model/control/UserSpaceInst.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/swap/model/probe2/DataFactory.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/swap/model/probe2/LogDataFactory.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/swap/model/probe2/ReplayData.java [new file with mode: 0644]
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/swap/model/probe2/UIEventData.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/file/FileChartData.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/file/FileDataMaker.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/timeline/chart/UIEventChart.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/toolbar/StopProcessManager.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/toolbar/ToolbarArea.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/toolbar/TraceStartStopThread.java [moved from org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/toolbar/RecordStartStopThread.java with 90% similarity]
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/userinterface/UIDataManager.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/utils/AnalyzerUtil.java

index bb99ac3..b918d81 100755 (executable)
@@ -65,6 +65,7 @@ import org.tizen.dynamicanalyzer.utils.XMLManager;
 public class AnalyzerManager {
        private static DATheme theme = null;
        private static Project project = null;
+       private static boolean isRunning = false;
 
        private static List<BaseLogCenter> baseLogCenters;
        private static List<LogCenter> logCenters;
@@ -452,11 +453,16 @@ public class AnalyzerManager {
        }
 
        public static boolean isRunning() {
-               String state = AnalyzerUtil.getRecordState();
-               if (state.equals(RecordStateSourceProvider.RECORD_RECORDING)) {
-                       return true;
-               } else {
-                       return false;
-               }
+               // String state = AnalyzerUtil.getRecordState();
+               // if (state.equals(RecordStateSourceProvider.RECORD_RECORDING)) {
+               // return true;
+               // } else {
+               // return false;
+               // }
+               return isRunning;
+       }
+
+       public static void setRunningState(boolean isRunning) {
+               AnalyzerManager.isRunning = isRunning;
        }
 }
 package org.tizen.dynamicanalyzer.common;
 
 import java.io.IOException;
+import java.util.ArrayList;
 import java.util.HashMap;
+import java.util.List;
 
 import org.eclipse.cdt.utils.elf.Elf;
 import org.eclipse.cdt.utils.elf.Elf.Symbol;
+import org.tizen.dynamicanalyzer.model.AddrSymbolPair;
 
-public class ElfSymbolExtractManager {
-       private String libPath = null;
+public class ElfSymbolExtracter {
+       private String sourcePath = null;
        private HashMap<Long, String> symbolMap = null;
-       private static ElfSymbolExtractManager instance = null;
-       
-       private ElfSymbolExtractManager(){
-       }
-       
-       public static ElfSymbolExtractManager getInstance(){
-               if(null == instance){
-                       instance = new ElfSymbolExtractManager();
-               }
-               return instance;
+       private List<AddrSymbolPair> addrSymbolPairs = null;
+
+       public ElfSymbolExtracter() {
+               symbolMap = new HashMap<Long, String>();
+               addrSymbolPairs = new ArrayList<AddrSymbolPair>();
        }
-       
-       public boolean makeSymbol(String libPath){
-               this.libPath = libPath;
-               if(null != symbolMap){
+
+       public boolean makeSymbol(String path) {
+               this.sourcePath = path;
+               if (null != symbolMap) {
                        symbolMap.clear();
-               }
-               else{
+               } else {
                        symbolMap = new HashMap<Long, String>();
                }
                Elf elf;
                try {
-                       elf = new Elf(libPath);
+                       elf = new Elf(path);
                        elf.loadSymbols();
                } catch (IOException e) {
                        // TODO Auto-generated catch block
@@ -64,43 +61,51 @@ public class ElfSymbolExtractManager {
                        return false;
                }
                Symbol[] symbols = elf.getSymtabSymbols();
-               for(Symbol symbol : symbols){
-                       if(symbol.st_type() != Elf.Symbol.STT_FUNC || symbol.st_shndx == Elf.Symbol.SHN_UNDEF){
+               for (Symbol symbol : symbols) {
+                       if (symbol.st_type() != Elf.Symbol.STT_FUNC
+                                       || symbol.st_shndx == Elf.Symbol.SHN_UNDEF) {
                                continue;
                        }
-                       symbolMap.put(symbol.st_value.getValue().longValue(), symbol.toString());
+                       long addr = symbol.st_value.getValue().longValue();
+                       String symbolStr = symbol.toString();
+                       symbolMap.put(addr, symbolStr);
+                       addrSymbolPairs.add(new AddrSymbolPair(addr, symbolStr));
                }
                return true;
        }
-       
-       public Long[] getSymbolAddress(){
-               if(null == symbolMap || 0 == symbolMap.size()){
+
+       public Long[] getSymbolAddress() {
+               if (null == symbolMap || 0 == symbolMap.size()) {
                        return null;
                }
-               
+
                Long[] ret = new Long[symbolMap.size()];
-               ret = (Long[])(symbolMap.keySet().toArray(ret));
+               ret = (Long[]) (symbolMap.keySet().toArray(ret));
 
                return ret;
        }
-       
-       public HashMap<Long, String> symbolMap(){
+
+       public HashMap<Long, String> symbolMap() {
                return symbolMap;
        }
-       
-       public void setLibPath(String libPath){
-               this.libPath = libPath;
+
+       public void setLibPath(String libPath) {
+               this.sourcePath = libPath;
        }
-       
-       public String getLibPath(){
-               return libPath;
+
+       public String getLibPath() {
+               return sourcePath;
        }
-       
-       public void clear(){
-               libPath = null;
-               if(null != symbolMap){
+
+       public void clear() {
+               sourcePath = null;
+               if (null != symbolMap) {
                        symbolMap.clear();
                        symbolMap = null;
                }
        }
+
+       public List<AddrSymbolPair> getAddrSymbolPairs() {
+               return addrSymbolPairs;
+       }
 }
index 11b4e05..4328a43 100644 (file)
@@ -31,6 +31,8 @@ import org.eclipse.core.commands.AbstractHandler;
 import org.eclipse.core.commands.ExecutionEvent;
 import org.eclipse.core.commands.ExecutionException;
 import org.tizen.dynamicanalyzer.common.AnalyzerManager;
+import org.tizen.dynamicanalyzer.communicator.DACommunicator;
+import org.tizen.dynamicanalyzer.swap.model.DATime;
 import org.tizen.dynamicanalyzer.ui.toolbar.ToolbarArea;
 import org.tizen.dynamicanalyzer.ui.toolbar.configuration.ConfigurationDialogValues;
 import org.tizen.dynamicanalyzer.uirecorder.UIRecorderTool;
@@ -42,22 +44,29 @@ public class ReplayTraceHandler extends AbstractHandler {
        public static final String ID = ReplayTraceHandler.class.getName();
        public static Integer FAILED = 1;
        public static boolean isReplay = false;
+       public static DATime startTime = null;
        public static long stopTime = -1;
        public static String RECORD_DATA_FILE_NAME = "/uirecorder.xml"; //$NON-NLS-1$
 
        @Override
        public Object execute(ExecutionEvent event) throws ExecutionException {
-               UIRecorderTool recorderMng = UIRecorderTool.getInstance();
-               String xmlFileName = AnalyzerManager.getProject().getSavePath()
-                               + RECORD_DATA_FILE_NAME;
+               if (!DACommunicator.isSWAPVersion()) {
+                       UIRecorderTool recorderMng = UIRecorderTool.getInstance();
+                       String xmlFileName = AnalyzerManager.getProject().getSavePath()
+                                       + RECORD_DATA_FILE_NAME;
 
-               if (xmlFileName == null || xmlFileName.isEmpty()) {
-                       return FAILED;
+                       if (xmlFileName == null || xmlFileName.isEmpty()) {
+                               return FAILED;
+                       } else {
+                               recorderMng.setXmlPath(xmlFileName);
+                               recorderMng.setReplayFlag(true);
+                               isReplay = true;
+                               stopTime = AnalyzerManager.getProject().getStopTime();
+                       }
                } else {
-                       recorderMng.setXmlPath(xmlFileName);
-                       recorderMng.setReplayFlag(true);
                        isReplay = true;
                        stopTime = AnalyzerManager.getProject().getStopTime();
+                       startTime = AnalyzerManager.getProject().getStartTime();
                }
                return null;
        }
index 1420dfa..335b9f6 100644 (file)
@@ -33,7 +33,6 @@ import org.tizen.dynamicanalyzer.common.AnalyzerConstants;
 import org.tizen.dynamicanalyzer.common.AnalyzerManager;
 import org.tizen.dynamicanalyzer.sql.SqlManager;
 import org.tizen.dynamicanalyzer.swap.logparser.LogPackage;
-import org.tizen.dynamicanalyzer.swap.logparser.Logs;
 import org.tizen.dynamicanalyzer.swap.model.data.BasicDataMessage;
 import org.tizen.dynamicanalyzer.swap.model.probe2.LogDataFactory;
 
index d98df27..7a7ab61 100644 (file)
@@ -42,7 +42,6 @@ import org.tizen.dynamicanalyzer.communicator.DACommunicator;
 import org.tizen.dynamicanalyzer.handlers.StopHandler;
 import org.tizen.dynamicanalyzer.nl.AnalyzerLabels;
 import org.tizen.dynamicanalyzer.project.Project;
-import org.tizen.dynamicanalyzer.services.RecordStateSourceProvider;
 import org.tizen.dynamicanalyzer.swap.model.control.TargetInfo;
 import org.tizen.dynamicanalyzer.swap.model.data.ProcessInfo;
 import org.tizen.dynamicanalyzer.ui.toolbar.StopLogProcessor;
@@ -359,7 +358,8 @@ public class MessageProcess {
                System.out.println("Ending steps!");
                message = null;
                DACommunicator.setRunning(false);
-               AnalyzerUtil.setRecordState(RecordStateSourceProvider.RECORD_READY);
+//             AnalyzerUtil.setRecordState(RecordStateSourceProvider.RECORD_READY);
+               AnalyzerManager.setRunningState(false);
                Display.getDefault().syncExec(new Runnable() {
                        @Override
                        public void run() {
diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/model/AddrSymbolPair.java b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/model/AddrSymbolPair.java
new file mode 100644 (file)
index 0000000..9584e8a
--- /dev/null
@@ -0,0 +1,20 @@
+package org.tizen.dynamicanalyzer.model;
+
+public class AddrSymbolPair {
+       long addr = 0;
+       String symbol = null;
+
+       public AddrSymbolPair(long addr, String symbol) {
+               this.addr = addr;
+               this.symbol = symbol;
+       }
+
+       public long getAddr() {
+               return addr;
+       }
+
+       public String getSymbol() {
+               return symbol;
+       }
+
+}
index 54c56f6..edc7f74 100644 (file)
@@ -30,6 +30,8 @@ import java.util.ArrayList;
 import java.util.List;
 
 import org.tizen.dynamicanalyzer.common.CommonConstants;
+import org.tizen.dynamicanalyzer.common.ElfSymbolExtracter;
+import org.tizen.dynamicanalyzer.model.AddrSymbolPair;
 import org.tizen.dynamicanalyzer.swap.model.control.BinaryInfo;
 
 public class AppInfo {
@@ -56,6 +58,8 @@ public class AppInfo {
 
        private String installTime = null;
 
+       private ElfSymbolExtracter symbolExtractor = new ElfSymbolExtracter();
+
        public String getInstallTime() {
                return installTime;
        }
@@ -87,4 +91,8 @@ public class AppInfo {
        public void setBinInfo(BinaryInfo binInfo) {
                this.binInfo = binInfo;
        }
+
+       public List<AddrSymbolPair> getSymbols() {
+               return symbolExtractor.getAddrSymbolPairs();
+       }
 }
index 5f7c37e..ce7ca34 100755 (executable)
@@ -440,30 +440,9 @@ public class SqlManager {
        public void insert(int logId, List<BasicDataMessage> input)
                        throws InterruptedException {
                String tableName = LogDataFactory.getTableNamebyId(logId);
-               // String insertQuery = logc.getInsertQuery();
                String insertQuery = "insert into " + tableName
                                + " values( ?, ?, ?, ?, ?);";
                System.out.println("inser query : " + insertQuery);
-               // int dataSize = input.size();
-               // for (int inputIndex = 0; inputIndex < dataSize; inputIndex++) {
-               // List<String> insetRowData = new ArrayList<String>();
-               // List<String> log = input.get(inputIndex);
-               // int size = logc.getTotalColumnCount();
-               // insetRowData.add(Integer.toString(logc.getIndex()));
-               // for (int i = 0; i < size; i++) {
-               // try {
-               // if (i + 2 > size) {
-               // break;
-               // }
-               // insetRowData.add(log.get(i));
-               // } catch (ArrayIndexOutOfBoundsException e) {
-               //                                      System.out.println("sql insert exception : index " + i); //$NON-NLS-1$
-               // e.printStackTrace();
-               // }
-               // }
-               // insetData.add(insetRowData);
-               // logc.addIndex();
-               // }
                insertLogQuery(logId, insertQuery, input);
 
        }
@@ -634,8 +613,6 @@ public class SqlManager {
                String insertQuery = unitTableInfo.insertQuery();
                HashMap<Long, CallStackUnit> callstackMap = AnalyzerManager
                                .getCallstackManager().getCallStackApiByAddrMap();
-               // HashMap<Long, CallStackUnit> callstackMap = CallStackManager
-               // .getInstance().getCallStackApiByAddrMap();
                List<CallStackUnit> callstackUnits = new ArrayList<CallStackUnit>();
                callstackUnits.addAll(callstackMap.values());
                int size = callstackUnits.size();
@@ -658,8 +635,6 @@ public class SqlManager {
                                DBTableManager.TABLE_INDEX_CALLSTACK_DATA);
                List<List<String>> insetData = new ArrayList<List<String>>();
                String insertQuery = callstackData.insertQuery();
-               // Collection<CallStackData> col = CallStackManager.getInstance()
-               // .getCallStackDataBySeqMap().values();
                Collection<CallStackData> col = AnalyzerManager.getCallstackManager()
                                .getCallStackDataBySeqMap().values();
                List<CallStackData> callstackDataList = new ArrayList<CallStackData>();
@@ -681,21 +656,6 @@ public class SqlManager {
                insertQuery(insertQuery, insetData);
        }
 
-       // public void saveAppInfo() {
-       // DBTableInfo appInfoData = DBTableManager.getInstance().getTableInfo(
-       // DBTableManager.TABLE_INDEX_APP_INFO);
-       // String insertQuery = appInfoData.insertQuery();
-       // List<String> info = AnalyzerManager.getProject().getAppInfo();
-       // int size = info.size();
-       // List<List<String>> insetData = new ArrayList<List<String>>();
-       // for (int i = 0; i < size; i++) {
-       // List<String> insetRowData = new ArrayList<String>();
-       // insetRowData.add(info.get(i));
-       // insetData.add(insetRowData);
-       // }
-       // insertQuery(insertQuery, insetData);
-       // }
-
        public void saveProfilingData() {
                ProfileDataMaker profiler = FunctionUsageProfiler.getInstance()
                                .getProfileDataMaker();
@@ -909,6 +869,49 @@ public class SqlManager {
                return logs;
        }
 
+       public List<BasicDataMessage> getReplayLogs() {
+               String query = null;
+               Statement stat = null;
+               ResultSet rs = null;
+               Connection conn = null;
+               List<BasicDataMessage> logs = null;
+               try {
+                       conn = getConnection();
+                       if (null == conn) {
+                               return null;
+                       }
+                       semaphoreAcquire();
+                       StringBuilder columns = new StringBuilder();
+                       columns.append("Rid , ID , SeqNumber , Time ,  payload ");
+                       query = String.format("select %s from %s ;",//$NON-NLS-1$
+                                       columns.toString(), "replay");
+
+                       stat = conn.createStatement();
+                       rs = stat.executeQuery(query);
+                       if (null == rs) {
+                               return null;
+                       }
+                       logs = new ArrayList<BasicDataMessage>();
+                       while (rs.next()) {
+                               BasicDataMessage bdm = new BasicDataMessage();
+                               bdm.setId(rs.getInt(2));
+                               bdm.setSeq(rs.getInt(3));
+                               bdm.setTime(rs.getLong(4));
+                               bdm.setPayload(rs.getBytes(5));
+                               logs.add(bdm);
+                       }
+               } catch (SQLException e) {
+                       System.out.println("SQLException - selecte : " + query);
+                       e.printStackTrace();
+               } finally {
+                       AnalyzerUtil.tryClose(stat, rs);
+                       if (null != conn) {
+                               semaphoreRelease();
+                       }
+               }
+               return logs;
+       }
+
        public List<List<String>> selectQuery(String dbFilePath,
                        String[] columnName, String tableName, String option) {
                List<List<String>> dbInfo = null;
index 20af329..c239610 100755 (executable)
@@ -22,6 +22,7 @@ import java.util.ArrayList;
 import java.util.List;
 
 import org.tizen.dynamicanalyzer.common.AnalyzerConstants;
+import org.tizen.dynamicanalyzer.common.AnalyzerManager;
 import org.tizen.dynamicanalyzer.common.AnalyzerPaths;
 import org.tizen.dynamicanalyzer.common.AnalyzerShellCommands;
 import org.tizen.dynamicanalyzer.common.CommonConstants;
@@ -30,16 +31,23 @@ import org.tizen.dynamicanalyzer.common.HostResult;
 import org.tizen.dynamicanalyzer.communicator.BaseCommunicator;
 import org.tizen.dynamicanalyzer.communicator.CommunicatorUtils;
 import org.tizen.dynamicanalyzer.communicator.DACommunicator;
+import org.tizen.dynamicanalyzer.handlers.ReplayTraceHandler;
+import org.tizen.dynamicanalyzer.model.AddrSymbolPair;
 import org.tizen.dynamicanalyzer.model.DeviceInfo;
+import org.tizen.dynamicanalyzer.nl.ConfigureLabels;
 import org.tizen.dynamicanalyzer.project.AppInfo;
+import org.tizen.dynamicanalyzer.sql.SqlManager;
 import org.tizen.dynamicanalyzer.swap.logparser.SWAPLogParser;
 import org.tizen.dynamicanalyzer.swap.model.ByteUtils;
+import org.tizen.dynamicanalyzer.swap.model.DATime;
 import org.tizen.dynamicanalyzer.swap.model.control.ApplicationInfo;
 import org.tizen.dynamicanalyzer.swap.model.control.ApplicationInst;
 import org.tizen.dynamicanalyzer.swap.model.control.BinaryInfo;
+import org.tizen.dynamicanalyzer.swap.model.control.FunctionInst;
 import org.tizen.dynamicanalyzer.swap.model.control.RunTimeConfiguration;
 import org.tizen.dynamicanalyzer.swap.model.control.TargetInfo;
 import org.tizen.dynamicanalyzer.swap.model.control.UserSpaceInst;
+import org.tizen.dynamicanalyzer.swap.model.data.BasicDataMessage;
 import org.tizen.dynamicanalyzer.ui.file.FileChartManager;
 import org.tizen.dynamicanalyzer.ui.summary.profiling.FunctionUsageProfiler;
 import org.tizen.dynamicanalyzer.ui.thread.ThreadChartManager;
@@ -151,6 +159,10 @@ public class Communicator30 extends BaseCommunicator {
 
        @Override
        public HostResult startTrace() {
+               HostResult hr = sendBinaryInfoMessage();
+               if (!hr.isSuccess()) {
+                       System.out.println("binary info get failed :" + hr.getMessage());
+               }
                // binary info message send
                DACommunicator.setRunning(true);
                ApplicationInfo appInfo = new ApplicationInfo();
@@ -167,9 +179,32 @@ public class Communicator30 extends BaseCommunicator {
                RunTimeConfiguration rt = new RunTimeConfiguration();
                rt.setFeatures(ConfigureManager.getInstance().getConfiguration());
 
+               byte[] replayEvent = null;
+               // check replay mode
+               if (ReplayTraceHandler.isReplay) {
+                       // make replay event
+                       // on/off , replay start time, count, event objs
+                       int onOff = 1;
+                       DATime startTime = ReplayTraceHandler.startTime;
+                       List<BasicDataMessage> replayLogs = SqlManager.getInstance()
+                                       .getReplayLogs();
+                       int count = replayLogs.size();
+                       byte[] eventObjs = null;
+                       for (int i = 0; i < count; i++) {
+                               eventObjs = ByteUtils.concatByteArray(eventObjs, replayLogs
+                                               .get(i).getPayload());
+                       }
+
+                       replayEvent = ByteUtils.getByte(onOff, startTime.getSec(),
+                                       startTime.getNano(), count, eventObjs);
+               } else {
+                       replayEvent = ByteUtils.getByte(0);
+               }
+
                // TODO: app inst , replay info added!!
                byte[] rear = ByteUtils.getByte(appInfo.getByteValue(),
-                               rt.getByteValue(), 0, 0);
+                               rt.getByteValue(), getUserSpaceInst().getByteValue(),
+                               replayEvent);
                int length = rear.length;
 
                byte[] ret = ByteUtils.getByte(AnalyzerConstants.MSG_START_SWAP,
@@ -209,12 +244,38 @@ public class Communicator30 extends BaseCommunicator {
                return result;
        }
 
-//     private UserSpaceInst getUserSpaceInst() {
-//             UserSpaceInst output = new UserSpaceInst();
-//             output.setCount(1);   // single processing
-//             List<ApplicationInst> applicationInstList = new ArrayList<ApplicationInst>();
-//             
-//     }
+       private UserSpaceInst getUserSpaceInst() {
+               UserSpaceInst output = new UserSpaceInst();
+               if (0 == ConfigureManager.getInstance().getValueInt(
+                               ConfigureLabels.FEATURE_FUNCTION_PROFILING)) {
+                       output.setCount(0);
+                       return output;
+               }
+               output.setCount(1); // single processing
+               ApplicationInst appInst = new ApplicationInst();
+               appInst.setApplicationType(ApplicationInfo.APPTYPE_TIZEN);
+               AppInfo selectedApp = DACommunicator.getSelectedApp();
+               appInst.setApplicationId(selectedApp.getInfo(AppInfo.APPID_INDEX));
+               appInst.setExecutablePath(selectedApp.getInfo(AppInfo.EXEC_INDEX));
+
+               List<AddrSymbolPair> symbols = selectedApp.getSymbols();
+               List<FunctionInst> functionInstList = appInst.getFunctionInstList();
+
+               int size = symbols.size();
+               appInst.setFunctionCount(size);
+               for (int i = 0; i < size; i++) {
+                       AddrSymbolPair addrSymbol = symbols.get(i);
+                       FunctionInst functionInst = new FunctionInst();
+                       functionInst.setAddr(addrSymbol.getAddr());
+                       functionInst.setArgs(getFunctionArgs(addrSymbol.getSymbol()));
+                       functionInstList.add(functionInst);
+               }
+
+               appInst.setLibcount(0);
+               appInst.setLibraryInstList(null);
+               output.getAppInstList().add(appInst);
+               return output;
+       }
 
        public HostResult sendBinaryInfoMessage() {
                // send config message
@@ -232,13 +293,13 @@ public class Communicator30 extends BaseCommunicator {
                appInfo.setExecPath(selectedApp.getInfo(AppInfo.EXEC_INDEX));
 
                int length = appInfo.getByteValue().length;
-               byte[] msg = ByteUtils.concatByteArray(msgBinInfo, length,
+               byte[] msg = ByteUtils.getByte(msgBinInfo, length,
                                appInfo.getByteValue());
 
                HostResult result = handleControlMessage(
                                DACommunicator.getSelectedDevice(), msg);
 
-               if (!result.isSuccess() || isCorrectAck(MSG_BINARY_INFO_ACK, result)) {
+               if (!result.isSuccess() || !isCorrectAck(MSG_BINARY_INFO_ACK, result)) {
                        return HostResult.ERR_BIN_INFO_GET_FAIL;
                }
 
@@ -257,17 +318,15 @@ public class Communicator30 extends BaseCommunicator {
                // change binary file path of host
                File binFile = new File(binaryPath);
                if (!binFile.exists()) {
-                       SyncResult res = CommunicatorUtils.pull(targetPath,
-                                       AnalyzerPaths.TEMP_FOLDER_PATH);
+                       String name = selectedApp.getInfo(AppInfo.LABEL_INDEX);
+                       binaryPath = AnalyzerPaths.TEMP_FOLDER_PATH + File.separator + name;
+                       SyncResult res = CommunicatorUtils.pull(targetPath, binaryPath);
                        if (null != res && RESULT_OK == res.getCode()) {
                                System.out.println("binary copy success!!");//$NON-NLS-1$ 
                        } else {
                                System.out.println("Failed to get " + targetPath); //$NON-NLS-1$ 
                                return HostResult.ERR_BIN_INFO_GET_FAIL;
                        }
-                       String[] splitName = binaryPath.split(CommonConstants.SLASH);
-                       binaryPath = AnalyzerPaths.TEMP_FOLDER_PATH + File.separator
-                                       + new String(splitName[splitName.length - 1]);
                        binInfo.setPath(binaryPath);
                        selectedApp.setBinInfo(binInfo);
                        return result;
@@ -620,8 +679,47 @@ public class Communicator30 extends BaseCommunicator {
                int index = INT_SIZE;
                int size = ByteUtils.toInt(data, index);
                index += INT_SIZE * 2;
+               size -= INT_SIZE;
                byte[] payload = new byte[size];
                System.arraycopy(data, index, payload, 0, size);
                return payload;
        }
+
+       private byte[] getFunctionArgs(String symbol) {
+               int start = symbol.indexOf(CommonConstants.OPEN_BRACKET);
+               int end = symbol.indexOf(CommonConstants.CLOSE_BRACKET);
+
+               String argStr = symbol.substring(start, end).trim();
+               if (argStr.isEmpty()) {
+                       return new byte[0];
+               }
+               String[] args = argStr.split(CommonConstants.COMMA);
+               byte[] ret = new byte[args.length];
+               for (int i = 0; i < args.length; i++) {
+                       String arg = args[i];
+                       int index = arg.indexOf(CommonConstants.SPACE);
+                       arg = arg.substring(0, index - 1);
+                       ret[i] = (byte) getArgType(arg);
+               }
+
+               return ret;
+       }
+
+       private char getArgType(String input) {
+               if (input.equals("int")) {
+                       return 'd';
+               } else if (input.equals("char")) {
+                       return 'c';
+               } else if (input.equals("long")) {
+                       return 'x';
+               } else if (input.equals("float")) {
+                       return 'f';
+               } else if (input.equals("double")) {
+                       return 'w';
+               } else if (input.equals("bool")) {
+                       return 'b';
+               } else {
+                       return 'p';
+               }
+       }
 }
index 52e2286..0bdaed6 100755 (executable)
@@ -46,6 +46,7 @@ import org.tizen.dynamicanalyzer.common.AnalyzerManager;
 import org.tizen.dynamicanalyzer.common.CommonConstants;
 import org.tizen.dynamicanalyzer.communicator.CommunicatorUtils;
 import org.tizen.dynamicanalyzer.communicator.DACommunicator;
+import org.tizen.dynamicanalyzer.handlers.ReplayTraceHandler;
 import org.tizen.dynamicanalyzer.handlers.StopHandler;
 import org.tizen.dynamicanalyzer.nl.AnalyzerLabels;
 import org.tizen.dynamicanalyzer.services.RecordStateSourceProvider;
@@ -346,7 +347,8 @@ public class MessageParser {
                System.out.println("Ending steps!");
                // message = null;
                DACommunicator.setRunning(false);
-               AnalyzerUtil.setRecordState(RecordStateSourceProvider.RECORD_READY);
+               // AnalyzerUtil.setRecordState(RecordStateSourceProvider.RECORD_READY);
+               AnalyzerManager.setRunningState(false);
                Display.getDefault().syncExec(new Runnable() {
                        @Override
                        public void run() {
@@ -360,6 +362,8 @@ public class MessageParser {
                StopLogProcessor.runStopLogProcessThread();
                DACommunicator.closeSock();
                AnalyzerUtil.executeCommand(StopHandler.ID);
+               ReplayTraceHandler.isReplay = false;
+               ReplayTraceHandler.startTime = null;
        }
 
        private void processMessage(BasicDataMessage data) {
@@ -377,12 +381,12 @@ public class MessageParser {
                        // process error message
                        break;
                case DataChannelConstants.MSG_SYSTEM:
-               case DataChannelConstants.MSG_RECORD:
                case DataChannelConstants.MSG_SAMPLE:
                case DataChannelConstants.MSG_FUNCTION_ENTRY:
                case DataChannelConstants.MSG_FUNCTION_EXIT:
                case DataChannelConstants.MSG_CONTEXT_SWITCH_ENTRY:
                case DataChannelConstants.MSG_CONTEXT_SWITCH_EXIT:
+               case DataChannelConstants.MSG_RECORD:
                        // make log
                        log = LogDataFactory.createInstance(data);
                        if (null != log) {
index ecbbc68..b85e603 100755 (executable)
@@ -46,6 +46,7 @@ import org.tizen.dynamicanalyzer.swap.model.data.BasicDataMessage;
 import org.tizen.dynamicanalyzer.swap.model.probe2.LogData;
 import org.tizen.dynamicanalyzer.swap.model.probe2.ProbeCommonData;
 import org.tizen.dynamicanalyzer.swap.model.probe2.ProfileData;
+import org.tizen.dynamicanalyzer.swap.model.probe2.ReplayData;
 import org.tizen.dynamicanalyzer.swap.model.probe2.ScreenShotData;
 import org.tizen.dynamicanalyzer.swap.model.probe2.SystemData;
 import org.tizen.dynamicanalyzer.ui.page.BaseView;
@@ -210,6 +211,8 @@ public class SWAPLogParser implements Runnable {
                                                pData,
                                                FunctionUsageProfiler.getInstance()
                                                                .getProfileDataMaker());
+                       } else if (log instanceof ReplayData) {
+                               pushLog(log, msg, logPack);
                        } else {
                                if (log instanceof ScreenShotData) {
                                        String remoteImgPath = ((ScreenShotData) log)
diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/swap/model/RecordEventObject.java b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/swap/model/RecordEventObject.java
new file mode 100644 (file)
index 0000000..b2402f5
--- /dev/null
@@ -0,0 +1,49 @@
+package org.tizen.dynamicanalyzer.swap.model;
+
+public class RecordEventObject {
+       private DATime eventTime = null;
+       private int eventId = 0;
+       private int eventType = 0;
+       private int eventCode = 0;
+       private int eventValue = 0;
+
+       public int getEventId() {
+               return eventId;
+       }
+
+       public void setEventId(int eventId) {
+               this.eventId = eventId;
+       }
+
+       public int getEventType() {
+               return eventType;
+       }
+
+       public void setEventType(int eventType) {
+               this.eventType = eventType;
+       }
+
+       public int getEventCode() {
+               return eventCode;
+       }
+
+       public void setEventCode(int eventCode) {
+               this.eventCode = eventCode;
+       }
+
+       public int getEventValue() {
+               return eventValue;
+       }
+
+       public void setEventValue(int eventValue) {
+               this.eventValue = eventValue;
+       }
+
+       public DATime getEventTime() {
+               return eventTime;
+       }
+
+       public void setEventTime(DATime eventTime) {
+               this.eventTime = eventTime;
+       }
+}
index 209a0ba..8959096 100755 (executable)
@@ -1,76 +1,78 @@
 package org.tizen.dynamicanalyzer.swap.model.control;
 
+import java.util.ArrayList;
 import java.util.List;
 
 import org.tizen.dynamicanalyzer.swap.model.ByteUtils;
 import org.tizen.dynamicanalyzer.swap.model.SWAPModel;
 
 public class ApplicationInst implements SWAPModel {
-       // path of binary
-       private String path = null;
+       private int applicationType = 0;
+       private String applicationId = null;
+       private String executablePath = null;
+       private int functionCount = 0;
+       private List<FunctionInst> functionInstList = new ArrayList<FunctionInst>();
+       private int libcount = 0;
+       private List<LibraryInst> libraryInstList = new ArrayList<LibraryInst>();
 
-       // count of functions
-       private int funcCount = 0;
-
-       // FunctionInst list
-       private List<FunctionInst> funcInstList = null;
-
-       // count of library
-       private int libCount = 0;
-
-       // LibararyInst list
-       private List<LibraryInst> libInstList = null;
+       @Override
+       public byte[] getByteValue() {
+               return ByteUtils.getByte(applicationType, applicationId,
+                               executablePath, functionCount, functionInstList, libcount,
+                               libraryInstList);
+       }
 
-       public String getPath() {
-               return path;
+       @Override
+       public void setByteToValues(byte[] input) {
+               // TODO Auto-generated method stub
        }
 
-       public void setPath(String path) {
-               this.path = path;
+       public int getApplicationType() {
+               return applicationType;
        }
 
-       public int getFuncCount() {
-               return funcCount;
+       public void setApplicationType(int applicationType) {
+               this.applicationType = applicationType;
        }
 
-       public void setFuncCount(int funcCount) {
-               this.funcCount = funcCount;
+       public String getApplicationId() {
+               return applicationId;
        }
 
-       public List<FunctionInst> getFuncInstList() {
-               return funcInstList;
+       public void setApplicationId(String applicationId) {
+               this.applicationId = applicationId;
        }
 
-       public void setFuncInstList(List<FunctionInst> funcInstList) {
-               this.funcInstList = funcInstList;
+       public String getExecutablePath() {
+               return executablePath;
        }
 
-       public int getLibCount() {
-               return libCount;
+       public void setExecutablePath(String executablePath) {
+               this.executablePath = executablePath;
        }
 
-       public void setLibCount(int libCount) {
-               this.libCount = libCount;
+       public int getFunctionCount() {
+               return functionCount;
        }
 
-       public List<LibraryInst> getLibInstList() {
-               return libInstList;
+       public void setFunctionCount(int functionCount) {
+               this.functionCount = functionCount;
        }
 
-       public void setLibInstList(List<LibraryInst> libInstList) {
-               this.libInstList = libInstList;
+       public List<FunctionInst> getFunctionInstList() {
+               return functionInstList;
        }
 
-       @Override
-       public byte[] getByteValue() {
-               return ByteUtils.getByte(path, funcCount, funcInstList, libCount,
-                               libInstList);
+       public int getLibcount() {
+               return libcount;
        }
 
-       @Override
-       public void setByteToValues(byte[] input) {
-               // TODO Auto-generated method stub
+       public void setLibcount(int libcount) {
+               this.libcount = libcount;
+       }
 
+       public void setLibraryInstList(List<LibraryInst> libraryInstList) {
+               this.libraryInstList = libraryInstList;
        }
 
 }
index f46a286..5d31594 100755 (executable)
@@ -4,14 +4,8 @@ import org.tizen.dynamicanalyzer.swap.model.ByteUtils;
 import org.tizen.dynamicanalyzer.swap.model.SWAPModel;
 
 public class FunctionInst implements SWAPModel {
-       // function address
        private long addr = 0;
-
-       // count of args
-       private int argCount = 0;
-
-       // args
-       private String args = null;
+       private byte[] args = null;
 
        public long getAddr() {
                return addr;
@@ -21,25 +15,17 @@ public class FunctionInst implements SWAPModel {
                this.addr = addr;
        }
 
-       public int getArgCount() {
-               return argCount;
-       }
-
-       public void setArgCount(int argCount) {
-               this.argCount = argCount;
-       }
-
-       public String getArgs() {
+       public byte[] getArgs() {
                return args;
        }
 
-       public void setArgs(String args) {
+       public void setArgs(byte[] args) {
                this.args = args;
        }
 
        @Override
        public byte[] getByteValue() {
-               return ByteUtils.getByte(addr, argCount, args);
+               return ByteUtils.getByte(addr, args);
        }
 
        @Override
index fb62a94..6abb346 100755 (executable)
@@ -1,5 +1,6 @@
 package org.tizen.dynamicanalyzer.swap.model.control;
 
+import java.util.ArrayList;
 import java.util.List;
 
 import org.tizen.dynamicanalyzer.swap.model.ByteUtils;
@@ -10,6 +11,9 @@ public class UserSpaceInst implements SWAPModel {
        private int count = 0;
        private List<ApplicationInst> appInstList = null;
 
+       public UserSpaceInst() {
+                appInstList = new ArrayList<ApplicationInst>();
+       }
        public int getCount() {
                return count;
        }
@@ -22,10 +26,6 @@ public class UserSpaceInst implements SWAPModel {
                return appInstList;
        }
 
-       public void setAppInstList(List<ApplicationInst> appInstList) {
-               this.appInstList = appInstList;
-       }
-
        @Override
        public byte[] getByteValue() {
                return ByteUtils.getByte(count, appInstList);
index 71fc3ca..6668514 100644 (file)
@@ -1,6 +1,6 @@
 package org.tizen.dynamicanalyzer.swap.model.probe2;
 
-import static org.tizen.dynamicanalyzer.common.AnalyzerConstants.MSG_CONTEXT_SWITCH_ENTRY;
+import static org.tizen.dynamicanalyzer.common.AnalyzerConstants.*;
 import static org.tizen.dynamicanalyzer.common.AnalyzerConstants.MSG_CONTEXT_SWITCH_EXIT;
 import static org.tizen.dynamicanalyzer.common.AnalyzerConstants.MSG_DATA_SAMPLE;
 import static org.tizen.dynamicanalyzer.common.AnalyzerConstants.MSG_DATA_SYSTEM;
@@ -24,6 +24,8 @@ import org.tizen.dynamicanalyzer.common.CommonConstants;
 import org.tizen.dynamicanalyzer.communicator.DACommunicator;
 import org.tizen.dynamicanalyzer.logparser.LogCenterConstants;
 import org.tizen.dynamicanalyzer.swap.model.ByteUtils;
+import org.tizen.dynamicanalyzer.swap.model.DATime;
+import org.tizen.dynamicanalyzer.swap.model.RecordEventObject;
 import org.tizen.dynamicanalyzer.swap.model.data.ApiNameManager;
 
 public class DataFactory {
@@ -81,7 +83,9 @@ public class DataFactory {
                case MSG_FUNCTION_EXIT:
                        createProfileData(data, paylaod);
                        break;
-
+               case MSG_RECORD:
+                       createRecordData(data, paylaod);
+                       break;
                case LogCenterConstants.LOG_USER_FUNCTION:
                        createUserFunctionData(data, paylaod);
                        break;
@@ -91,7 +95,8 @@ public class DataFactory {
        }
 
        private static void createCommonData(LogData data, byte[] payload) {
-//             System.out.println("Create common data method - log seq " + data.getSeq());
+               // System.out.println("Create common data method - log seq " +
+               // data.getSeq());
                ProbeCommonData probeData = ((ProbeCommonData) data);
                int apiId = ByteUtils.toInt(payload, index);
                index += INT_SIZE;
@@ -104,8 +109,8 @@ public class DataFactory {
                index = argInfo.getLastIndex();
                long ret = ByteUtils.toLong(payload, index);
                index += LONG_SIZE;
-//             long errno = ByteUtils.toLong(payload, index);
-//             index += LONG_SIZE;
+               // long errno = ByteUtils.toLong(payload, index);
+               // index += LONG_SIZE;
                int errno = ByteUtils.toInt(payload, index);
                index += INT_SIZE;
                int internalCall = ByteUtils.toInt(payload, index);
@@ -127,7 +132,7 @@ public class DataFactory {
                probeData.setCallerAddress(callerAddress);
                probeData.setReserved1(reserved1);
                probeData.setReserved2(reserved2);
-               
+
                probeData.setApiName(ApiNameManager.getApiName(apiId));
        }
 
@@ -199,16 +204,16 @@ public class DataFactory {
                index += INT_SIZE;
                int y = ByteUtils.toInt(payload, index);
                index += INT_SIZE;
-               int info1 = ByteUtils.toInt(payload, index);
-               index += INT_SIZE;
-//             int info2 = ByteUtils.toInt(payload, index);
+               String info1 = ByteUtils.getString(payload, index);
+               index += ByteUtils.getStringLength(payload, index);
+               int info2 = ByteUtils.toInt(payload, index);
 
                data.setEventType(eventType);
                data.setDetailType(detailType);
                data.setX(x);
                data.setY(y);
                data.setInfo1(info1);
-//             data.setInfo2(info2);
+               data.setInfo2(info2);
                data.setInfo2(0);
        }
 
@@ -443,19 +448,19 @@ public class DataFactory {
                int processCount = ByteUtils.toInt(payload, index);
                index += INT_SIZE;
 
-               String processLoad = parseLoad(index, payload);
-               index += (processCount * (INT_SIZE + FLOAT_SIZE));
-
-               int diskReadSize = ByteUtils.toInt(payload, index);
-               index += INT_SIZE;
-
-               int diskWriteSize = ByteUtils.toInt(payload, index);
-               index += INT_SIZE;
-
-               int networkSendSize = ByteUtils.toInt(payload, index);
-               index += INT_SIZE;
-
-               int networkReceiveSize = ByteUtils.toInt(payload, index);
+               // String processLoad = parseLoad(index, payload);
+               // index += (processCount * (INT_SIZE + FLOAT_SIZE));
+               //
+               // int diskReadSize = ByteUtils.toInt(payload, index);
+               // index += INT_SIZE;
+               //
+               // int diskWriteSize = ByteUtils.toInt(payload, index);
+               // index += INT_SIZE;
+               //
+               // int networkSendSize = ByteUtils.toInt(payload, index);
+               // index += INT_SIZE;
+               //
+               // int networkReceiveSize = ByteUtils.toInt(payload, index);
 
                data.setEnergy(energy);
                data.setWifi(wifi);
@@ -485,11 +490,11 @@ public class DataFactory {
                data.setThreadCount(threadCount);
                data.setThreadLoad(threadLoad);
                data.setProcessCount(processCount);
-               data.setProcessLoad(processLoad);
-               data.setDiskReadSize(diskReadSize);
-               data.setDiskWriteSize(diskWriteSize);
-               data.setNetworkSendSize(networkSendSize);
-               data.setNetworkReceiveSize(networkReceiveSize);
+               // data.setProcessLoad(processLoad);
+               // data.setDiskReadSize(diskReadSize);
+               // data.setDiskWriteSize(diskWriteSize);
+               // data.setNetworkSendSize(networkSendSize);
+               // data.setNetworkReceiveSize(networkReceiveSize);
        }
 
        private static void createProfileData(LogData log, byte[] payload) {
@@ -582,6 +587,46 @@ public class DataFactory {
                }
        }
 
+       private static void createRecordData(LogData log, byte[] payload) {
+               ReplayData data = (ReplayData) log;
+
+               int count = ByteUtils.toInt(payload, index);
+               index += INT_SIZE;
+               data.setObjectCount(count);
+
+               for (int i = 0; i < count; i++) {
+                       RecordEventObject recordObj = new RecordEventObject();
+                       // event time
+                       int sec = ByteUtils.toInt(payload, index);
+                       index += INT_SIZE;
+                       int nano = ByteUtils.toInt(payload, index);
+                       index += INT_SIZE;
+                       DATime time = new DATime();
+                       time.setSec(sec);
+                       time.setNano(nano);
+                       recordObj.setEventTime(time);
+
+                       // event id
+                       int value = ByteUtils.toInt(payload, index);
+                       recordObj.setEventId(value);
+                       index += INT_SIZE;
+
+                       // event type
+                       value = ByteUtils.toInt(payload, index);
+                       recordObj.setEventType(value);
+                       index += INT_SIZE;
+
+                       // eventy code
+                       value = ByteUtils.toInt(payload, index);
+                       recordObj.setEventCode(value);
+                       index += INT_SIZE;
+
+                       value = ByteUtils.toInt(payload, index);
+                       recordObj.setEventValue(value);
+                       data.getRecordEvent().add(recordObj);
+               }
+       }
+
        private static void createUserFunctionData(LogData log, byte[] payload) {
                createCommonData(log, payload);
                UserFunctionData data = (UserFunctionData) log;
index 82b3bb9..603c8d2 100644 (file)
@@ -3,7 +3,7 @@ package org.tizen.dynamicanalyzer.swap.model.probe2;
 import java.util.ArrayList;
 import java.util.List;
 
-import org.tizen.dynamicanalyzer.common.AnalyzerConstants;
+import static org.tizen.dynamicanalyzer.common.AnalyzerConstants.*;
 import org.tizen.dynamicanalyzer.logparser.LogCenterConstants;
 import org.tizen.dynamicanalyzer.swap.model.data.BasicDataMessage;
 
@@ -22,6 +22,7 @@ public class LogDataFactory {
        private static int syncLogNum = 0;
        private static int sampleLogNum = 0;
        private static int systemLogNum = 0;
+       private static int recordLogNum = 0;
        private static int userFunctionLogNum = 0;
 
        private LogDataFactory() {
@@ -37,19 +38,20 @@ public class LogDataFactory {
 
        public static void initLogList() {
                logList.clear();
-               logList.add(AnalyzerConstants.MSG_PROBE_MEMORY);
-               logList.add(AnalyzerConstants.MSG_PROBE_UICONTROL);
-               logList.add(AnalyzerConstants.MSG_PROBE_UIEVENT);
-               logList.add(AnalyzerConstants.MSG_PROBE_FILE);
-               logList.add(AnalyzerConstants.MSG_PROBE_LIFECYCLE);
-               logList.add(AnalyzerConstants.MSG_PROBE_SCREENSHOT);
-               logList.add(AnalyzerConstants.MSG_PROBE_SCENE);
-               logList.add(AnalyzerConstants.MSG_PROBE_THREAD);
-               logList.add(AnalyzerConstants.MSG_PROBE_CUSTOM);
-               logList.add(AnalyzerConstants.MSG_PROBE_SYNC);
-               logList.add(AnalyzerConstants.MSG_DATA_SAMPLE);
-               logList.add(AnalyzerConstants.MSG_DATA_SYSTEM);
+               logList.add(MSG_PROBE_MEMORY);
+               logList.add(MSG_PROBE_UICONTROL);
+               logList.add(MSG_PROBE_UIEVENT);
+               logList.add(MSG_PROBE_FILE);
+               logList.add(MSG_PROBE_LIFECYCLE);
+               logList.add(MSG_PROBE_SCREENSHOT);
+               logList.add(MSG_PROBE_SCENE);
+               logList.add(MSG_PROBE_THREAD);
+               logList.add(MSG_PROBE_CUSTOM);
+               logList.add(MSG_PROBE_SYNC);
+               logList.add(MSG_DATA_SAMPLE);
+               logList.add(MSG_DATA_SYSTEM);
                logList.add(LogCenterConstants.LOG_USER_FUNCTION);
+               logList.add(MSG_RECORD);
        }
 
        public static LogData createInstance(BasicDataMessage input) {
@@ -57,52 +59,42 @@ public class LogDataFactory {
                byte[] payload = input.getPayload();
                LogData output = null;
                switch (id) {
-               case AnalyzerConstants.MSG_PROBE_MEMORY:
-               case LogCenterConstants.LOG_MEMORY:
+               case MSG_PROBE_MEMORY:
                        // memory
                        output = new MemoryData(input);
                        break;
-               case AnalyzerConstants.MSG_PROBE_UICONTROL:
-               case LogCenterConstants.LOG_CONTROL:
+               case MSG_PROBE_UICONTROL:
                        // ui control
                        output = new ControlData(input);
                        break;
-               case AnalyzerConstants.MSG_PROBE_UIEVENT:
-               case LogCenterConstants.LOG_UI_EVENT:
+               case MSG_PROBE_UIEVENT:
                        output = new UIEventData(input);
                        break;
-               case AnalyzerConstants.MSG_PROBE_FILE:
-               case LogCenterConstants.LOG_RESOURCE:
+               case MSG_PROBE_FILE:
                        // file
                        output = new FileData(input);
                        break;
-               case AnalyzerConstants.MSG_PROBE_LIFECYCLE:
-               case LogCenterConstants.LOG_LIFECYCLE:
+               case MSG_PROBE_LIFECYCLE:
                        // life cycle
                        output = new LifeCycleData(input);
                        break;
-               case AnalyzerConstants.MSG_PROBE_SCREENSHOT:
-               case LogCenterConstants.LOG_SCREENSHOT:
+               case MSG_PROBE_SCREENSHOT:
                        // screenshot
                        output = new ScreenShotData(input);
                        break;
-               case AnalyzerConstants.MSG_PROBE_SCENE:
-               case LogCenterConstants.LOG_SCENE:
+               case MSG_PROBE_SCENE:
                        // scene
                        output = new SceneData(input);
                        break;
-               case AnalyzerConstants.MSG_PROBE_THREAD:
-               case LogCenterConstants.LOG_THREAD:
+               case MSG_PROBE_THREAD:
                        // thread
                        output = new ThreadData(input);
                        break;
-               case AnalyzerConstants.MSG_PROBE_CUSTOM:
-               case LogCenterConstants.LOG_CUSTOM_CHART:
+               case MSG_PROBE_CUSTOM:
                        // custom
                        output = new CustomData(input);
                        break;
-               case AnalyzerConstants.MSG_PROBE_SYNC:
-               case LogCenterConstants.LOG_SYNC:
+               case MSG_PROBE_SYNC:
                        // sync
                        output = new SyncData(input);
                        break;
@@ -110,17 +102,19 @@ public class LogDataFactory {
                        // user fucntion entry/exit
                        output = new UserFunctionData(input);
                        break;
-               case AnalyzerConstants.MSG_DATA_SAMPLE:
-               case LogCenterConstants.LOG_PROFILING:
+               case MSG_DATA_SAMPLE:
                        // profiling sample log
                        output = new ProfileData(input);
                        ((ProfileData) output).setCallstack(input.getCallstack());
                        break;
-               case AnalyzerConstants.MSG_DATA_SYSTEM:
-               case LogCenterConstants.LOG_DEVICE:
+               case MSG_DATA_SYSTEM:
                        // system log
                        output = new SystemData(input);
                        break;
+               case MSG_RECORD:
+                       // replay log
+                       output = new ReplayData(input);
+                       break;
                default:
                        return null;
                }
@@ -131,71 +125,55 @@ public class LogDataFactory {
        public static String getTableNamebyId(int id) {
                String name = null;
                switch (id) {
-               case AnalyzerConstants.MSG_PROBE_MEMORY:
-               case LogCenterConstants.LOG_MEMORY:
-                       // memory
+               case MSG_PROBE_MEMORY:
                        name = "memory";
                        break;
-               case AnalyzerConstants.MSG_PROBE_UICONTROL:
-               case LogCenterConstants.LOG_CONTROL:
-                       // ui control
+               case MSG_PROBE_UICONTROL:
                        name = "control";
                        break;
-               case AnalyzerConstants.MSG_PROBE_UIEVENT:
-               case LogCenterConstants.LOG_UI_EVENT:
+               case MSG_PROBE_UIEVENT:
                        name = "uievent";
                        break;
-               case AnalyzerConstants.MSG_PROBE_FILE:
-               case LogCenterConstants.LOG_RESOURCE:
-                       // file
+               case MSG_PROBE_FILE:
                        name = "file";
                        break;
-               case AnalyzerConstants.MSG_PROBE_LIFECYCLE:
-               case LogCenterConstants.LOG_LIFECYCLE:
-                       // life cycle
+               case MSG_PROBE_LIFECYCLE:
                        name = "lifecycle";
                        break;
-               case AnalyzerConstants.MSG_PROBE_SCREENSHOT:
-               case LogCenterConstants.LOG_SCREENSHOT:
-                       // screenshot
+               case MSG_PROBE_SCREENSHOT:
                        name = "screenshot";
                        break;
-               case AnalyzerConstants.MSG_PROBE_SCENE:
-               case LogCenterConstants.LOG_SCENE:
-                       // scene
+               case MSG_PROBE_SCENE:
                        name = "scene";
                        break;
-               case AnalyzerConstants.MSG_PROBE_THREAD:
-               case LogCenterConstants.LOG_THREAD:
-                       // thread
+               case MSG_PROBE_THREAD:
                        name = "thread";
                        break;
-               case AnalyzerConstants.MSG_PROBE_CUSTOM:
-               case LogCenterConstants.LOG_CUSTOM_CHART:
-                       // custom
+               case MSG_PROBE_CUSTOM:
                        name = "custom";
                        break;
-               case AnalyzerConstants.MSG_PROBE_SYNC:
-               case LogCenterConstants.LOG_SYNC:
-                       // sync
+               case MSG_PROBE_SYNC:
                        name = "sync";
                        break;
                case LogCenterConstants.LOG_USER_FUNCTION:
                        // user fucntion entry/exit
                        name = "user_function";
                        break;
-               case AnalyzerConstants.MSG_DATA_SAMPLE:
-               case LogCenterConstants.LOG_PROFILING:
+               case MSG_DATA_SAMPLE:
                        // profiling sample log
+                       // function enter/exit
+                       // context enstr/exit
                        name = "profiling";
                        break;
-               case AnalyzerConstants.MSG_DATA_SYSTEM:
-               case LogCenterConstants.LOG_DEVICE:
+               case MSG_DATA_SYSTEM:
                        // system log
                        name = "system";
                        break;
+               case MSG_RECORD:
+                       name = "replay";
+                       break;
                default:
-
+                       break;
                }
                return name;
        }
@@ -203,51 +181,51 @@ public class LogDataFactory {
        public static int getLogColumnCountbyId(int id) {
                int count = 0;
                switch (id) {
-               case AnalyzerConstants.MSG_PROBE_MEMORY:
+               case MSG_PROBE_MEMORY:
                case LogCenterConstants.LOG_MEMORY:
                        // memory
                        count = 16;
                        break;
-               case AnalyzerConstants.MSG_PROBE_UICONTROL:
+               case MSG_PROBE_UICONTROL:
                case LogCenterConstants.LOG_CONTROL:
                        // ui control
                        count = 19;
                        break;
-               case AnalyzerConstants.MSG_PROBE_UIEVENT:
+               case MSG_PROBE_UIEVENT:
                case LogCenterConstants.LOG_UI_EVENT:
                        count = 19;
                        break;
-               case AnalyzerConstants.MSG_PROBE_FILE:
+               case MSG_PROBE_FILE:
                case LogCenterConstants.LOG_RESOURCE:
                        // file
                        count = 19;
                        break;
-               case AnalyzerConstants.MSG_PROBE_LIFECYCLE:
+               case MSG_PROBE_LIFECYCLE:
                case LogCenterConstants.LOG_LIFECYCLE:
                        // life cycle
                        count = 12;
                        break;
-               case AnalyzerConstants.MSG_PROBE_SCREENSHOT:
+               case MSG_PROBE_SCREENSHOT:
                case LogCenterConstants.LOG_SCREENSHOT:
                        // screenshot
                        count = 15;
                        break;
-               case AnalyzerConstants.MSG_PROBE_SCENE:
+               case MSG_PROBE_SCENE:
                case LogCenterConstants.LOG_SCENE:
                        // scene
                        count = 20;
                        break;
-               case AnalyzerConstants.MSG_PROBE_THREAD:
+               case MSG_PROBE_THREAD:
                case LogCenterConstants.LOG_THREAD:
                        // thread
                        count = 17;
                        break;
-               case AnalyzerConstants.MSG_PROBE_CUSTOM:
+               case MSG_PROBE_CUSTOM:
                case LogCenterConstants.LOG_CUSTOM_CHART:
                        // custom
                        count = 18;
                        break;
-               case AnalyzerConstants.MSG_PROBE_SYNC:
+               case MSG_PROBE_SYNC:
                case LogCenterConstants.LOG_SYNC:
                        // sync
                        count = 16;
@@ -256,12 +234,12 @@ public class LogDataFactory {
                        // user fucntion entry/exit
                        count = 17;
                        break;
-               case AnalyzerConstants.MSG_DATA_SAMPLE:
+               case MSG_DATA_SAMPLE:
                case LogCenterConstants.LOG_PROFILING:
                        // profiling sample log
                        count = 4;
                        break;
-               case AnalyzerConstants.MSG_DATA_SYSTEM:
+               case MSG_DATA_SYSTEM:
                case LogCenterConstants.LOG_DEVICE:
                        // system log
                        count = 35;
@@ -274,36 +252,38 @@ public class LogDataFactory {
 
        public static int getLogCountById(int id) {
                switch (id) {
-               case AnalyzerConstants.MSG_PROBE_MEMORY:
+               case MSG_PROBE_MEMORY:
                        // memory
                        return memoryLogNum++;
-               case AnalyzerConstants.MSG_PROBE_UICONTROL:
+               case MSG_PROBE_UICONTROL:
                        // ui control
                        return controlLogNum++;
-               case AnalyzerConstants.MSG_PROBE_UIEVENT:
+               case MSG_PROBE_UIEVENT:
                        return uiEventLogNum++;
-               case AnalyzerConstants.MSG_PROBE_FILE:
+               case MSG_PROBE_FILE:
                        return fileLogNum++;
-               case AnalyzerConstants.MSG_PROBE_LIFECYCLE:
+               case MSG_PROBE_LIFECYCLE:
                        return lifecycleLogNum++;
-               case AnalyzerConstants.MSG_PROBE_SCREENSHOT:
+               case MSG_PROBE_SCREENSHOT:
                        return screenshotLogNum++;
-               case AnalyzerConstants.MSG_PROBE_SCENE:
+               case MSG_PROBE_SCENE:
                        return sceneLogNum++;
-               case AnalyzerConstants.MSG_PROBE_THREAD:
+               case MSG_PROBE_THREAD:
                        return threadLogNum++;
-               case AnalyzerConstants.MSG_PROBE_CUSTOM:
+               case MSG_PROBE_CUSTOM:
                        return customLogNum++;
-               case AnalyzerConstants.MSG_PROBE_SYNC:
+               case MSG_PROBE_SYNC:
                        return syncLogNum++;
                case LogCenterConstants.LOG_USER_FUNCTION:
                        return userFunctionLogNum++;
-               case AnalyzerConstants.MSG_DATA_SAMPLE:
+               case MSG_DATA_SAMPLE:
                        return sampleLogNum++;
-               case AnalyzerConstants.MSG_DATA_SYSTEM:
+               case MSG_DATA_SYSTEM:
                        return systemLogNum++;
+               case MSG_RECORD:
+                       return recordLogNum++;
                default:
-
+                       break;
                }
                return 0;
        }
diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/swap/model/probe2/ReplayData.java b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/swap/model/probe2/ReplayData.java
new file mode 100644 (file)
index 0000000..f097c2a
--- /dev/null
@@ -0,0 +1,29 @@
+package org.tizen.dynamicanalyzer.swap.model.probe2;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.tizen.dynamicanalyzer.swap.model.RecordEventObject;
+import org.tizen.dynamicanalyzer.swap.model.data.BasicDataMessage;
+
+public class ReplayData extends LogData {
+
+       private int objectCount = 0;
+       private List<RecordEventObject> recordEvent = new ArrayList<RecordEventObject>();
+
+       public ReplayData(BasicDataMessage data) {
+               super(data);
+       }
+
+       public int getObjectCount() {
+               return objectCount;
+       }
+
+       public void setObjectCount(int objectCount) {
+               this.objectCount = objectCount;
+       }
+
+       public List<RecordEventObject> getRecordEvent() {
+               return recordEvent;
+       }
+}
index 59bd9ca..9dc8df6 100644 (file)
@@ -8,7 +8,7 @@ public class UIEventData extends ProbeCommonData {
        int detailType = 0;
        int x = 0;
        int y = 0;
-       int info1 = 0;
+       String info1 = null;
        int info2 = 0;
 
        public int getEventType() {
@@ -43,11 +43,11 @@ public class UIEventData extends ProbeCommonData {
                this.y = y;
        }
 
-       public int getInfo1() {
+       public String getInfo1() {
                return info1;
        }
 
-       public void setInfo1(int info1) {
+       public void setInfo1(String info1) {
                this.info1 = info1;
        }
 
index c0c8bdd..37660ba 100644 (file)
@@ -30,15 +30,14 @@ package org.tizen.dynamicanalyzer.ui.file;
 import java.util.ArrayList;
 import java.util.List;
 
+import org.tizen.dynamicanalyzer.common.AnalyzerManager;
 import org.tizen.dynamicanalyzer.common.CommonConstants;
 import org.tizen.dynamicanalyzer.logparser.LogCenterConstants;
 import org.tizen.dynamicanalyzer.nl.AnalyzerLabels;
 import org.tizen.dynamicanalyzer.nl.FilePageLabels;
 import org.tizen.dynamicanalyzer.resources.ColorResources;
-import org.tizen.dynamicanalyzer.services.RecordStateSourceProvider;
 import org.tizen.dynamicanalyzer.swap.model.probe2.FailedData2;
 import org.tizen.dynamicanalyzer.ui.timeline.common.TimelineConstants;
-import org.tizen.dynamicanalyzer.utils.AnalyzerUtil;
 import org.tizen.dynamicanalyzer.widgets.chart.DAChart;
 import org.tizen.dynamicanalyzer.widgets.chart.DAChartSeries;
 import org.tizen.dynamicanalyzer.widgets.chart.DAChartSeriesItem;
@@ -293,9 +292,7 @@ public class FileChartData {
        }
 
        public void checkUpdate() {
-               if (false == hasUpdate
-                               && AnalyzerUtil.getRecordState().equals(
-                                               RecordStateSourceProvider.RECORD_RECORDING)) {
+               if (false == hasUpdate && AnalyzerManager.isRunning()) {
                        return;
                } else {
                        hasUpdate = false;
@@ -323,8 +320,7 @@ public class FileChartData {
                        }
                }
 
-               if (AnalyzerUtil.getRecordState().equals(
-                               RecordStateSourceProvider.RECORD_READY)) {
+               if (!AnalyzerManager.isRunning()) {
                        if (isParent() && (event == null)) {
                                for (int i = 0; i < size; i++) {
                                        if ((!children.get(i).isClosed(null))
index a80f557..e4fb321 100644 (file)
@@ -41,7 +41,6 @@ import org.tizen.dynamicanalyzer.nl.TimelineChartLabels;
 import org.tizen.dynamicanalyzer.resources.ColorResources;
 import org.tizen.dynamicanalyzer.resources.FontResources;
 import org.tizen.dynamicanalyzer.resources.ImageResources;
-import org.tizen.dynamicanalyzer.services.RecordStateSourceProvider;
 import org.tizen.dynamicanalyzer.swap.model.probe2.FailedData2;
 import org.tizen.dynamicanalyzer.swap.model.probe2.FileData;
 import org.tizen.dynamicanalyzer.swap.model.probe2.LogData;
@@ -392,8 +391,7 @@ public class FileDataMaker {
        }
 
        public void checkUpdate() {
-               if (AnalyzerUtil.getRecordState().equals(
-                               RecordStateSourceProvider.RECORD_READY)) {
+               if (!AnalyzerManager.isRunning()) {
                        int size = rows.size();
                        FileChartData data;
                        for (int i = 0; i < size; i++) {
index e11f129..394454a 100644 (file)
@@ -30,7 +30,6 @@ import java.util.List;
 
 import org.tizen.dynamicanalyzer.common.AnalyzerConstants;
 import org.tizen.dynamicanalyzer.common.CommonConstants;
-import org.tizen.dynamicanalyzer.logparser.LogCenterConstants;
 import org.tizen.dynamicanalyzer.nl.TimelineChartLabels;
 import org.tizen.dynamicanalyzer.resources.ColorResources;
 import org.tizen.dynamicanalyzer.resources.FontResources;
@@ -173,7 +172,7 @@ public class UIEventChart extends TimelineChart {
                                                getGestureInfo(detailType, log)));
                                break;
                        case TYPE_ORIENTATION:
-                               int status = log.getInfo1();
+                               int status = Integer.parseInt(log.getInfo1());
                                orientationEventSeries.addSeriesItem(new DAChartSeriesItem(
                                                time, 0, TimelineChartLabels.UIEVENT_ORIENTATION
                                                                + "   "//$NON-NLS-1$
index f5e03a0..f2f17e8 100644 (file)
@@ -29,6 +29,7 @@ package org.tizen.dynamicanalyzer.ui.toolbar;
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.widgets.Display;
 import org.eclipse.swt.widgets.Shell;
+import org.tizen.dynamicanalyzer.common.AnalyzerManager;
 import org.tizen.dynamicanalyzer.nl.AnalyzerLabels;
 import org.tizen.dynamicanalyzer.services.RecordStateSourceProvider;
 import org.tizen.dynamicanalyzer.shortcut.ShortCutManager;
@@ -55,7 +56,8 @@ public class StopProcessManager {
                        return;
                }
                state = STOP_PROCESS_START;
-               AnalyzerUtil.setRecordState(RecordStateSourceProvider.RECORD_READY);
+//             AnalyzerUtil.setRecordState(RecordStateSourceProvider.RECORD_READY);
+               AnalyzerManager.setRunningState(false);
                Shell shell = AnalyzerUtil.getWorkbenchWindow().getShell();
                dialog = new ProgressDialog(shell, SWT.APPLICATION_MODAL);
                if (null != dialog) {
index f9bf93d..1cd6a3e 100755 (executable)
@@ -58,7 +58,6 @@ import org.tizen.dynamicanalyzer.project.Project;
 import org.tizen.dynamicanalyzer.resources.ColorResources;
 import org.tizen.dynamicanalyzer.resources.FontResources;
 import org.tizen.dynamicanalyzer.resources.ImageResources;
-import org.tizen.dynamicanalyzer.services.RecordStateSourceProvider;
 import org.tizen.dynamicanalyzer.shortcut.ShortCutManager;
 import org.tizen.dynamicanalyzer.ui.timeline.TimelinePage;
 import org.tizen.dynamicanalyzer.ui.toolbar.configuration.ConfigurationDialog;
@@ -297,8 +296,9 @@ public class ToolbarArea {
                                        }
 
                                        if (null != DACommunicator.getSelectedDevice()) {
-                                               AnalyzerUtil
-                                                               .setRecordState(RecordStateSourceProvider.RECORD_READY);
+//                                             AnalyzerUtil
+//                                                             .setRecordState(RecordStateSourceProvider.RECORD_READY);
+                                               AnalyzerManager.setRunningState(false);
                                                startButton.setButtonEnabled(true);
                                                setRepalyButtonEnable(true);
                                        }
@@ -494,15 +494,17 @@ public class ToolbarArea {
                        return;
                }
                AnalyzerUtil.changePage(TimelinePage.ID);
-               AnalyzerUtil.setRecordState(RecordStateSourceProvider.RECORD_RECORDING);
-               RecordStartStopThread.runStartStopThread();
+//             AnalyzerUtil.setRecordState(RecordStateSourceProvider.RECORD_RECORDING);
+               AnalyzerManager.setRunningState(true);
+               TraceStartStopThread.runStartStopThread();
        }
 
        public void stopTrace() {
                ShortCutManager.getInstance().setEnabled(false);
                AnalyzerManager.getProject().setStopTime(getTime());
-               AnalyzerUtil.setRecordState(RecordStateSourceProvider.RECORD_READY);
-               RecordStartStopThread.runStartStopThread();
+//             AnalyzerUtil.setRecordState(RecordStateSourceProvider.RECORD_READY);
+               AnalyzerManager.setRunningState(false);
+               TraceStartStopThread.runStartStopThread();
        }
 
        private void createToolbar(Composite parent) {
 
 package org.tizen.dynamicanalyzer.ui.toolbar;
 
+import static org.tizen.dynamicanalyzer.common.AnalyzerConstants.*;
+
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.widgets.Display;
 import org.eclipse.swt.widgets.Shell;
-import org.tizen.dynamicanalyzer.common.AnalyzerConstants;
 import org.tizen.dynamicanalyzer.common.AnalyzerManager;
 import org.tizen.dynamicanalyzer.common.HostResult;
 import org.tizen.dynamicanalyzer.communicator.DACommunicator;
 import org.tizen.dynamicanalyzer.handlers.ReplayTraceHandler;
 import org.tizen.dynamicanalyzer.nl.AnalyzerLabels;
 import org.tizen.dynamicanalyzer.resources.ImageResources;
-import org.tizen.dynamicanalyzer.services.RecordStateSourceProvider;
 import org.tizen.dynamicanalyzer.shortcut.ShortCutManager;
 import org.tizen.dynamicanalyzer.ui.widgets.DADialog;
 import org.tizen.dynamicanalyzer.utils.AnalyzerUtil;
 
-public class RecordStartStopThread implements Runnable {
+public class TraceStartStopThread implements Runnable {
        private static Thread startStopThread = null;
        private static int count = 0;
 
        public static void runStartStopThread() {
                if (count == 0) {
                        count++;
-                       startStopThread = new Thread(null, new RecordStartStopThread(),
-                                       AnalyzerConstants.START_STOP_THREAD);
+                       startStopThread = new Thread(null, new TraceStartStopThread(),
+                                       START_STOP_THREAD);
                        startStopThread.start();
                }
        }
@@ -77,8 +77,9 @@ public class RecordStartStopThread implements Runnable {
                                });
                                ShortCutManager.getInstance().setEnabled(true);
                        } else {
-                               AnalyzerUtil
-                                               .setRecordState(RecordStateSourceProvider.RECORD_READY);
+                               // AnalyzerUtil
+                               // .setRecordState(RecordStateSourceProvider.RECORD_READY);
+                               AnalyzerManager.setRunningState(false);
                                final String msg = isStarted.toString();
                                Display.getDefault().syncExec(new Runnable() {
                                        @Override
@@ -124,7 +125,8 @@ public class RecordStartStopThread implements Runnable {
        }
 
        private void recordStop() {
-               AnalyzerUtil.setRecordState(RecordStateSourceProvider.RECORD_READY);
+               // AnalyzerUtil.setRecordState(RecordStateSourceProvider.RECORD_READY);
+               AnalyzerManager.setRunningState(false);
                Display.getDefault().syncExec(new Runnable() {
                        @Override
                        public void run() {
index 2dd93a6..2a2dbcd 100644 (file)
@@ -114,8 +114,8 @@ public class UIDataManager implements Runnable {
                                        getInstance().getControlDataChecker().parserLog(
                                                        (ControlData) logs.get(i));
                                } else {
-                                       getInstance().getSceneTransformDataChecker().parserLog(
-                                                       (SceneData) logs.get(i));
+//                                     getInstance().getSceneTransformDataChecker().parserLog(
+//                                                     (SceneData) logs.get(i));
                                }
                        }
                }
index 73e56d7..03faa03 100755 (executable)
@@ -40,7 +40,6 @@ import java.net.ServerSocket;
 import java.net.Socket;
 import java.util.ArrayList;
 import java.util.Collections;
-import java.util.HashMap;
 import java.util.List;
 
 import org.eclipse.core.commands.ExecutionException;
@@ -72,14 +71,10 @@ import org.tizen.dynamicanalyzer.communicator.CommunicatorUtils;
 import org.tizen.dynamicanalyzer.communicator.DACommunicator;
 import org.tizen.dynamicanalyzer.handlers.RealtimePerspectiveHandler;
 import org.tizen.dynamicanalyzer.logparser.LogCenterConstants;
-import org.tizen.dynamicanalyzer.services.RecordStateSourceProvider;
 import org.tizen.dynamicanalyzer.swap.model.ByteUtils;
 import org.tizen.dynamicanalyzer.swap.model.data.ApiNameManager;
-import org.tizen.dynamicanalyzer.swap.model.probe2.LogData;
 import org.tizen.dynamicanalyzer.swap.model.probe2.LogDataFactory;
 import org.tizen.dynamicanalyzer.swap.model.probe2.ProbeCommonData;
-import org.tizen.dynamicanalyzer.ui.info.callstack.CallStackData;
-import org.tizen.dynamicanalyzer.ui.info.callstack.CallStackUnit;
 import org.tizen.dynamicanalyzer.ui.page.BaseView;
 import org.tizen.dynamicanalyzer.ui.page.DAPageComposite;
 import org.tizen.dynamicanalyzer.ui.page.ViewAction;
@@ -90,7 +85,7 @@ import org.tizen.sdblib.service.SyncResult;
 
 public class AnalyzerUtil {
        private static IWorkbenchWindow window = null;
-       private static String recordState = RecordStateSourceProvider.RECORD_READY;
+//     private static String recordState = RecordStateSourceProvider.RECORD_READY;
        private static final int ENLARGED_LENGTH = 12;
 
        // FIXME start
@@ -256,9 +251,9 @@ public class AnalyzerUtil {
                return CommonConstants.EMPTY;
        }
 
-       public static String getRecordState() {
-               return recordState;
-       }
+//     public static String getRecordState() {
+//             return recordState;
+//     }
 
        public static ViewPart getViewPart(String id) {
                IWorkbenchPage page = getWorkbenchWindow().getActivePage();
@@ -338,9 +333,9 @@ public class AnalyzerUtil {
                });
        }
 
-       public static void setRecordState(final String state) {
-               recordState = state;
-       }
+//     public static void setRecordState(final String state) {
+//             recordState = state;
+//     }
 
        public static int getTableItemHeight(Grid table) {
                GC gc = new GC(table);
@@ -702,7 +697,7 @@ public class AnalyzerUtil {
                                        .parseInt(input[LogCenterConstants.UI_EVENT_DETAIL_TYPE]);
                        int x = Integer.parseInt(input[LogCenterConstants.UI_EVENT_X]);
                        int y = Integer.parseInt(input[LogCenterConstants.UI_EVENT_Y]);
-                       int info1 = initIntPayload(input[LogCenterConstants.UI_EVENT_INFO1]);
+                       String info1 = input[LogCenterConstants.UI_EVENT_INFO1];
                        int info2 = initIntPayload(input[LogCenterConstants.UI_EVENT_INFO2]);
                        rear = ByteUtils.getByte(eventType, detailType, x, y, info1, info2);
                        result = ByteUtils.concatByteArray(front, rear);
@@ -1007,4 +1002,5 @@ public class AnalyzerUtil {
                }
                return apiMap;
        }
+
 }