[SRADA-177] Implement Memory profiling page
authordongkyu6 lee <dongkyu6.lee@samsung.com>
Mon, 4 Apr 2016 01:24:09 +0000 (10:24 +0900)
committerdongkyu6 lee <dongkyu6.lee@samsung.com>
Mon, 4 Apr 2016 09:43:52 +0000 (18:43 +0900)
 - Added a column of memory section type
   : currently, Memory Map table shows only excutable section.
   : it can make develop confuse, so this column is added.
 - Refactoring at memory data manager

Change-Id: I13e41ef7da06ffb2a88fdafc2883b5c1f3d22dc7

org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/nl/MemoryPageLabels.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/nl/MemoryPageLabels.properties
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/memory/MemoryDetailsTableView.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/memory/MemoryMapView.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/memory/data/MemoryDataManager.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/memory/table/MemoryDetailsTable.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/memory/table/MemoryMapTable.java [changed mode: 0644->0755]

index e5c30ee..aa3f13a 100755 (executable)
@@ -41,10 +41,10 @@ public class MemoryPageLabels extends NLS {
        public static String MEMORY_CHART_SYSTEM_MEMORY;
        
        public static String MEMORY_MEMORYMAP_LIBNAME;
-       public static String MEMORY_MEMORYMAP_ADDRESS;
        public static String MEMORY_MEMORYMAP_ADDRESS_LOW;
        public static String MEMORY_MEMORYMAP_ADDRESS_HIGH;
        public static String MEMORY_MEMORYMAP_SIZE;
+       public static String MEMORY_MEMORYMAP_TYPE;
        
        static {
                // initialize resource bundle
index a0d6eca..8ac7308 100755 (executable)
@@ -30,10 +30,10 @@ MEMORY_ALLOCATION_TRACE_VIEW_LIBRARY=Library
 MEMORY_ALLOCATION_TRACE_VIEW_CALLER_FUNCTION=Caller Function\r
 \r
 MEMORY_MEMORYMAP_LIBNAME=Name\r
-MEMORY_MEMORYMAP_ADDRESS=Address\r
 MEMORY_MEMORYMAP_ADDRESS_LOW=Low-address\r
 MEMORY_MEMORYMAP_ADDRESS_HIGH=High-address\r
 MEMORY_MEMORYMAP_SIZE=Size\r
+MEMORY_MEMORYMAP_TYPE=Type\r
 \r
 MEMORY_CHART_HEAP_MEMORY=Heap allocation\r
 MEMORY_CHART_PROCESS_MEMORY=Process Size\r
index cceedf2..9df6d74 100755 (executable)
@@ -81,10 +81,10 @@ public class MemoryDetailsTableView extends DAViewComposite {
                DASelectionData selData = (DASelectionData) vdata;
                
                if(selData.getStartTime() == selData.getEndTime()) {
-                       tableComp.setSelectionRange((long)0, (long)0);
+                       tableComp.setSelectionRange((long)0, (long)0, selData.getStartTime());
                }
                else {
-                       tableComp.setSelectionRange(selData.getStartTime(), selData.getEndTime());
+                       tableComp.setSelectionRange(selData.getStartTime(), selData.getEndTime(), (long) -1);
                }
                
                tableComp.updateTable();
index 301f9d2..7d987f3 100755 (executable)
@@ -29,7 +29,6 @@ import org.eclipse.swt.layout.FillLayout;
 import org.eclipse.swt.widgets.Composite;
 import org.eclipse.swt.widgets.Control;
 import org.tizen.dynamicanalyzer.common.AnalyzerManager;
-import org.tizen.dynamicanalyzer.common.DASelectionData;
 import org.tizen.dynamicanalyzer.nl.MemoryPageLabels;
 import org.tizen.dynamicanalyzer.resources.ColorResources;
 import org.tizen.dynamicanalyzer.ui.memory.table.MemoryMapTable;
@@ -66,10 +65,7 @@ public class MemoryMapView extends DAViewComposite {
        
        @Override
        public void updateView(DAViewData data) {
-               //if (data instanceof DASelectionData == false) {
-               //      return;
-               //}
-               //DASelectionData seldata = (DASelectionData) data;
+
        }
        
        @Override
index ac030c0..d68cafe 100755 (executable)
@@ -206,7 +206,7 @@ public class MemoryDataManager extends PageDataManager {
                }\r
        }\r
 \r
-       public void makeAllocData(MemoryData log) {\r
+       private void makeAllocData(MemoryData log) {\r
                ArrayList<Object> dbAllocData = new ArrayList<Object>();\r
 \r
                MemoryData mData = log;\r
@@ -228,7 +228,7 @@ public class MemoryDataManager extends PageDataManager {
                memoryAllocDataList.add(dbAllocData);\r
        }\r
 \r
-       public void makeFreeData(MemoryData log) {\r
+       private void makeFreeData(MemoryData log) {\r
                ArrayList<Object> dbFreeData = new ArrayList<Object>();\r
 \r
                MemoryData mData = log;\r
@@ -242,6 +242,157 @@ public class MemoryDataManager extends PageDataManager {
                memoryfreeDataList.add(dbFreeData);\r
        }\r
 \r
+       private void GetAllocationData(List<LogData> memoryLogList) {\r
+               int size = memoryLogList.size();\r
+               for (int i = 0; i < size; i++) {\r
+                       MemoryData logData = (MemoryData) memoryLogList.get(i);\r
+                       if (allocByteMap.get(logData.getPid()) == null) {\r
+                               allocByteMap.put(Integer.valueOf(logData.getPid()), new Long(0));\r
+                               libraryAllocByteMap.put(Integer.valueOf(logData.getPid()), new HashMap<Integer, Long>());\r
+                       }\r
+\r
+                       int memApiType = logData.getMemoryApiType();\r
+                       int internalFlag = logData.getInternalCall();\r
+                       long errorNo = logData.getErrno();\r
+               \r
+                       /*\r
+                        * Check library allocation\r
+                        */\r
+                       BinaryInfo binaryInfo = null;\r
+                       Project project = Global.getProject();\r
+                       ProcessMemoryMap pmap = project.getProcessInformation(logData.getPid()).getProcessMemoryMap(logData.getTime());\r
+\r
+                       if (pmap != null) {\r
+                               LibraryObject lib = pmap.getLibraryByAddress(logData.getCallerPcAddr());\r
+                               if (lib != null && lib != pmap.getMainbinary()) {\r
+                                       binaryInfo = project.getDeviceStatusInfo().getBinaryInfo(lib.getBinaryID());\r
+                               }\r
+                       }\r
+\r
+                       if (errorNo == 0 && MEM_USER == internalFlag) {\r
+                               if (MEM_API_TYPE_ALLOC == memApiType || MEM_API_TYPE_FREE == memApiType) {\r
+                                       addNewSeriesUserAllocData(memApiType, logData, binaryInfo);\r
+                               }\r
+                       }\r
+\r
+                       /*\r
+                        * Save allocation and free api call \r
+                        */\r
+                       if(MEM_API_TYPE_ALLOC == memApiType) {\r
+                               makeAllocData(logData);\r
+                       }\r
+                       else if(MEM_API_TYPE_FREE == memApiType) {\r
+                               makeFreeData(logData);\r
+                       }\r
+               }\r
+\r
+       }\r
+\r
+       private void GetSystemMemoryData(List<LogData> systemLogList) {\r
+               ArrayList<List<Object>> systemDataList = new ArrayList<List<Object>>();\r
+               ArrayList<List<Object>> targetProcessDataList = new ArrayList<List<Object>>();\r
+\r
+               int size = systemLogList.size();\r
+               for (int i = 0; i < size; i++) {\r
+                       SystemData log = (SystemData) systemLogList.get(i);\r
+                       \r
+                       /*\r
+                        * Make information for other process\r
+                        */\r
+                       List<Object> pIDList = new ArrayList<Object>();\r
+                       List<Object> processLoadList = new ArrayList<Object>();\r
+                       String[] processLoadDatas = log.getOtherProcessLoad().split(CommonConstants.COMMA);\r
+                       for (int ii = 0; ii < processLoadDatas.length; ii++) {\r
+                               String processLoad = processLoadDatas[ii];\r
+                               if (processLoad == null || processLoad.isEmpty()) {\r
+                                       continue;\r
+                               }\r
+                               pIDList.add(new Integer(processLoad));\r
+                               processLoadList.add(processLoadDatas[++ii]);\r
+                       }\r
+\r
+                       /*\r
+                        * Make SystemData Table data\r
+                        */\r
+                       ArrayList<Object> dbSystemData = new ArrayList<Object>();\r
+                       dbSystemData.add(new Long(log.getTime()));\r
+                       dbSystemData.add(new Long(log.getSystemMemoryUsed()));\r
+                       dbSystemData.add(pIDList);\r
+                       dbSystemData.add(processLoadList);\r
+                       systemDataList.add(dbSystemData);\r
+\r
+                       /*\r
+                        * Make target Process Table data\r
+                        */\r
+                       ProcessProfileData[] targetProcessList = log.getProcessProfileDataList();\r
+                       if (targetProcessList != null) {\r
+                               for (int j = 0; j < targetProcessList.length; j++) {\r
+                                       ProcessProfileData process = targetProcessList[j];\r
+\r
+                                       ArrayList<Object> dbTargetProcessData = new ArrayList<Object>();\r
+                                       dbTargetProcessData.add(new Long(log.getTime()));\r
+                                       dbTargetProcessData.add(new Integer(process.getPid()));\r
+                                       dbTargetProcessData.add(new Float(process.getProcessLoad()));\r
+                                       dbTargetProcessData.add(new Long(process.getVirtualMemory()));\r
+                                       dbTargetProcessData.add(new Long(process.getResidentMemory()));\r
+                                       dbTargetProcessData.add(new Long(process.getSharedMemory()));\r
+                                       dbTargetProcessData.add(new Long(process.getPssMemory()));\r
+                                       dbTargetProcessData.add(new Integer(process.getThreadCount()));\r
+                                       dbTargetProcessData.add(new Long(process.getTotalAllocSize()));\r
+\r
+                                       /*\r
+                                        * Set inform for Heap allocation\r
+                                        */\r
+                                       List<Object> binaryIDList = new ArrayList<Object>();\r
+                                       List<Object> allocByteList = new ArrayList<Object>();\r
+                                       binaryIDList.add(appAllocSeriesID);\r
+                                       if (allocByteMap.get(process.getPid()) == null) {\r
+                                               allocByteList.add(new Long(0));\r
+                                       } else {\r
+                                               allocByteList.add(allocByteMap.get(process.getPid()));\r
+                                       }\r
+\r
+                                       Map<Integer, Long> libraryList = libraryAllocByteMap.get(process.getPid());\r
+                                       if (libraryList == null) {\r
+                                               libraryList = new HashMap<Integer, Long>();\r
+                                       }\r
+\r
+                                       Iterator<Integer> iter = libraryList.keySet().iterator();\r
+                                       while (iter.hasNext()) {\r
+                                               Integer binaryID = iter.next();\r
+                                               binaryIDList.add(binaryID);\r
+                                               allocByteList.add(libraryList.get(binaryID));\r
+                                       }\r
+                                       dbTargetProcessData.add(binaryIDList);\r
+                                       dbTargetProcessData.add(allocByteList);\r
+\r
+                                       /*\r
+                                        * Set inform for Thread\r
+                                        */\r
+                                       List<Object> threadIdList = new ArrayList<Object>();\r
+                                       List<Object> threadLoadList = new ArrayList<Object>();\r
+                                       // TODO Remove unnecessary String parsing. first Fix in SystemData.java\r
+                                       String[] threadLoads = process.getThreadLoad().split(CommonConstants.COMMA);\r
+                                       for (int iii = 0; iii < threadLoads.length; iii++) {\r
+                                               String threadLoad = threadLoads[iii];\r
+                                               if (threadLoad == null || threadLoad.isEmpty()) {\r
+                                                       continue;\r
+                                               }\r
+                                               threadIdList.add(new Integer(threadLoad));\r
+                                               threadLoadList.add(threadLoads[++iii]);\r
+                                       }\r
+                                       dbTargetProcessData.add(threadIdList);\r
+                                       dbTargetProcessData.add(threadLoadList);\r
+\r
+                                       targetProcessDataList.add(dbTargetProcessData);\r
+                               }\r
+                       }\r
+               }\r
+               \r
+               systemMemoryDBInserter.pushData(systemDataList);\r
+               processMemoryDBInserter.pushData(targetProcessDataList);\r
+       }\r
+\r
        public List<List<Object>> getSystemDataFromDB(long start, long end) {\r
                String where = "WHERE SAMPLING_TIME BETWEEN " + start + " AND " + end\r
                                + " ORDER BY SAMPLING_TIME";\r
@@ -266,47 +417,28 @@ public class MemoryDataManager extends PageDataManager {
                return output;\r
        }\r
        \r
-       public List<Long> getColumnLongFromDB(String tableName, String columnName, String timecolumn, long start, long end) {\r
-               List<Long> output = new ArrayList<Long>();\r
-               String query;\r
-               \r
-               if(start == 0 && end == 0) {\r
-                       query = String.format("SELECT %s FROM %s",\r
-                                       columnName, tableName);\r
-               }\r
-               else {\r
-                       query = String.format("SELECT %s FROM %s WHERE %s BETWEEN %s and %s",\r
-                                       columnName, tableName, timecolumn, start, end);\r
-               }\r
-               \r
-               ResultSet rs = SqlConnectionManager.executeQueryRS(query);\r
-               if (rs != null) {\r
-                       try {\r
-                               while (rs.next()) {\r
-                                       output.add(rs.getLong(1));\r
-                               }\r
-                       } catch (SQLException e) {\r
-                               Logger.exception(e);\r
-                       } finally {\r
-                               SqlConnectionManager.releaseResultSet(rs);\r
-                       }\r
-               }\r
-               \r
-               return output;\r
+       public List<Long> getColumnLongFromDB(String tableName, String columnName, String timecolumn, long start, long end) {           \r
+               return getColumnLongFromDB(tableName, columnName, timecolumn, 0, start, end);\r
        }\r
        \r
-       public List<Long> getColumnLongFromDB(String tableName, String columnName, String timecolumn, \r
-                       int targetID, long start, long end) {\r
+       public List<Long> getColumnLongFromDB(String tableName, String columnName, String timecolumn, int targetID, long start, long end) {\r
                List<Long> output = new ArrayList<Long>();\r
                String query;\r
                \r
                if(start == 0 && end == 0) {\r
-                       query = String.format("SELECT %s FROM %s WHERE PID = %s",\r
-                                       columnName, tableName, targetID);\r
+                       query = String.format("SELECT %s FROM %s", columnName, tableName);\r
+                       \r
+                       if(targetID != 0) {\r
+                               query += " WHERE PID = " + targetID;\r
+                       }\r
                }\r
                else {\r
-                       query = String.format("SELECT %s FROM %s WHERE %s BETWEEN %s and %s AND PID = %s",\r
+                       query = String.format("SELECT %s FROM %s WHERE %s BETWEEN %s AND %s",\r
                                        columnName, tableName, timecolumn, start, end, targetID);\r
+                       \r
+                       if(targetID != 0) {\r
+                               query += " AND PID = " + targetID;\r
+                       }\r
                }\r
                \r
                ResultSet rs = SqlConnectionManager.executeQueryRS(query);\r
@@ -358,8 +490,7 @@ public class MemoryDataManager extends PageDataManager {
                return processedResult;\r
        }\r
        \r
-       public Map<Integer, List<List<Object>>> getTargetProcessDataMapFromDB(long start, long end,\r
-                       int targetPID) {\r
+       public Map<Integer, List<List<Object>>> getTargetProcessDataMapFromDB(long start, long end, int targetPID) {\r
                Map<Integer, List<List<Object>>> processedResult = new HashMap<Integer, List<List<Object>>>();\r
                String where = "WHERE SAMPLING_TIME BETWEEN " + start + " AND " + end;\r
                if (targetPID > 0) {\r
@@ -387,7 +518,29 @@ public class MemoryDataManager extends PageDataManager {
                return processedResult;\r
        }\r
 \r
-       public long getProcessMemoriesFromDB(long time) {\r
+       public List<Long> getProcessMemoriesFromDB(long time) {\r
+               List<Long> processMemories = new ArrayList<Long>();\r
+               \r
+               String query = "SELECT MEMORY_RESIDENT FROM MEMORY_PROCESS_DATA WHERE SAMPLING_TIME = "\r
+                               + "(SELECT MAX(SAMPLING_TIME) FROM MEMORY_PROCESS_DATA WHERE SAMPLING_TIME <= "\r
+                               + time + ")";\r
+               \r
+               ResultSet rs = SqlConnectionManager.executeQueryRS(query);\r
+               if (rs != null) {\r
+                       try {\r
+                               while (rs.next()) {\r
+                                       processMemories.add(rs.getLong(1));\r
+                               }\r
+                       } catch (SQLException e) {\r
+                               Logger.exception(e);\r
+                       } finally {\r
+                               SqlConnectionManager.releaseResultSet(rs);\r
+                       }\r
+               }\r
+               return processMemories;\r
+       }\r
+       \r
+       public long getSystemMemoriesFromDB(long time) {\r
                long processMemories = 0;\r
                String query = "SELECT MEMORY_RESIDENT FROM MEMORY_PROCESS_DATA WHERE SAMPLING_TIME = "\r
                                + "(SELECT MAX(SAMPLING_TIME) FROM MEMORY_PROCESS_DATA WHERE SAMPLING_TIME <= "\r
@@ -489,155 +642,4 @@ public class MemoryDataManager extends PageDataManager {
 \r
                return allocData;\r
        }\r
-\r
-       private void GetAllocationData(List<LogData> memoryLogList) {\r
-               int size = memoryLogList.size();\r
-               for (int i = 0; i < size; i++) {\r
-                       MemoryData logData = (MemoryData) memoryLogList.get(i);\r
-                       if (allocByteMap.get(logData.getPid()) == null) {\r
-                               allocByteMap.put(Integer.valueOf(logData.getPid()), new Long(0));\r
-                               libraryAllocByteMap.put(Integer.valueOf(logData.getPid()), new HashMap<Integer, Long>());\r
-                       }\r
-\r
-                       int memApiType = logData.getMemoryApiType();\r
-                       int internalFlag = logData.getInternalCall();\r
-                       long errorNo = logData.getErrno();\r
-               \r
-                       /*\r
-                        * Check library allocation\r
-                        */\r
-                       BinaryInfo binaryInfo = null;\r
-                       Project project = Global.getProject();\r
-                       ProcessMemoryMap pmap = project.getProcessInformation(logData.getPid()).getProcessMemoryMap(logData.getTime());\r
-\r
-                       if (pmap != null) {\r
-                               LibraryObject lib = pmap.getLibraryByAddress(logData.getCallerPcAddr());\r
-                               if (lib != null && lib != pmap.getMainbinary()) {\r
-                                       binaryInfo = project.getDeviceStatusInfo().getBinaryInfo(lib.getBinaryID());\r
-                               }\r
-                       }\r
-\r
-                       if (errorNo == 0 && MEM_USER == internalFlag) {\r
-                               if (MEM_API_TYPE_ALLOC == memApiType || MEM_API_TYPE_FREE == memApiType) {\r
-                                       addNewSeriesUserAllocData(memApiType, logData, binaryInfo);\r
-                               }\r
-                       }\r
-\r
-                       /*\r
-                        * Save allocation and free api call \r
-                        */\r
-                       if(MEM_API_TYPE_ALLOC == memApiType) {\r
-                               makeAllocData(logData);\r
-                       }\r
-                       else if(MEM_API_TYPE_FREE == memApiType) {\r
-                               makeFreeData(logData);\r
-                       }\r
-               }\r
-\r
-       }\r
-\r
-       private void GetSystemMemoryData(List<LogData> systemLogList) {\r
-               ArrayList<List<Object>> systemDataList = new ArrayList<List<Object>>();\r
-               ArrayList<List<Object>> targetProcessDataList = new ArrayList<List<Object>>();\r
-\r
-               int size = systemLogList.size();\r
-               for (int i = 0; i < size; i++) {\r
-                       SystemData log = (SystemData) systemLogList.get(i);\r
-                       \r
-                       /*\r
-                        * Make information for other process\r
-                        */\r
-                       List<Object> pIDList = new ArrayList<Object>();\r
-                       List<Object> processLoadList = new ArrayList<Object>();\r
-                       String[] processLoadDatas = log.getOtherProcessLoad().split(CommonConstants.COMMA);\r
-                       for (int ii = 0; ii < processLoadDatas.length; ii++) {\r
-                               String processLoad = processLoadDatas[ii];\r
-                               if (processLoad == null || processLoad.isEmpty()) {\r
-                                       continue;\r
-                               }\r
-                               pIDList.add(new Integer(processLoad));\r
-                               processLoadList.add(processLoadDatas[++ii]);\r
-                       }\r
-\r
-                       /*\r
-                        * Make SystemData Table data\r
-                        */\r
-                       ArrayList<Object> dbSystemData = new ArrayList<Object>();\r
-                       dbSystemData.add(new Long(log.getTime()));\r
-                       dbSystemData.add(new Long(log.getSystemMemoryUsed()));\r
-                       dbSystemData.add(pIDList);\r
-                       dbSystemData.add(processLoadList);\r
-                       systemDataList.add(dbSystemData);\r
-\r
-                       /*\r
-                        * Make target Process Table data\r
-                        */\r
-                       ProcessProfileData[] targetProcessList = log.getProcessProfileDataList();\r
-                       if (targetProcessList != null) {\r
-                               for (int j = 0; j < targetProcessList.length; j++) {\r
-                                       ProcessProfileData process = targetProcessList[j];\r
-\r
-                                       ArrayList<Object> dbTargetProcessData = new ArrayList<Object>();\r
-                                       dbTargetProcessData.add(new Long(log.getTime()));\r
-                                       dbTargetProcessData.add(new Integer(process.getPid()));\r
-                                       dbTargetProcessData.add(new Float(process.getProcessLoad()));\r
-                                       dbTargetProcessData.add(new Long(process.getVirtualMemory()));\r
-                                       dbTargetProcessData.add(new Long(process.getResidentMemory()));\r
-                                       dbTargetProcessData.add(new Long(process.getSharedMemory()));\r
-                                       dbTargetProcessData.add(new Long(process.getPssMemory()));\r
-                                       dbTargetProcessData.add(new Integer(process.getThreadCount()));\r
-                                       dbTargetProcessData.add(new Long(process.getTotalAllocSize()));\r
-\r
-                                       /*\r
-                                        * Set inform for Heap allocation\r
-                                        */\r
-                                       List<Object> binaryIDList = new ArrayList<Object>();\r
-                                       List<Object> allocByteList = new ArrayList<Object>();\r
-                                       binaryIDList.add(appAllocSeriesID);\r
-                                       if (allocByteMap.get(process.getPid()) == null) {\r
-                                               allocByteList.add(new Long(0));\r
-                                       } else {\r
-                                               allocByteList.add(allocByteMap.get(process.getPid()));\r
-                                       }\r
-\r
-                                       Map<Integer, Long> libraryList = libraryAllocByteMap.get(process.getPid());\r
-                                       if (libraryList == null) {\r
-                                               libraryList = new HashMap<Integer, Long>();\r
-                                       }\r
-\r
-                                       Iterator<Integer> iter = libraryList.keySet().iterator();\r
-                                       while (iter.hasNext()) {\r
-                                               Integer binaryID = iter.next();\r
-                                               binaryIDList.add(binaryID);\r
-                                               allocByteList.add(libraryList.get(binaryID));\r
-                                       }\r
-                                       dbTargetProcessData.add(binaryIDList);\r
-                                       dbTargetProcessData.add(allocByteList);\r
-\r
-                                       /*\r
-                                        * Set inform for Thread\r
-                                        */\r
-                                       List<Object> threadIdList = new ArrayList<Object>();\r
-                                       List<Object> threadLoadList = new ArrayList<Object>();\r
-                                       // TODO Remove unnecessary String parsing. first Fix in SystemData.java\r
-                                       String[] threadLoads = process.getThreadLoad().split(CommonConstants.COMMA);\r
-                                       for (int iii = 0; iii < threadLoads.length; iii++) {\r
-                                               String threadLoad = threadLoads[iii];\r
-                                               if (threadLoad == null || threadLoad.isEmpty()) {\r
-                                                       continue;\r
-                                               }\r
-                                               threadIdList.add(new Integer(threadLoad));\r
-                                               threadLoadList.add(threadLoads[++iii]);\r
-                                       }\r
-                                       dbTargetProcessData.add(threadIdList);\r
-                                       dbTargetProcessData.add(threadLoadList);\r
-\r
-                                       targetProcessDataList.add(dbTargetProcessData);\r
-                               }\r
-                       }\r
-               }\r
-               \r
-               systemMemoryDBInserter.pushData(systemDataList);\r
-               processMemoryDBInserter.pushData(targetProcessDataList);\r
-       }\r
 }\r
index 992244f..b85192b 100755 (executable)
@@ -58,7 +58,8 @@ public class MemoryDetailsTable extends DATreeComposite {
        \r
        private int keyindex = 0;\r
        private Long StartTime;\r
-       private Long EndTime;
+       private Long EndTime;\r
+       private Long Current;
        
        private String[] columnNames = { 
                        MemoryPageLabels.MEMORY_DETAILS_VIEW_ITEM,
@@ -81,6 +82,7 @@ public class MemoryDetailsTable extends DATreeComposite {
 \r
                StartTime = (long)0;\r
                EndTime = (long)0;\r
+               Current = (long) -1;\r
 \r
                setTableName(MemoryPageLabels.MEMORY_DETAILS_VIEW_TITLE);\r
                setComparator(new DefaultTableComparator());\r
@@ -117,9 +119,10 @@ public class MemoryDetailsTable extends DATreeComposite {
                });\r
        }\r
        \r
-       public void setSelectionRange(Long start, Long end) {\r
+       public void setSelectionRange(Long start, Long end, Long current) {\r
                StartTime = start;\r
                EndTime = end;\r
+               Current = current;\r
        }\r
 \r
        @Override\r
old mode 100644 (file)
new mode 100755 (executable)
index 0178fb5..1209973
@@ -46,19 +46,20 @@ import org.tizen.dynamicanalyzer.ui.widgets.table.TableColumnSizePackListener;
 
 public class MemoryMapTable extends DATableComposite {
        
-       private int[] columnSizes = { 60, 150, 80, 80};
-       private boolean[] columnVisibility = { true, true, true, true };
-       private int[] columnAlignment = { SWT.LEFT, SWT.LEFT, SWT.LEFT, SWT.LEFT };
+       private int[] columnSizes = { 40, 60, 150, 80, 80};
+       private boolean[] columnVisibility = { true, true, true, true, true };
+       private int[] columnAlignment = { SWT.CENTER, SWT.LEFT, SWT.LEFT, SWT.LEFT, SWT.LEFT };
        
        private String[] columnNames = { 
+                       MemoryPageLabels.MEMORY_MEMORYMAP_TYPE,
                        MemoryPageLabels.MEMORY_MEMORYMAP_SIZE,
                        MemoryPageLabels.MEMORY_MEMORYMAP_LIBNAME,
                        MemoryPageLabels.MEMORY_MEMORYMAP_ADDRESS_LOW,
                        MemoryPageLabels.MEMORY_MEMORYMAP_ADDRESS_HIGH
        };
        
-       int[] sortTypes = { AnalyzerConstants.SORT_TYPE_NUM, AnalyzerConstants.SORT_TYPE_STRING, AnalyzerConstants.SORT_TYPE_NUM,
-                       AnalyzerConstants.SORT_TYPE_NUM };
+       int[] sortTypes = { AnalyzerConstants.SORT_TYPE_STRING, AnalyzerConstants.SORT_TYPE_NUM, AnalyzerConstants.SORT_TYPE_STRING, 
+                       AnalyzerConstants.SORT_TYPE_NUM, AnalyzerConstants.SORT_TYPE_NUM };
 
        public MemoryMapTable(Composite parent, int style, int tableStyle) {
                super(parent, style, tableStyle);
@@ -75,7 +76,7 @@ public class MemoryMapTable extends DATableComposite {
                setTableToolTipEnable(false);
                
                comparator.setType(AnalyzerConstants.SORT_TYPE_NUM);
-               comparator.setColumn(0);
+               comparator.setColumn(1);
                
                parent.addControlListener(new TableColumnSizePackListener(this, columnSizes));
        }
@@ -133,8 +134,11 @@ public class MemoryMapTable extends DATableComposite {
                
                Long Low = (Long) low;
                Long High = (Long) high;
-               
                Long size = High - Low;
+               
+               text.add("r-x-");
+               data.add("r-x-");
+               
                text.add(Long.toString(size));
                data.add(size);