[Title] multi process filtering
authorwoojin <woojin2.jung@samsung.com>
Tue, 17 Dec 2013 06:39:11 +0000 (15:39 +0900)
committerwoojin <woojin2.jung@samsung.com>
Tue, 17 Dec 2013 06:39:11 +0000 (15:39 +0900)
[Desc.] apply multi process filtering by pid 1. function profiling 2. function profiling of Tizen UI
[Issue]

19 files changed:
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/common/AnalyzerConstants.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/handlers/OpenTraceHandler.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/project/Project.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/sql/DBTableManager.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/sql/SqlManager.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/swap/callstack/BaseCallstackManager.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/swap/callstack/SWAPCallStackManager.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/swap/logparser/SWAPLogParser.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/file/FileDataMaker.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/info/callstack/CallStackManager.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/range/RangeDataManager.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/summary/profiling/FunctionUsageProfiler.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/summary/profiling/ProfileDataMaker.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/summary/profiling/ProfilingChildData.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/summary/profiling/ProfilingData.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/summary/profiling/ProfilingTable.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/userinterface/profiling/UIFunctionProfilingData.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/userinterface/profiling/UIFunctionProfilingDataChecker.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/userinterface/profiling/UIFunctionProfilingTable.java

index 418817b..5317596 100644 (file)
@@ -291,7 +291,7 @@ public class AnalyzerConstants {
                        AnalyzerLabels.ANALYZER_CONSTANTS_SOURCELINE_NOT_FOUND };\r
 \r
        // user call check\r
-       public final static String USER_BIN_POS = "/opt/apps/"; //$NON-NLS-1$\r
+       public final static String USER_BIN_POS = "/opt/usr/apps/"; //$NON-NLS-1$\r
        public final static int USER_CALL = 2;\r
        public final static int INTERNAL_CALL = 1;\r
        public final static int USER_CALL_CHECK_ERROR = -1;\r
index 8076016..b0a8872 100644 (file)
@@ -404,12 +404,12 @@ public class OpenTraceHandler extends AbstractHandler {
                        System.out.println("failed - loadProfilingData");\r
                        isSuccess = false;\r
                } else {\r
-                       int sampleCount = 0;\r
-                       ProfileDataMaker profiler = FunctionUsageProfiler.getInstance()\r
-                                       .getProfileDataMaker();\r
                        for (int i = 0; i < dbInfo.size(); i++) {\r
                                List<String> pInfo = dbInfo.get(i);\r
+                               int pid = Integer.parseInt(pInfo.get(ProfilingData.PID_INDEX));\r
                                // possibility of extensions - network, efl, db, etc...\r
+                               ProfileDataMaker profiler =  FunctionUsageProfiler.getInstance()\r
+                                               .getProfileDataMakerByPid(pid);\r
                                ProfilingData fupData = new ProfilingData(pInfo, profiler);\r
                                String seq = pInfo.get(ProfilingData.SEQUENCE_INDEX);\r
                                profiler.getProfilingDataMap().put(Integer.parseInt(seq),\r
@@ -418,18 +418,24 @@ public class OpenTraceHandler extends AbstractHandler {
                                profiler.getSymbolSeqHash().put(symbol, seq);\r
                                UIDataManager.getInstance().getfunctionProfilingDataChecker()\r
                                                .addProfilingData(fupData);\r
-                               sampleCount += fupData.getExCount();\r
+                               // restore total sample count                   \r
+                               profiler.setTotalSampleCount(profiler.getTotalSampleCount()\r
+                                               + fupData.getExCount());\r
                        }\r
 \r
-                       ProfilingData ab = profiler\r
-                                       .getProfilingDataByKey(FunctionUsageProfiler.APPLICATION_KEY);\r
-                       profiler.setAppBin(ab);\r
-                       ProfilingData dl = profiler\r
-                                       .getProfilingDataByKey(FunctionUsageProfiler.DEPENDENT_LIB_KEY);\r
-                       profiler.setDependentLib(dl);\r
-\r
-                       // restore total sample count                   \r
-                       profiler.setTotalSampleCount(sampleCount);\r
+                       List<Integer> pids = FunctionUsageProfiler.getInstance()\r
+                                       .getPidsOfProfileDataMakerMap();\r
+                       for(int i = 0; i < pids.size(); i++)\r
+                       {\r
+                               ProfileDataMaker profiler = FunctionUsageProfiler.getInstance()\r
+                                               .getProfileDataMakerByPid(pids.get(i));                 \r
+                               ProfilingData ab = profiler\r
+                                               .getProfilingDataByKey(FunctionUsageProfiler.APPLICATION_KEY);\r
+                               profiler.setAppBin(ab);\r
+                               ProfilingData dl = profiler\r
+                                               .getProfilingDataByKey(FunctionUsageProfiler.DEPENDENT_LIB_KEY);\r
+                               profiler.setDependentLib(dl);\r
+                       }\r
                }\r
                return isSuccess;\r
        }\r
@@ -442,20 +448,21 @@ public class OpenTraceHandler extends AbstractHandler {
                        System.out.println("failed - loadProfilingChildData");\r
                        isSuccess = false;\r
                } else {\r
-                       ProfileDataMaker profiler = FunctionUsageProfiler.getInstance()\r
-                                       .getProfileDataMaker();\r
                        for (int i = 0; i < dbInfo.size(); i++) {\r
                                List<String> data = dbInfo.get(i);\r
-                               if (data.size() < 2) {\r
+                               if (data.size() < 2) { // why?\r
                                        continue;\r
                                }\r
-                               String seqs = data.get(1);\r
+                               int pid = Integer.parseInt(data.get(1)); // 1 == PID_INDEX\r
+                               String seqs = data.get(2); // 2 == CHILDLIST_INDEX\r
                                String[] splitSeqs = seqs.split(CommonConstants.SLASH);\r
                                List<Integer> childData = new ArrayList<Integer>();\r
                                for (int ii = 0; ii < splitSeqs.length; ii++) {\r
                                        childData.add(Integer.parseInt(splitSeqs[ii]));\r
                                }\r
                                int key = Integer.parseInt(data.get(0));\r
+                               ProfileDataMaker profiler = FunctionUsageProfiler.getInstance()\r
+                                               .getProfileDataMakerByPid(pid);\r
                                ProfilingData parent = profiler.getProfilingDataMap().get(key);\r
                                ProfilingChildData child = parent.getChildData();\r
                                child.getChildren().addAll(childData);\r
index 823422f..c8f55fc 100755 (executable)
@@ -320,7 +320,7 @@ public class Project {
                ProcessInfo processInfo = pInfoPack.getProcessInfo(time);
                return processInfo.getHighestAddress();
        }
-
+/*
        public void setTotalProfilingSampleCount(int count) {
                FunctionUsageProfiler.getInstance().getProfileDataMaker()
                                .setTotalSampleCount(count);
@@ -330,7 +330,7 @@ public class Project {
                return FunctionUsageProfiler.getInstance().getProfileDataMaker()
                                .getTotalSampleCount();
        }
-
+*/
        public byte[] getReplayEvent() {
                return replayEvent;
        }
index def782a..58d4962 100755 (executable)
@@ -101,6 +101,7 @@ public class DBTableManager {
 
        public static final String CUSTOM_COLUMN_ADDR = "addr";//$NON-NLS-1$
        public static final String CUSTOM_COLUMN_SEQ = "SeqNumber";//$NON-NLS-1$
+       public static final String CUSTOM_COLUMN_PID = "Pid";//$NON-NLS-1$
        public static final String CUSTOM_COLUMN_API = "api";//$NON-NLS-1$
        public static final String CUSTOM_COLUMN_CALLSTACK = "callstack";//$NON-NLS-1$
        public static final String CUSTOM_COLUMN_NAME = "name";//$NON-NLS-1$
@@ -243,14 +244,14 @@ public class DBTableManager {
 
                // "profiling data" table info block
                {
-                       String[] names = { CUSTOM_COLUMN_SEQ, CUSTOM_COLUMN_NAME,
-                                       CUSTOM_COLUMN_EXCOUNT, CUSTOM_COLUMN_INCOUNT,
-                                       CUSTOM_COLUMN_CALL_COUNT, CUSTOM_COLUMN_PARENT,
-                                       CUSTOM_COLUMN_KEY, CUSTOM_COLUMN_INCL_EXETIME,
-                                       CUSTOM_COLUMN_EXCL_EXETIME };
-                       String[] options = { NOT_NULL, EMPTY, EMPTY, EMPTY, EMPTY, EMPTY,
-                                       EMPTY, EMPTY, EMPTY };
-                       String[] types = { TEXT, "VARCHAR(512)", TEXT, TEXT, TEXT,
+                       String[] names = { CUSTOM_COLUMN_SEQ, CUSTOM_COLUMN_PID, 
+                                       CUSTOM_COLUMN_NAME, CUSTOM_COLUMN_EXCOUNT, 
+                                       CUSTOM_COLUMN_INCOUNT, CUSTOM_COLUMN_CALL_COUNT, 
+                                       CUSTOM_COLUMN_PARENT, CUSTOM_COLUMN_KEY, 
+                                       CUSTOM_COLUMN_INCL_EXETIME,     CUSTOM_COLUMN_EXCL_EXETIME };
+                       String[] options = { NOT_NULL, NOT_NULL, EMPTY, EMPTY, EMPTY, EMPTY, 
+                                       EMPTY,  EMPTY, EMPTY, EMPTY };
+                       String[] types = { TEXT, TEXT, "VARCHAR(512)", TEXT, TEXT, TEXT,
                                        "VARCHAR(512)", "VARCHAR(512)", TEXT, TEXT };
                        DBTableInfo profilingDataTableInfo = new DBTableInfo(
                                        TABLE_NAME_PROFILING_DATA, names, options, types);
@@ -259,9 +260,10 @@ public class DBTableManager {
 
                // "profiling child data" table info block
                {
-                       String[] names = { CUSTOM_COLUMN_SEQ, CUSTOM_COLUMN_CHILD_LIST };
-                       String[] options = { NOT_NULL, EMPTY };
-                       String[] types = { TEXT, "VARCHAR(1024)" };
+                       String[] names = { CUSTOM_COLUMN_SEQ, CUSTOM_COLUMN_PID, 
+                                       CUSTOM_COLUMN_CHILD_LIST };
+                       String[] options = { NOT_NULL, NOT_NULL, EMPTY };
+                       String[] types = { TEXT, TEXT, "VARCHAR(1024)" };
                        DBTableInfo profilingChildTableInfo = new DBTableInfo(
                                        TABLE_NAME_PROFILING_CHILD_DATA, names, options, types);
                        tableInfos.set(TABLE_INDEX_PROFILING_CHILD_DATA,
index 84c64d5..3de8d0a 100755 (executable)
@@ -890,61 +890,72 @@ public class SqlManager {
        }
 
        public void saveProfilingData() {
-               ProfileDataMaker profiler = FunctionUsageProfiler.getInstance()
-                               .getProfileDataMaker();
-               HashMap<Integer, ProfilingData> profilingDataMap = profiler
-                               .getProfilingDataMap();
-               List<ProfilingData> pDataList = new ArrayList<ProfilingData>();
-               pDataList.addAll(profilingDataMap.values());
-
-               DBTableInfo profilingData = DBTableManager.getInstance().getTableInfo(
-                               DBTableManager.TABLE_INDEX_PROFILING_DATA);
-               String insertQuery = profilingData.insertQuery();
-
-               List<List<String>> insetData = new ArrayList<List<String>>();
-               int size = profilingData.getColumnNames().length;
-               int count = pDataList.size();
-               for (int i = 0; i < count; i++) {
-                       List<String> input = pDataList.get(i).getSaveData();
-                       List<String> insetRowData = new ArrayList<String>();
-                       int dataSize = input.size();
-                       for (int ii = 0; ii < size; ii++) {
-                               if (ii >= dataSize) {
-                                       insetRowData.add(CommonConstants.EMPTY);
-                               } else {
-                                       insetRowData.add(input.get(ii));
+               List<Integer> pids = FunctionUsageProfiler.getInstance()
+                               .getPidsOfProfileDataMakerMap();
+               for(int i = 0; i < pids.size(); i++)
+               {
+                       ProfileDataMaker profiler = FunctionUsageProfiler.getInstance()
+                                       .getProfileDataMakerByPid(pids.get(i));
+                       HashMap<Integer, ProfilingData> profilingDataMap = profiler
+                                       .getProfilingDataMap();
+                       List<ProfilingData> pDataList = new ArrayList<ProfilingData>();
+                       pDataList.addAll(profilingDataMap.values());
+       
+                       DBTableInfo profilingData = DBTableManager.getInstance().getTableInfo(
+                                       DBTableManager.TABLE_INDEX_PROFILING_DATA);
+                       String insertQuery = profilingData.insertQuery();
+       
+                       List<List<String>> insetData = new ArrayList<List<String>>();
+                       int size = profilingData.getColumnNames().length;
+                       int count = pDataList.size();
+                       for (int j = 0; j < count; j++) {
+                               List<String> input = pDataList.get(j).getSaveData();
+                               List<String> insetRowData = new ArrayList<String>();
+                               int dataSize = input.size();
+                               for (int ii = 0; ii < size; ii++) {
+                                       if (ii >= dataSize) {
+                                               insetRowData.add(CommonConstants.EMPTY);
+                                       } else {
+                                               insetRowData.add(input.get(ii));
+                                       }
                                }
+                               insetData.add(insetRowData);
                        }
-                       insetData.add(insetRowData);
+                       insertQuery(insertQuery, insetData);
                }
-               insertQuery(insertQuery, insetData);
        }
 
        public void saveProfilingChildData() {
-               ProfileDataMaker profiler = FunctionUsageProfiler.getInstance()
-                               .getProfileDataMaker();
-               HashMap<String, ProfilingChildData> profilingDataMap = profiler
-                               .getChildListMap();
-               List<ProfilingChildData> pDataList = new ArrayList<ProfilingChildData>();
-               pDataList.addAll(profilingDataMap.values());
-
-               DBTableInfo profilingChildData = DBTableManager.getInstance()
-                               .getTableInfo(DBTableManager.TABLE_INDEX_PROFILING_CHILD_DATA);
-
-               List<List<String>> insetData = new ArrayList<List<String>>();
-               int count = pDataList.size();
-               for (int i = 0; i < count; i++) {
-                       ProfilingChildData data = pDataList.get(i);
-                       String seqStr = makeLoadFormat(data.getChildren());
-                       List<String> insetRowData = new ArrayList<String>();
-                       if (null == seqStr || seqStr.isEmpty()) {
-                               continue;
+               List<Integer> pids = FunctionUsageProfiler.getInstance()
+                               .getPidsOfProfileDataMakerMap();
+               for(int i = 0; i < pids.size(); i++)
+               {
+                       ProfileDataMaker profiler = FunctionUsageProfiler.getInstance()
+                                       .getProfileDataMakerByPid(pids.get(i));
+                       HashMap<String, ProfilingChildData> profilingDataMap = profiler
+                                       .getChildListMap();
+                       List<ProfilingChildData> pDataList = new ArrayList<ProfilingChildData>();
+                       pDataList.addAll(profilingDataMap.values());
+       
+                       DBTableInfo profilingChildData = DBTableManager.getInstance()
+                                       .getTableInfo(DBTableManager.TABLE_INDEX_PROFILING_CHILD_DATA);
+       
+                       List<List<String>> insetData = new ArrayList<List<String>>();
+                       int count = pDataList.size();
+                       for (int j = 0; j < count; j++) {
+                               ProfilingChildData data = pDataList.get(j);
+                               String seqStr = makeLoadFormat(data.getChildren());
+                               List<String> insetRowData = new ArrayList<String>();
+                               if (null == seqStr || seqStr.isEmpty()) {
+                                       continue;
+                               }
+                               insetRowData.add(data.getSeq());
+                               insetRowData.add(Integer.toString(data.getPid()));
+                               insetRowData.add(seqStr);
+                               insetData.add(insetRowData);
                        }
-                       insetRowData.add(data.getSeq());
-                       insetRowData.add(seqStr);
-                       insetData.add(insetRowData);
+                       insertQuery(profilingChildData.insertQuery(), insetData);
                }
-               insertQuery(profilingChildData.insertQuery(), insetData);
        }
 
        /**
index 0ec2784..9769eaa 100644 (file)
@@ -35,6 +35,8 @@ import org.tizen.dynamicanalyzer.common.AnalyzerManager;
 import org.tizen.dynamicanalyzer.communicator.DACommunicator;
 import org.tizen.dynamicanalyzer.logparser.LogCenterConstants;
 import org.tizen.dynamicanalyzer.project.AppInfo;
+import org.tizen.dynamicanalyzer.swap.channel.data.ProcessInfo;
+import org.tizen.dynamicanalyzer.swap.channel.data.ProcessInfoPackage;
 import org.tizen.dynamicanalyzer.swap.model.data.LogData;
 import org.tizen.dynamicanalyzer.ui.info.callstack.CallStackData;
 import org.tizen.dynamicanalyzer.ui.info.callstack.CallStackUnit;
@@ -139,6 +141,18 @@ public abstract class BaseCallstackManager {
                }
                return userFunctionBin;
        }
+       
+       public String getUserFunctionPosition(int pid, long time) {
+               if (userFunctionBin == null || userFunctionBin.isEmpty()) {             
+                       ProcessInfoPackage processInfoPkg = AnalyzerManager
+                                       .getProject().getProcessInfo(pid);
+                       ProcessInfo processInfo = processInfoPkg.getProcessInfo(time);          
+                       
+                       userFunctionBin = new String(processInfo
+                                       .getMainTargetBinaryPath());                    
+               }
+               return userFunctionBin;
+       }
 
        public List<CallStackItem> getUserCallstack(int tid) {
                if (null == userCallstackByTidMap) {
index d2bd0cc..d284af9 100644 (file)
@@ -80,7 +80,7 @@ public class SWAPCallStackManager extends BaseCallstackManager {
                if (null == selfCallstackUnit) {
                        String strSelfFuncName = SymbolManager.addr2func(sourceBinPath,
                                        strSelfAddr, isPieBuild, baseAddr);
-                       String strSelfSymbol = getUserFunctionPosition()
+                       String strSelfSymbol = getUserFunctionPosition(pid, time)
                                        + AnalyzerConstants.CALLSTACK_API_TOKEN_STRING
                                        + strSelfFuncName;
                        selfCallstackUnit = new CallStackUnit(selfAddr, strSelfSymbol, log);
@@ -98,7 +98,7 @@ public class SWAPCallStackManager extends BaseCallstackManager {
                if (null == callerCallstackUnit) {
                        String strCallerFuncName = SymbolManager.addr2func(sourceBinPath,
                                        strCallerAddr, isPieBuild, baseAddr);
-                       String strCallerSymbol = getUserFunctionPosition()
+                       String strCallerSymbol = getUserFunctionPosition(pid, time)
                                        + AnalyzerConstants.CALLSTACK_API_TOKEN_STRING
                                        + strCallerFuncName;
                        callerCallstackUnit = new CallStackUnit(callerAddr,
@@ -320,7 +320,7 @@ public class SWAPCallStackManager extends BaseCallstackManager {
                        if (null == callerCallstackUnit) {
                                String strCallerFuncName = SymbolManager.addr2func(sourceBinPath,
                                                strCallerAddr, isPieBuild, baseAddr);
-                               String strCallerSymbol = getUserFunctionPosition()
+                               String strCallerSymbol = getUserFunctionPosition(pid, time)
                                                + AnalyzerConstants.CALLSTACK_API_TOKEN_STRING
                                                + strCallerFuncName;
                                callerCallstackUnit = new CallStackUnit(callerAddr,
@@ -372,7 +372,8 @@ public class SWAPCallStackManager extends BaseCallstackManager {
                if (null == selfCallstackUnit) {
                        String strSelfFuncName = SymbolManager.addr2func(sourceBinPath,
                                        strSelfAddr, isPieBuild, baseAddr);
-                       String strSelfSymbol = getUserFunctionPosition()
+                       String strSelfSymbol = getUserFunctionPosition(
+                                       input.getPid(), input.getTime())
                                        + AnalyzerConstants.CALLSTACK_API_TOKEN_STRING
                                        + strSelfFuncName;
                        selfCallstackUnit = new CallStackUnit(selfAddr, strSelfSymbol, log);
index b045411..03455cf 100755 (executable)
@@ -202,10 +202,9 @@ public class SWAPLogParser implements Runnable {
                                                        && pcAddr <= processInfo.getHighestAddress()) {
                                                /* user callstack create by entry and exit */
                                                AnalyzerManager.getCallstackManager()
-                                                               .makeUserCallstack(
-                                                                               pData,
+                                                               .makeUserCallstack(pData,
                                                                                FunctionUsageProfiler.getInstance()
-                                                                                               .getProfileDataMaker());
+                                                                                       .getProfileDataMakerByPid(pData.getPid()));
                                        } else {
                                                AnalyzerManager.getCallstackManager()
                                                                .makeCallstackWithoutBacktrace(pData);
index 62ba23c..f8535ab 100644 (file)
@@ -77,7 +77,7 @@ public class FileDataMaker {
        private int timeLineFileChartFDCount = 0;
        private FailedChecker failedChecker = null;
        private WarningChecker warningChecker = null;
-       private int preSelectionPId = 1;
+       private int preSelectionPId = -1;
 
        public FileDataMaker(FailedChecker failedChecker,
                        LeakDetector leakDetector, WarningChecker warningChecker) {
index ebabcb0..3f2c2ca 100644 (file)
@@ -72,7 +72,8 @@ public class CallStackManager extends BaseCallstackManager {
                if (null == selfCallstackUnit) {
                        String strSelfFuncName = SymbolManager.addr2func(binPath,
                                        strSelfAddr, isPieBuild, baseAddr);
-                       String strSelfSymbol = getUserFunctionPosition()
+                       String strSelfSymbol = getUserFunctionPosition(
+                                       log.getPid(), log.getTime())
                                        + AnalyzerConstants.CALLSTACK_API_TOKEN_STRING
                                        + strSelfFuncName;
                        selfCallstackUnit = new CallStackUnit(selfAddr, strSelfSymbol, log);
@@ -89,7 +90,8 @@ public class CallStackManager extends BaseCallstackManager {
                if (null == callerCallstackUnit) {
                        String strCallerFuncName = SymbolManager.addr2func(binPath,
                                        strCallerAddr, isPieBuild, baseAddr);
-                       String strCallerSymbol = getUserFunctionPosition()
+                       String strCallerSymbol = getUserFunctionPosition(
+                                       log.getPid(), log.getTime())
                                        + AnalyzerConstants.CALLSTACK_API_TOKEN_STRING
                                        + strCallerFuncName;
                        callerCallstackUnit = new CallStackUnit(callerAddr,
@@ -276,7 +278,8 @@ public class CallStackManager extends BaseCallstackManager {
                        if (null == callerCallstackUnit) {
                                String strCallerFuncName = SymbolManager.addr2func(binPath,
                                                strCallerAddr, isPieBuild, baseAddr);
-                               String strCallerSymbol = getUserFunctionPosition()
+                               String strCallerSymbol = getUserFunctionPosition(
+                                               inputData.getPid(), inputData.getTime())
                                                + AnalyzerConstants.CALLSTACK_API_TOKEN_STRING
                                                + strCallerFuncName;
                                callerCallstackUnit = new CallStackUnit(callerAddr,
@@ -328,7 +331,8 @@ public class CallStackManager extends BaseCallstackManager {
                if (null == selfCallstackUnit) {
                        String strSelfFuncName = SymbolManager.addr2func(binPath,
                                        strSelfAddr, isPieBuild, baseAddr);
-                       String strSelfSymbol = getUserFunctionPosition()
+                       String strSelfSymbol = getUserFunctionPosition(
+                                       input.getPid(), input.getTime())
                                        + AnalyzerConstants.CALLSTACK_API_TOKEN_STRING
                                        + strSelfFuncName;
                        selfCallstackUnit = new CallStackUnit(selfAddr, strSelfSymbol,
index 906b4a2..eb0beb6 100644 (file)
@@ -26,6 +26,8 @@
 
 package org.tizen.dynamicanalyzer.ui.range;
 
+import java.util.ArrayList;
+import java.util.HashMap;
 import java.util.List;
 
 import org.eclipse.swt.SWT;
@@ -67,8 +69,8 @@ public class RangeDataManager implements Runnable {
        private LeakDetector leakDetector = null;
        private WarningChecker warningChecker = null;
 //     private FileDataMaker fileDataMaker = null;
-       private ProfileDataMaker profileDataMaker = null;
-       private ProfileDataMaker swapProfileDataMaker = null;
+       private HashMap<Integer, ProfileDataMaker> profileDataMakerMap = null;
+       private HashMap<Integer, ProfileDataMaker> swapProfileDataMakerMap = null;      
        private BaseCallstackManager callstackManager = null;
        private BaseCallstackManager swapCallstackManager = null;
 
@@ -85,8 +87,6 @@ public class RangeDataManager implements Runnable {
                warningChecker = new WarningChecker();
                callstackManager = new CallStackManager();
                swapCallstackManager = new SWAPCallStackManager();
-               profileDataMaker = new ProfileDataMaker(callstackManager);
-               swapProfileDataMaker = new ProfileDataMaker(swapCallstackManager);
 
 //             fileDataMaker = new FileDataMaker(failedChecker, leakDetector,
 //                             warningChecker);
@@ -96,8 +96,12 @@ public class RangeDataManager implements Runnable {
                failedChecker.clear();
                leakDetector.clear();
                warningChecker.clear();
-               profileDataMaker.clear();
                callstackManager.clear();
+               swapCallstackManager.clear();
+               if(profileDataMakerMap != null)
+                       profileDataMakerMap.clear();
+               if(swapProfileDataMakerMap != null)
+                       swapProfileDataMakerMap.clear();
        }
 
        public void initRange() {
@@ -167,6 +171,43 @@ public class RangeDataManager implements Runnable {
                return instance;
        }
 
+       public List<Integer> getPidsOfProfileDataMakerMap() {
+               ArrayList<Integer> pids = new ArrayList<Integer>();
+               if (DACommunicator.isSWAPVersion()) {
+                       pids.addAll(swapProfileDataMakerMap.keySet());                  
+               } else {
+                       pids.addAll(profileDataMakerMap.keySet());                      
+               }
+               
+               return pids;
+       }
+       
+       public ProfileDataMaker getProfileDataMakerByPid(int pid) {
+               ProfileDataMaker profileDataMaker = null;
+               if (DACommunicator.isSWAPVersion()) {
+                       if(null == profileDataMakerMap) {
+                               profileDataMakerMap = new HashMap<Integer, ProfileDataMaker>();
+                       }
+                       profileDataMaker = profileDataMakerMap.get(pid);
+                       if(null == profileDataMaker) {
+                               profileDataMaker = new ProfileDataMaker(callstackManager);
+                               profileDataMaker.setPid(pid);
+                               profileDataMakerMap.put(pid, profileDataMaker);
+                       }
+               } else {
+                       if(null == swapProfileDataMakerMap) {
+                               swapProfileDataMakerMap = new HashMap<Integer, ProfileDataMaker>();
+                       }
+                       profileDataMaker = swapProfileDataMakerMap.get(pid);
+                       if(null == profileDataMaker) {
+                               profileDataMaker = new ProfileDataMaker(swapCallstackManager);
+                               profileDataMaker.setPid(pid);                           
+                               swapProfileDataMakerMap.put(pid, profileDataMaker);
+                       }                       
+               }
+               return profileDataMaker;                
+       }
+       
        public FailedChecker getFailedChecker() {
                return failedChecker;
        }
@@ -183,23 +224,6 @@ public class RangeDataManager implements Runnable {
                this.leakDetector = leakDetector;
        }
 
-       public ProfileDataMaker getProfileDataMaker() {
-               if (DACommunicator.isSWAPVersion()) {
-                       return swapProfileDataMaker;
-               }
-               return profileDataMaker;
-       }
-
-       public void setProfileDataMaker(ProfileDataMaker profileDataMaker) {
-               if (DACommunicator.isSWAPVersion()) {
-                       {
-                               this.swapProfileDataMaker = profileDataMaker;
-                               return;
-                       }
-               }
-               this.profileDataMaker = profileDataMaker;
-       }
-
        public WarningChecker getWarningChecker() {
                return warningChecker;
        }
@@ -413,6 +437,7 @@ public class RangeDataManager implements Runnable {
                                int size = profileData.size();
                                for (int i = 0; i < size; i++) {
                                        ProfileData input = (ProfileData) profileData.get(i);
+                                       ProfileDataMaker profileDataMaker = getProfileDataMakerByPid(input.getPid());
                                        if (input.getId() != DataChannelConstants.MSG_DATA_SAMPLE) {
                                                ProcessInfoPackage processInfoPkg = AnalyzerManager
                                                                .getProject().getProcessInfo(input.getPid());
@@ -422,15 +447,14 @@ public class RangeDataManager implements Runnable {
                                                if (pcAddr >= processInfo.getLowestAddress()
                                                                && pcAddr <= processInfo.getHighestAddress()) {
                                                        /* user callstack create by entry and exit */
-                                                       swapCallstackManager.makeUserCallstack(input,
-                                                                       swapProfileDataMaker);
+                                                       swapCallstackManager.makeUserCallstack(input, 
+                                                                       profileDataMaker);
                                                } else {
                                                        swapCallstackManager
                                                                        .makeCallstackWithoutBacktrace(input);
                                                }
                                        } else {
-                                               swapProfileDataMaker
-                                                               .makeFunctionUsageProfileData(input);
+                                               profileDataMaker.makeFunctionUsageProfileData(input);
                                        }
 
                                }
index 6ad49f5..ac1fa1e 100644 (file)
@@ -28,6 +28,7 @@
 package org.tizen.dynamicanalyzer.ui.summary.profiling;
 
 import java.util.ArrayList;
+import java.util.HashMap;
 import java.util.List;
 
 import org.tizen.dynamicanalyzer.common.AnalyzerConstants;
@@ -48,7 +49,7 @@ public class FunctionUsageProfiler implements Runnable {
 
        private static FunctionUsageProfiler instance = null;
 
-       private ProfileDataMaker profileDataMaker = null;
+       private HashMap<Integer, ProfileDataMaker> profileDataMakerMap = null;
        /**
         * key: symbol(child) or file path (parent) - value : sequence num of
         * profiling data. all parent and child data is in
@@ -56,12 +57,24 @@ public class FunctionUsageProfiler implements Runnable {
        private List<List<LogData>> sampleInputs = null;
        private static Thread profiler = null;
 
-       public FunctionUsageProfiler() {
-               profileDataMaker = new ProfileDataMaker(
-                               AnalyzerManager.getCallstackManager());
+       public List<Integer> getPidsOfProfileDataMakerMap() {
+               ArrayList<Integer> pids = new ArrayList<Integer>();
+               pids.addAll(profileDataMakerMap.keySet());
+               
+               return pids;
        }
-
-       public ProfileDataMaker getProfileDataMaker() {
+       
+       public ProfileDataMaker getProfileDataMakerByPid(int pid) {
+               if(null == profileDataMakerMap) {
+                       profileDataMakerMap = new HashMap<Integer, ProfileDataMaker>();
+               }
+               ProfileDataMaker profileDataMaker = profileDataMakerMap.get(pid);
+               if(null == profileDataMaker) {
+                       profileDataMaker = new ProfileDataMaker(
+                                       AnalyzerManager.getCallstackManager());
+                       profileDataMaker.setPid(pid);
+                       profileDataMakerMap.put(pid, profileDataMaker);
+               }
                return profileDataMaker;
        }
 
@@ -152,7 +165,7 @@ public class FunctionUsageProfiler implements Runnable {
                        }
                        int size = sample.size();
                        for (int i = 0; i < size; i++) {
-                               getInstance().getProfileDataMaker()
+                               getInstance().getProfileDataMakerByPid(sample.get(i).getPid())
                                                .makeFunctionUsageProfileData((ProfileData) sample.get(i));
                        }
                }
index 9fb35d9..6ef64df 100644 (file)
@@ -94,7 +94,8 @@ public class ProfileDataMaker {
        private HashMap<Integer, CallstackTree> callstackTreeByTidMap = new HashMap<Integer, CallstackTree>();
        private int totalSampleCount = 0;
        private BaseCallstackManager callstackManager = null;
-
+       private int pid = 0;
+       
        /**
         * key: seq - value : function usage profiling data hash map all function
         * usage profiling data are in this hash map
@@ -130,6 +131,14 @@ public class ProfileDataMaker {
                return callstackManager;
        }
 
+       public int getPid() {
+               return pid;
+       }
+
+       public void setPid(int pid) {
+               this.pid = pid;
+       }
+       
        public String getAppBinName() {
                return appBinName;
        }
@@ -294,7 +303,8 @@ public class ProfileDataMaker {
 //                             ApiNameManager.getApiId(functionName);
                        }
                        // need to be checked again - in case pid is not main application
-                       symbol = callstackManager.getUserFunctionPosition()
+                       symbol = callstackManager.getUserFunctionPosition(
+                                       sampleLog.getPid(), sampleLog.getTime())
                                        + AnalyzerConstants.CALLSTACK_API_TOKEN_STRING
                                        + functionName;
                } else {
index c8e100a..55722ee 100644 (file)
@@ -31,16 +31,22 @@ import java.util.List;
 
 public class ProfilingChildData {
        private String seq;
+       int pid;
        private List<Integer> children;
 
-       public ProfilingChildData(String seq) {
+       public ProfilingChildData(String seq, int pid) {
                this.seq = seq;
+               this.pid = pid;
        }
 
        public String getSeq() {
                return seq;
        }
 
+       public int getPid() {
+               return pid;
+       }
+
        public List<Integer> getChildren() {
                if (null == children) {
                        children = new ArrayList<Integer>();
@@ -48,7 +54,7 @@ public class ProfilingChildData {
                return children;
        }
 
-       public boolean isEualsl(ProfilingChildData input) {
+       public boolean isEqual(ProfilingChildData input) {
                if (!input.getSeq().equals(seq)) {
                        return false;
                }
index b08eb47..24b2d45 100644 (file)
@@ -34,16 +34,17 @@ import org.tizen.dynamicanalyzer.common.CommonConstants;
 import org.tizen.dynamicanalyzer.ui.info.callstack.CallStackUnit;
 
 public class ProfilingData {
-       public static final int DATA_FIELD_SIZE = 9;
+       public static final int DATA_FIELD_SIZE = 10;
        public static final int SEQUENCE_INDEX = 0;
-       public static final int NAME_INDEX = 1;
-       public static final int EXCOUNT_INDEX = 2;
-       public static final int INCOUNT_INDEX = 3;
-       public static final int CALLCOUNT_INDEX = 4;
-       public static final int PARENT_INDEX = 5;
-       public static final int KEY_INDEX = 6;
-       public static final int INCL_ELAPSED_TIME_INDEX = 7;
-       public static final int EXCL_ELAPSED_TIME_INDEX = 8;
+       public static final int PID_INDEX = 1;
+       public static final int NAME_INDEX = 2;
+       public static final int EXCOUNT_INDEX = 3;
+       public static final int INCOUNT_INDEX = 4;
+       public static final int CALLCOUNT_INDEX = 5;
+       public static final int PARENT_INDEX = 6;
+       public static final int KEY_INDEX = 7;
+       public static final int INCL_ELAPSED_TIME_INDEX = 8;
+       public static final int EXCL_ELAPSED_TIME_INDEX = 9;
 
        private static int internalSeq = 0;
        private int seq = -1;
@@ -76,7 +77,8 @@ public class ProfilingData {
 
        public ProfilingChildData getChildData() {
                if (null == children) {
-                       children = new ProfilingChildData(Integer.toString(seq));
+                       children = new ProfilingChildData(Integer.toString(seq)
+                                       , profiler.getPid());
                        profiler.getChildListMap().put(Integer.toString(seq), children);
                }
                return children;
@@ -113,6 +115,7 @@ public class ProfilingData {
                        output.add(CommonConstants.EMPTY);
                }
                output.set(SEQUENCE_INDEX, Integer.toString(seq));
+               output.set(PID_INDEX, Integer.toString(profiler.getPid()));
                output.set(NAME_INDEX, name);
                output.set(EXCOUNT_INDEX, Integer.toString(exCount));
                output.set(INCOUNT_INDEX, Integer.toString(inCount));
@@ -129,6 +132,10 @@ public class ProfilingData {
                getChildData().getChildren().add(seq);
        }
 
+       public ProfileDataMaker getProfileDataMaker() {
+               return profiler;
+       }
+       
        public String getKey() {
                return key;
        }
index 5c98914..8dc301a 100644 (file)
@@ -50,6 +50,7 @@ import org.tizen.dynamicanalyzer.model.ColumnData;
 import org.tizen.dynamicanalyzer.model.TreeInput;
 import org.tizen.dynamicanalyzer.ui.range.RangeDataManager;
 import org.tizen.dynamicanalyzer.ui.range.RangeProfilingView;
+import org.tizen.dynamicanalyzer.ui.toolbar.ToolbarArea;
 import org.tizen.dynamicanalyzer.ui.widgets.table.DATableDataFormat;
 import org.tizen.dynamicanalyzer.ui.widgets.table.DATableHeaderRenderer;
 import org.tizen.dynamicanalyzer.ui.widgets.table.DATreeComposite;
@@ -156,11 +157,23 @@ public class ProfilingTable extends DATreeComposite {
                }
        }
 
-       private ProfileDataMaker getProfileDataMaker() {
+       private List<Integer> getPidsOfProfileDataMakerMap() {
                if (isRange) {
-                       return RangeDataManager.getInstance().getProfileDataMaker();
+                       return RangeDataManager.getInstance()
+                                       .getPidsOfProfileDataMakerMap();
                } else {
-                       return FunctionUsageProfiler.getInstance().getProfileDataMaker();
+                       return FunctionUsageProfiler.getInstance()
+                                       .getPidsOfProfileDataMakerMap();
+               }
+       }
+       
+       private ProfileDataMaker getProfileDataMakerByPid(int pid) {
+               if (isRange) {
+                       return RangeDataManager.getInstance()
+                                       .getProfileDataMakerByPid(pid);
+               } else {
+                       return FunctionUsageProfiler.getInstance()
+                                       .getProfileDataMakerByPid(pid);
                }
        }
 
@@ -205,13 +218,22 @@ public class ProfilingTable extends DATreeComposite {
                }
        }
 
-       private TreeInput makeInput(ProfilingData input, int inputType) {
+       private TreeInput makeInput(ProfilingData input, int pid, int inputType) {
                // table data
                DATableDataFormat tableData = new DATableDataFormat(input.getSequence());
 
                // make input data
-               tableData.setObject(input.getName());
-               ProfileDataMaker profiler = getProfileDataMaker();
+               if(input.getName().equals(FunctionUsageProfiler.APPLICATION)
+                               || input.getName()
+                               .equals(FunctionUsageProfiler.DEPENDENT_LIB)) {
+                       tableData.setObject(input.getName() + 
+                                       CommonConstants.SPACE + CommonConstants.OPEN_BRACKET
+                                       + pid + CommonConstants.CLOSE_BRACKET);
+               } else {
+                       tableData.setObject(input.getName());                   
+               }
+
+               ProfileDataMaker profiler = getProfileDataMakerByPid(pid);
                String exTime = "0", exRate = "0.00", inTime = "0", inRate = "0.00", callCount = "0", exeTime = "0", inExeTime = "0"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$
 
                try {
@@ -298,15 +320,15 @@ public class ProfilingTable extends DATreeComposite {
 
        // !! recursive!!
        public void makeChildTree(List<ProfilingData> children, TreeInput parent,
-                       String parentName, int type) {
+                       String parentName, int pid, int type) {
                if (!children.isEmpty()) {
                        int size = children.size();
                        for (int i = 0; i < size; i++) {
                                ProfilingData data = children.get(i);
-                               TreeInput input = makeInput(data, type);
+                               TreeInput input = makeInput(data, pid, type);
                                if (!data.getChildList().isEmpty()) {
                                        makeChildTree(data.getChildList(), input, data.getName(),
-                                                       type);
+                                                       pid, type);
                                }
                                parent.getChildren().add(input);
                                input.setParent(parentName);
@@ -320,33 +342,42 @@ public class ProfilingTable extends DATreeComposite {
 
        @Override
        public List<TreeInput> makeTreeInput() {
+               int selectedPid = ToolbarArea.getInstance().getSelectedPid();
                List<TreeInput> output = new ArrayList<TreeInput>();
-               ProfileDataMaker profiler = getProfileDataMaker();
-
-               ProfilingData appBin = profiler.getAppBin();
-               if (null != appBin) {
-                       TreeInput appBinInput = makeInput(appBin,
-                                       AnalyzerConstants.FUPD_APPLICATION);
-                       {
-                               List<ProfilingData> children = appBin.getChildList();
-                               makeChildTree(children, appBinInput, appBin.getName(),
+               
+               List<Integer> pids = getPidsOfProfileDataMakerMap();
+               for(int i = 0; i < pids.size(); i++)
+               {
+                       int pid = pids.get(i);
+                       if(selectedPid != 0 && selectedPid != pid) {
+                               continue;
+                       }
+                       ProfileDataMaker profiler = getProfileDataMakerByPid(pid);
+       
+                       ProfilingData appBin = profiler.getAppBin();
+                       if (null != appBin) {
+                               TreeInput appBinInput = makeInput(appBin, pid,
                                                AnalyzerConstants.FUPD_APPLICATION);
+                               {
+                                       List<ProfilingData> children = appBin.getChildList();
+                                       makeChildTree(children, appBinInput, appBin.getName(),
+                                                       pid, AnalyzerConstants.FUPD_APPLICATION);
+                               }
+                               output.add(appBinInput);
                        }
-                       output.add(appBinInput);
-               }
-
-               ProfilingData depLib = profiler.getDependentLib();
-               if (null != depLib) {
-                       TreeInput depLibInput = makeInput(depLib,
-                                       AnalyzerConstants.FUPD_DEPENDENT_LIB);
-                       {
-                               List<ProfilingData> children = depLib.getChildList();
-                               makeChildTree(children, depLibInput, depLib.getName(),
+       
+                       ProfilingData depLib = profiler.getDependentLib();
+                       if (null != depLib) {
+                               TreeInput depLibInput = makeInput(depLib, pid,
                                                AnalyzerConstants.FUPD_DEPENDENT_LIB);
+                               {
+                                       List<ProfilingData> children = depLib.getChildList();
+                                       makeChildTree(children, depLibInput, depLib.getName(),
+                                                       pid, AnalyzerConstants.FUPD_DEPENDENT_LIB);
+                               }
+                               output.add(depLibInput);
                        }
-                       output.add(depLibInput);
                }
-
                return output;
        }
 }
index cca66a9..880b370 100644 (file)
@@ -50,6 +50,7 @@ public class UIFunctionProfilingData {
 
        private String strCalssKeyName = null;
        private int strSequence = -1;
+       private int pid = -1;
        private long longTime = -1;
        private String strKey = null;
 
@@ -62,7 +63,6 @@ public class UIFunctionProfilingData {
        private String strInclCPUAvgTime = null;
        private String strInclEsapsedAvgTime = null;
        private String strExclEsapsedAvgTime = null;
-       private String strPId = null;
 
        private String strParent = null;
        private String strTreeKey = null;
@@ -155,7 +155,7 @@ public class UIFunctionProfilingData {
                return strTreeKey;
        }
 
-       public void setAPINamee(String data) {
+       public void setAPIName(String data) {
                strAPIName = data;
        }
 
@@ -254,12 +254,12 @@ public class UIFunctionProfilingData {
                return strExclEsapsedAvgTime;
        }
 
-       public String getPId() {
-               return strPId;
+       public int getPid() {
+               return pid;
        }
 
-       public void setPId(String strPId) {
-               this.strPId = strPId;
+       public void setPid(int pid) {
+               this.pid = pid;
        }
 
 }
index 963508b..cfda6b0 100644 (file)
@@ -82,8 +82,9 @@ public class UIFunctionProfilingDataChecker {
                        }
                        
                        UIFunctionProfilingData pd = new UIFunctionProfilingData();
+                       int pid = input.getProfileDataMaker().getPid();
                        ProfileDataMaker profiler = FunctionUsageProfiler.getInstance()
-                                       .getProfileDataMaker();
+                                       .getProfileDataMakerByPid(pid);
                        String exTime = CommonConstants.DASH, inTime = CommonConstants.DASH, exeTime = CommonConstants.DASH, inExeTime = CommonConstants.DASH, exAvgTime = CommonConstants.DASH, inAvgTime = CommonConstants.DASH, exeAvgTime = CommonConstants.DASH, inExeAvgTime = CommonConstants.DASH;
                        try {
                                exTime = profiler.getCpuTime(input, true);
@@ -106,9 +107,10 @@ public class UIFunctionProfilingDataChecker {
                                e.printStackTrace();
                        }
 
+                       pd.setPid(input.getProfileDataMaker().getPid());
                        pd.setSequence(input.getSequence());
                        pd.setKey(input.getKey());
-                       pd.setAPINamee(input.getName());
+                       pd.setAPIName(input.getName());
                        pd.setExclCPUTime(exTime);
                        pd.setInclCPUTime(inTime);
                        pd.setInclEsapsedTime(exeTime);
@@ -143,32 +145,36 @@ public class UIFunctionProfilingDataChecker {
        }
 
        public void updateUIApiTreeSet() {
-
-               ProfileDataMaker profiler = FunctionUsageProfiler.getInstance()
-                               .getProfileDataMaker();
-               if (profiler.getAppBin() == null) {
-                       return;
-               }
-               List<ProfilingData> children = profiler.getAppBin().getChildList()
-                               .get(0).getChildList();
-               int size = children.size();
-               getUIApiListFile();
-               for (int i = 0; i < size; i++) {
-                       if (i >= isUiApiCheckList.size()) {
-                               isUiApiCheckList.add(i, UI_API_TRUE);
+               List<Integer> pids = FunctionUsageProfiler.getInstance()
+                               .getPidsOfProfileDataMakerMap();
+               for(int i = 0; i < pids.size(); i++)
+               {
+                       ProfileDataMaker profiler = FunctionUsageProfiler.getInstance()
+                               .getProfileDataMakerByPid(pids.get(i));
+                       if (profiler.getAppBin() == null) {
+                               return;
                        }
-                       if (isUiApiCheckList.get(i).equals(UI_API_TRUE)) {
-                               ProfilingData data = children.get(i);
-                               if (addProfilingData(data)) {
-                                       isUiApiCheckList.add(i, UI_API_TRUE);
-                               } else {
-                                       isUiApiCheckList.add(i, UI_API_FALSE);
+                       List<ProfilingData> children = profiler.getAppBin().getChildList()
+                                       .get(0).getChildList();
+                       int size = children.size();
+                       getUIApiListFile();
+                       for (int j = 0; j < size; j++) {
+                               if (j >= isUiApiCheckList.size()) {
+                                       isUiApiCheckList.add(j, UI_API_TRUE);
+                               }
+                               if (isUiApiCheckList.get(j).equals(UI_API_TRUE)) {
+                                       ProfilingData data = children.get(j);
+                                       if (addProfilingData(data)) {
+                                               isUiApiCheckList.add(j, UI_API_TRUE);
+                                       } else {
+                                               isUiApiCheckList.add(j, UI_API_FALSE);
+                                       }
                                }
                        }
+                       UIDataManager tManager = UIDataManager.getInstance();
+                       tManager.getControlDataChecker()
+                                       .notificationFromUserInterfaceFunctionProfilingDataChecker();
                }
-               UIDataManager tManager = UIDataManager.getInstance();
-               tManager.getControlDataChecker()
-                               .notificationFromUserInterfaceFunctionProfilingDataChecker();
        }
 
        public void cleanUIProfilingMemberData() {
@@ -197,22 +203,23 @@ public class UIFunctionProfilingDataChecker {
        }
 
        public boolean existRootData(ProfilingData input) {
-               boolean exitRootData = false;
+               boolean existRootData = false;
                for (UIFunctionProfilingData data : getDataList()) {
                        if (data.getAPIName().equals(input.getParent())) {
-                               exitRootData = true;
+                               existRootData = true;
                                break;
                        }
                }
-               return exitRootData;
+               return existRootData;
        }
 
        private void makeRootParentData(ProfilingData input) {
                UIFunctionProfilingData pd = new UIFunctionProfilingData();
                String exTime = CommonConstants.DASH, inTime = CommonConstants.DASH, exeTime = CommonConstants.DASH, inExeTime = CommonConstants.DASH, exAvgTime = CommonConstants.DASH, inAvgTime = CommonConstants.DASH, exeAvgTime = CommonConstants.DASH, inExeAvgTime = CommonConstants.DASH;
+               pd.setPid(input.getProfileDataMaker().getPid());
                pd.setSequence(0);
                pd.setKey(input.getKey());
-               pd.setAPINamee(input.getParent());
+               pd.setAPIName(input.getParent());
                pd.setParent(CommonConstants.EMPTY);
                pd.setExclCPUTime(exTime);
                pd.setInclCPUTime(inTime);
index 84e82ad..a3946ae 100644 (file)
@@ -231,7 +231,13 @@ public class UIFunctionProfilingTable extends DATreeComposite {
                inputData.add(input.getCalssKeyName());
 
                tableData.getData().addAll(inputData);
-               tableData.setObject(input.getAPIName());
+               if(input.getParent().equals(CommonConstants.EMPTY)) {
+                       tableData.setObject(input.getAPIName() + CommonConstants.SPACE
+                                       + CommonConstants.OPEN_BRACKET  + input.getPid()
+                                       + CommonConstants.CLOSE_BRACKET);
+               } else {
+                       tableData.setObject(input.getAPIName());
+               }
 
                List<String> text = new ArrayList<String>();
                text.add(input.getAPIName());
@@ -284,18 +290,11 @@ public class UIFunctionProfilingTable extends DATreeComposite {
                int size = controlList.size();
                int nNodeDepth = 0;
                for (int i = 0; i < size; i++) {
-
                        int selectedPid = ToolbarArea.getInstance().getSelectedPid();
                        if (selectedPid != 0) {
-                               String parentName = controlList.get(i).getParent();
-                               String apiName = controlList.get(i).getAPIName();
-                               System.out.println("getParent : " + parentName + " apiName : "
-                                               + apiName);
-                               if (!parentName.contains(Integer.toString(selectedPid))) {
-                                       continue;
-                               }
-                               if (parentName.equals(CommonConstants.EMPTY)
-                                               && !apiName.contains(Integer.toString(selectedPid))) {
+                               int pid = controlList.get(i).getPid();
+                               
+                               if(pid != selectedPid) {
                                        continue;
                                }
                        }