protected List<TableInput> makeTableInput() {\r
List<TableInput> output = new ArrayList<TableInput>(); \r
List<List<Object>> allocDataList = null;\r
+ List<Integer> pidlist = new ArrayList<Integer>();\r
\r
if(Global.getProject() == null) {\r
return output;\r
}\r
\r
+ int[] pids = Global.getProject().getProcessIDs();\r
int targetPID = Toolbar.INSTANCE.getSelectedPid();\r
\r
- allocDataList = MemoryDataManager.getInstance().makeLeakDataForRange(0, 0, targetPID);\r
-\r
- if (allocDataList == null)\r
- return output;\r
+ if(targetPID > 0) {\r
+ pidlist.add(targetPID);\r
+ }\r
+ else {\r
+ for (int i = 0; i < pids.length; i++) {\r
+ pidlist.add(pids[i]);\r
+ } \r
+ }\r
\r
- int size = allocDataList.size();\r
- for (int i = 0; i < size; i++) {\r
- List<Object> iAllocData = allocDataList.get(i);\r
+ int index = 0;\r
+ for(int i = 0 ; i < pidlist.size() ; i++) {\r
+ allocDataList = MemoryDataManager.getInstance().makeLeakDataForRange(0, 0, pidlist.get(i));\r
+\r
+ if (allocDataList == null || allocDataList.size() == 0)\r
+ continue;\r
\r
- if (targetPID != 0) {\r
- if (targetPID != ((Integer) iAllocData.get(AllocateDBTable.COLUMN.PID.index)).intValue()) {\r
- continue;\r
+ int size = allocDataList.size();\r
+ for (int j = 0; j < size; j++) {\r
+ List<Object> iAllocData = allocDataList.get(j);\r
+ \r
+ if (pidlist.get(i) != 0) {\r
+ if (pidlist.get(i) != ((Integer) iAllocData.get(AllocateDBTable.COLUMN.PID.index)).intValue()) {\r
+ continue;\r
+ }\r
}\r
- }\r
\r
- TableInput alloInput = makeTreeInputForLeakData(iAllocData, i);\r
- \r
- if (alloInput != null){\r
- output.add(alloInput);\r
+ TableInput alloInput = makeTreeInputForLeakData(iAllocData, index++);\r
+ \r
+ if (alloInput != null){\r
+ output.add(alloInput);\r
+ }\r
}\r
}\r
\r
if(Global.getProject() == null) {\r
return output;\r
}\r
+ \r
+ TreeInput systemMemdata = makeSystemMemory();\r
+ if(systemMemdata == null)\r
+ return output;\r
+ \r
+ output.add(systemMemdata);\r
+ \r
List<Integer> pidlist = new ArrayList<Integer>();\r
keyindex = 0;\r
\r
} \r
}\r
\r
- TreeInput systemMemdata = makeSystemMemory();\r
- output.add(systemMemdata);\r
- \r
for(int i = 0 ; i < pidlist.size() ; i++) {\r
try {\r
TreeInput processMemdata = makeprocessMemory(pidlist.get(i)); \r
private TreeInput makeSystemMemory() { \r
List<Long> memorylist = MemoryDataManager.getInstance().getSystemMemoryMinMaxFromDB(0, 0);\r
\r
+ if(memorylist.size() == 0)\r
+ return null;\r
+ \r
List<Long> sorteddata = SortMemoryData(memorylist);\r
\r
DATableDataFormat tableData = new DATableDataFormat(keyindex++);\r