public static String MEMORY_CHART_PROCESS_MEMORY;
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;
static {
// initialize resource bundle
MEMORY_ALLOCATION_TRACE_VIEW_LIBRARY=Library\r
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\r
+MEMORY_MEMORYMAP_ADDRESS_HIGH=High\r
+\r
MEMORY_CHART_HEAP_MEMORY=Heap allocation\r
MEMORY_CHART_PROCESS_MEMORY=Process Size\r
MEMORY_CHART_SYSTEM_MEMORY=Memory
\ No newline at end of file
+/*
+ * Dynamic Analyzer
+ *
+ * Copyright (c) 2000 - 2016 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact:
+ * Dongkye Lee <dongkyu6.lee@samsung.com>
+ * Jaeyong Lee <jae-yong.lee@@samsung.com>
+ * Gihun Chang <gihun.chang@@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
package org.tizen.dynamicanalyzer.ui.memory;
import org.eclipse.swt.SWT;
-package org.tizen.dynamicanalyzer.ui.memory;
+/*
+ * Dynamic Analyzer
+ *
+ * Copyright (c) 2000 - 2016 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact:
+ * Dongkye Lee <dongkyu6.lee@samsung.com>
+ * Jaeyong Lee <jae-yong.lee@@samsung.com>
+ * Gihun Chang <gihun.chang@@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
-import java.util.List;
+package org.tizen.dynamicanalyzer.ui.memory;
-import org.eclipse.nebula.widgets.grid.Grid;
import org.eclipse.nebula.widgets.grid.GridItem;
import org.eclipse.swt.SWT;
import org.eclipse.swt.layout.FillLayout;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Text;
-import org.tizen.dynamicanalyzer.common.AnalyzerConstants;
-import org.tizen.dynamicanalyzer.common.AnalyzerManager;
import org.tizen.dynamicanalyzer.common.DASelectionData;
import org.tizen.dynamicanalyzer.constant.CommonConstants;
-import org.tizen.dynamicanalyzer.nl.InformationViewLabels;
import org.tizen.dynamicanalyzer.nl.MemoryPageLabels;
import org.tizen.dynamicanalyzer.resources.ColorResources;
import org.tizen.dynamicanalyzer.resources.FontResources;
-import org.tizen.dynamicanalyzer.swap.model.data.LogData;
-import org.tizen.dynamicanalyzer.ui.widgets.table.DATableComposite;
-import org.tizen.dynamicanalyzer.ui.widgets.table.DATableDataFormat;
-import org.tizen.dynamicanalyzer.ui.widgets.table.DATreeComposite;
-import org.tizen.dynamicanalyzer.ui.widgets.table.DAWindowingTableComposite;
import org.tizen.dynamicanalyzer.widgets.da.view.DAViewComposite;
import org.tizen.dynamicanalyzer.widgets.da.view.DAViewData;
+/*
+ * Dynamic Analyzer
+ *
+ * Copyright (c) 2000 - 2016 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact:
+ * Dongkye Lee <dongkyu6.lee@samsung.com>
+ * Jaeyong Lee <jae-yong.lee@@samsung.com>
+ * Gihun Chang <gihun.chang@@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
package org.tizen.dynamicanalyzer.ui.memory;
import org.eclipse.swt.custom.StackLayout;
import org.tizen.dynamicanalyzer.nl.MemoryPageLabels;
import org.tizen.dynamicanalyzer.resources.ColorResources;
import org.tizen.dynamicanalyzer.resources.FontResources;
-import org.tizen.dynamicanalyzer.swap.model.data.LogData;
import org.tizen.dynamicanalyzer.ui.common.SetRangeMarkerMouseMoveListener;
import org.tizen.dynamicanalyzer.ui.common.UICommonConstants;
import org.tizen.dynamicanalyzer.ui.memory.chart.MemoryChartBoard;
-import org.tizen.dynamicanalyzer.ui.memory.data.MemoryDataManager;
import org.tizen.dynamicanalyzer.ui.range.RangeDataManager;
import org.tizen.dynamicanalyzer.ui.timeline.common.TimelineConstants;
import org.tizen.dynamicanalyzer.ui.timeline.logparser.LifecycleLogParser;
@Override
public void updateView(DAViewData data) {
memoryChartBoard.updateChart();
- if (data instanceof DASelectionData == false) {
- return;
- }
}
@Override
+/*
+ * Dynamic Analyzer
+ *
+ * Copyright (c) 2000 - 2016 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact:
+ * Dongkye Lee <dongkyu6.lee@samsung.com>
+ * Jaeyong Lee <jae-yong.lee@@samsung.com>
+ * Gihun Chang <gihun.chang@@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
package org.tizen.dynamicanalyzer.ui.memory;
import org.eclipse.swt.SWT;
+/*
+ * Dynamic Analyzer
+ *
+ * Copyright (c) 2000 - 2016 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact:
+ * Dongkye Lee <dongkyu6.lee@samsung.com>
+ * Jaeyong Lee <jae-yong.lee@@samsung.com>
+ * Gihun Chang <gihun.chang@@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
package org.tizen.dynamicanalyzer.ui.memory;
-import org.eclipse.nebula.widgets.grid.GridItem;
import org.eclipse.swt.SWT;
import org.eclipse.swt.layout.FillLayout;
-import org.eclipse.swt.layout.FormAttachment;
-import org.eclipse.swt.layout.FormData;
-import org.eclipse.swt.layout.FormLayout;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Text;
+import org.tizen.dynamicanalyzer.common.AnalyzerManager;
import org.tizen.dynamicanalyzer.common.DASelectionData;
-import org.tizen.dynamicanalyzer.constant.CommonConstants;
import org.tizen.dynamicanalyzer.nl.MemoryPageLabels;
import org.tizen.dynamicanalyzer.resources.ColorResources;
-import org.tizen.dynamicanalyzer.resources.FontResources;
-import org.tizen.dynamicanalyzer.ui.network.data.type.NetworkAPIType;
-import org.tizen.dynamicanalyzer.ui.widgets.table.DATableDataFormat;
+import org.tizen.dynamicanalyzer.ui.memory.table.MemoryMapTable;
import org.tizen.dynamicanalyzer.widgets.da.view.DAViewComposite;
import org.tizen.dynamicanalyzer.widgets.da.view.DAViewData;
public class MemoryMapView extends DAViewComposite {
- private Composite contents = null;
- private Text detailText = null;
- private Label labelMessage = null;
- private void init() {
- detailText.setText(CommonConstants.EMPTY);
- }
+ public static final String ID = MemoryDetailsTableView.class.getName();
+
+ MemoryMapTable tableComp = null;
- public MemoryMapView(Composite parent, int style) {
+ public MemoryMapView(Composite parent, int style) {
super(parent, style, true);
this.setLayout(new FillLayout());
-
setTitle(MemoryPageLabels.MEMORY_MAP_VIEW_TITLE);
-
- Composite detailCom = getContentArea();
- detailCom.setBackground(ColorResources.VIEW_BG_COLOR);
- detailCom.setLayout(new FormLayout());
- FormData labelData = new FormData();
- labelData.top = new FormAttachment(0, 0);
- labelData.left = new FormAttachment(0, 0);
- labelData.right = new FormAttachment(100, 0);
- labelData.bottom = new FormAttachment(100, 0);
- detailCom.setLayoutData(labelData);
-
- Composite contents = detailCom;
- contents.setBackground(ColorResources.VIEW_BG_COLOR);
- contents.setLayout(new FormLayout());
-
- detailText = new Text(contents, SWT.BORDER | SWT.V_SCROLL | SWT.H_SCROLL);
- detailText.setBackground(ColorResources.VIEW_BG_COLOR);
- detailText.setForeground(ColorResources.TABLE_CONTENTS_FONT_COLOR);
- detailText.setFont(FontResources.DETAIL_INFO_FONT);
-
- FormData buttonData = new FormData();
- buttonData.top = new FormAttachment(labelMessage, 0);
- buttonData.left = new FormAttachment(0, 0);
- buttonData.right = new FormAttachment(100, 0);
- buttonData.bottom = new FormAttachment(100, 0);
- detailText.setLayoutData(buttonData);
- detailText.getVerticalBar().setVisible(true);
- detailText.getHorizontalBar().setVisible(true);
+ Composite contents = getContentArea();
+ contents.setBackground(ColorResources.WINDOW_BG_COLOR);
+ contents.setLayout(new FillLayout());
+ tableComp = new MemoryMapTable(contents, SWT.NONE, SWT.MULTI | SWT.BORDER
+ | SWT.FULL_SELECTION | SWT.H_SCROLL | SWT.V_SCROLL);
}
@Override
public void updateView() {
-
+ if (!AnalyzerManager.isVisibleView(this.getID())) {
+ return;
+ }
+ if (null == tableComp) {
+ return;
+ }
+ tableComp.updateTable();
}
@Override
return;
}
DASelectionData seldata = (DASelectionData) data;
- if (seldata.getData() instanceof GridItem[]) {
-
- } else {
-
- }
}
@Override
- public Control getControl() {
- return contents;
+ public void clear() {
+ tableComp.clear();
}
@Override
- public void clear() {
- init();
+ public Control getControl() {
+ return tableComp;
}
}
+/*
+ * Dynamic Analyzer
+ *
+ * Copyright (c) 2000 - 2016 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact:
+ * Dongkye Lee <dongkyu6.lee@samsung.com>
+ * Jaeyong Lee <jae-yong.lee@@samsung.com>
+ * Gihun Chang <gihun.chang@@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
package org.tizen.dynamicanalyzer.ui.memory;
import org.eclipse.swt.SWT;
+/*\r
+ * Dynamic Analyzer\r
+ *\r
+ * Copyright (c) 2000 - 2016 Samsung Electronics Co., Ltd. All rights reserved.\r
+ *\r
+ * Contact: \r
+ * Dongkye Lee <dongkyu6.lee@samsung.com>\r
+ * Jaeyong Lee <jae-yong.lee@@samsung.com>\r
+ * Gihun Chang <gihun.chang@@samsung.com>\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ * \r
+ */\r
+\r
package org.tizen.dynamicanalyzer.ui.memory.chart;\r
\r
import java.util.ArrayList;\r
+/*\r
+ * Dynamic Analyzer\r
+ *\r
+ * Copyright (c) 2000 - 2016 Samsung Electronics Co., Ltd. All rights reserved.\r
+ *\r
+ * Contact: \r
+ * Dongkye Lee <dongkyu6.lee@samsung.com>\r
+ * Jaeyong Lee <jae-yong.lee@@samsung.com>\r
+ * Gihun Chang <gihun.chang@@samsung.com>\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ * \r
+ */\r
+\r
package org.tizen.dynamicanalyzer.ui.memory.chart;\r
\r
import java.util.List;\r
+/*\r
+ * Dynamic Analyzer\r
+ *\r
+ * Copyright (c) 2000 - 2016 Samsung Electronics Co., Ltd. All rights reserved.\r
+ *\r
+ * Contact: \r
+ * Dongkye Lee <dongkyu6.lee@samsung.com>\r
+ * Jaeyong Lee <jae-yong.lee@@samsung.com>\r
+ * Gihun Chang <gihun.chang@@samsung.com>\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ * \r
+ */\r
+\r
package org.tizen.dynamicanalyzer.ui.memory.chart;\r
\r
import java.util.ArrayList;\r
+/*\r
+ * Dynamic Analyzer\r
+ *\r
+ * Copyright (c) 2000 - 2016 Samsung Electronics Co., Ltd. All rights reserved.\r
+ *\r
+ * Contact: \r
+ * Dongkye Lee <dongkyu6.lee@samsung.com>\r
+ * Jaeyong Lee <jae-yong.lee@@samsung.com>\r
+ * Gihun Chang <gihun.chang@@samsung.com>\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ * \r
+ */\r
+\r
package org.tizen.dynamicanalyzer.ui.memory.chart;\r
\r
import java.util.ArrayList;\r
+/*\r
+ * Dynamic Analyzer\r
+ *\r
+ * Copyright (c) 2000 - 2016 Samsung Electronics Co., Ltd. All rights reserved.\r
+ *\r
+ * Contact: \r
+ * Dongkye Lee <dongkyu6.lee@samsung.com>\r
+ * Jaeyong Lee <jae-yong.lee@@samsung.com>\r
+ * Gihun Chang <gihun.chang@@samsung.com>\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ * \r
+ */\r
+\r
package org.tizen.dynamicanalyzer.ui.memory.chart;\r
\r
import java.util.ArrayList;\r
+/*
+ * Dynamic Analyzer
+ *
+ * Copyright (c) 2000 - 2016 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact:
+ * Dongkye Lee <dongkyu6.lee@samsung.com>
+ * Jaeyong Lee <jae-yong.lee@@samsung.com>
+ * Gihun Chang <gihun.chang@@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
package org.tizen.dynamicanalyzer.ui.memory.data;
import java.sql.PreparedStatement;
import java.util.ArrayList;\r
import java.util.HashMap;\r
import java.util.Iterator;\r
-import java.util.LinkedHashMap;\r
import java.util.List;\r
import java.util.Map;\r
\r
import org.tizen.dynamicanalyzer.database.SqlConnectionManager;\r
import org.tizen.dynamicanalyzer.project.BinaryInfo;\r
import org.tizen.dynamicanalyzer.project.LibraryObject;\r
+import org.tizen.dynamicanalyzer.project.ProcessInformation;\r
import org.tizen.dynamicanalyzer.project.ProcessMemoryMap;\r
import org.tizen.dynamicanalyzer.project.Project;\r
import org.tizen.dynamicanalyzer.protocol.ProtocolConstants;\r
import org.tizen.dynamicanalyzer.swap.logparser.PageDataManager;\r
import org.tizen.dynamicanalyzer.swap.model.data.LogData;\r
import org.tizen.dynamicanalyzer.swap.model.data.MemoryData;\r
+import org.tizen.dynamicanalyzer.swap.model.data.MemoryMapData;\r
import org.tizen.dynamicanalyzer.swap.model.data.ProcessProfileData;\r
import org.tizen.dynamicanalyzer.swap.model.data.SystemData;\r
import org.tizen.dynamicanalyzer.util.Logger;\r
-import org.tizen.dynamicanalyzer.widgets.chartBoard.DAChartBoard;\r
\r
public class MemoryDataManager extends PageDataManager {\r
private static MemoryDataManager instance = new MemoryDataManager();\r
\r
- private DAChartBoard chartBoard = null;\r
- \r
private static final int MEM_API_TYPE_ALLOC = 0;\r
private static final int MEM_API_TYPE_FREE = 1;\r
private static final int MEM_USER = 2;\r
private DBInserter allocateDBInserter = null;\r
private DBInserter freeDBInserter = null;\r
private DBInserter allocateCallStackDBInserter = null;\r
- \r
- private LinkedHashMap<Long, Integer> parentChartIndexOfSeq = new LinkedHashMap<Long, Integer>();\r
- private LinkedHashMap<Long, Integer> childChartIndexOfSeq = new LinkedHashMap<Long, Integer>();\r
\r
public static MemoryDataManager getInstance() {\r
return instance;\r
freeDBInserter = makeInserter(freeDBTable);\r
//allocateCallStackDBInserter = makeInserter(allocateCallStackDBTable); \r
}\r
-\r
- public void setChartMemoryChartBoard(DAChartBoard board) {\r
- chartBoard = board;\r
- }\r
\r
public void clear() {\r
allocByteMap = new HashMap<Integer, Long>();\r
libraryAllocByteMap = new HashMap<Integer, Map<Integer, Long>>();\r
allocationSeriesDataSetMap = new HashMap<Long, Long>();\r
- parentChartIndexOfSeq = new LinkedHashMap<Long, Integer>();\r
- childChartIndexOfSeq = new LinkedHashMap<Long, Integer>();\r
\r
memoryAllocDataList.clear();\r
memoryfreeDataList.clear();\r
Logs systemmemorylogs = getLogsFromLogPackage(pack, ProtocolConstants.MSG_DATA_SYSTEM);\r
Logs allocatedlogs = getLogsFromLogPackage(pack, ProtocolConstants.MSG_PROBE_MEMORY);\r
\r
+ //Logs memorymaplogs = getLogsFromLogPackage(pack, ProtocolConstants.MSG_PROCESS_MAP);\r
+ //Logs memoryunmaplogs = getLogsFromLogPackage(pack, ProtocolConstants.MSG_PROCESS_UNMAP);\r
+\r
makeSystemMemoryData(systemmemorylogs, allocatedlogs);\r
}\r
\r
\r
public List<List<Object>> makeLeakDataForRange(long startTime, long endTime, int targetPID) {\r
List<List<Object>> rangeDataList = new ArrayList<List<Object>> ();\r
- \r
+\r
if (targetPID != 0) {\r
List<List<Object>> allocDataList = getAllocationDataFromDB(startTime, endTime, targetPID);\r
List<List<Object>> freeDataList = getFreeDataFromDB(startTime, endTime, targetPID);\r
return allocData;\r
}\r
\r
- public int getParentIndexOfSeq(long seq) {\r
- Integer chartIndex = this.parentChartIndexOfSeq.get(seq);\r
- if (null != chartIndex) {\r
- return chartIndex;\r
- } else {\r
- return 0;\r
- }\r
- }\r
-\r
- public void setParentIndexOfSeq(long seq, int paretnChartIndex) {\r
- Integer chartIndex = this.parentChartIndexOfSeq.get(seq);\r
- if (null == chartIndex) {\r
- this.parentChartIndexOfSeq.put(seq, paretnChartIndex);\r
- }\r
-\r
- }\r
-\r
- public int getChildIndexOfSeq(long seq) {\r
- Integer chartIndex = this.childChartIndexOfSeq.get(seq);\r
- if (null != chartIndex) {\r
- return chartIndex;\r
- } else {\r
- return 0;\r
- }\r
- }\r
-\r
- public void setChildIndexOfSeq(long seq, int childChartIndex) {\r
- Integer chartIndex = this.childChartIndexOfSeq.get(seq);\r
- if (null == chartIndex) {\r
- this.childChartIndexOfSeq.put(seq, childChartIndex);\r
- }\r
- }\r
-\r
private void GetAllocationData(List<LogData> memoryLogList) {\r
int size = memoryLogList.size();\r
for (int i = 0; i < size; i++) {\r
}\r
}\r
\r
+ /*\r
+ * Save allocation and free api call \r
+ */\r
if(MEM_API_TYPE_ALLOC == memApiType) {\r
makeAllocData(logData);\r
}\r
systemMemoryDBInserter.pushData(systemDataList);\r
processMemoryDBInserter.pushData(targetProcessDataList);\r
}\r
+\r
}\r
+/*
+ * Dynamic Analyzer
+ *
+ * Copyright (c) 2000 - 2016 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact:
+ * Dongkye Lee <dongkyu6.lee@samsung.com>
+ * Jaeyong Lee <jae-yong.lee@@samsung.com>
+ * Gihun Chang <gihun.chang@@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
package org.tizen.dynamicanalyzer.ui.memory.table;
import java.util.List;
\r
import org.eclipse.nebula.widgets.grid.GridItem;\r
import org.eclipse.swt.SWT;\r
-import org.eclipse.swt.events.MouseEvent;\r
-import org.eclipse.swt.events.MouseListener;\r
import org.eclipse.swt.widgets.Composite;\r
import org.eclipse.swt.widgets.Event;\r
import org.eclipse.swt.widgets.Listener;\r
setExpand(item, false);\r
}\r
});\r
- \r
- table.addMouseListener(new MouseListener() {\r
-\r
- @Override\r
- public void mouseUp(MouseEvent e) {\r
- // do nothing\r
- }\r
-\r
- @Override\r
- public void mouseDown(MouseEvent e) {\r
- // do nothing\r
- }\r
-\r
- @Override\r
- public void mouseDoubleClick(MouseEvent e) {\r
- GridItem[] items = (GridItem[]) table.getSelection();\r
- if (null == items || items.length == 0) {\r
- return;\r
- }\r
- GridItem item = items[0];\r
- if (item.isExpanded()) {\r
- setExpand(item, false);\r
- } else {\r
- setExpand(item, true);\r
- }\r
- updateTree();\r
- }\r
- });\r
}\r
\r
public void setSelectionRange(Long start, Long end) {\r
+/*
+ * Dynamic Analyzer
+ *
+ * Copyright (c) 2000 - 2016 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact:
+ * Dongkye Lee <dongkyu6.lee@samsung.com>
+ * Jaeyong Lee <jae-yong.lee@@samsung.com>
+ * Gihun Chang <gihun.chang@@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
package org.tizen.dynamicanalyzer.ui.memory.table;
+import java.util.ArrayList;
import java.util.List;
+import org.eclipse.nebula.widgets.grid.Grid;
+import org.eclipse.nebula.widgets.grid.GridColumn;
+import org.eclipse.nebula.widgets.grid.GridColumnGroup;
+import org.eclipse.swt.SWT;
import org.eclipse.swt.widgets.Composite;
+import org.tizen.dynamicanalyzer.common.AnalyzerConstants;
+import org.tizen.dynamicanalyzer.common.Global;
+import org.tizen.dynamicanalyzer.model.ColumnData;
import org.tizen.dynamicanalyzer.model.TableInput;
+import org.tizen.dynamicanalyzer.nl.MemoryPageLabels;
+import org.tizen.dynamicanalyzer.project.ProcessMemoryMap;
+import org.tizen.dynamicanalyzer.project.Project;
+import org.tizen.dynamicanalyzer.ui.summary.profiling.ColumnGroupRenderer;
+import org.tizen.dynamicanalyzer.ui.toolbar.Toolbar;
+import org.tizen.dynamicanalyzer.ui.widgets.table.DATableCellRenderer;
import org.tizen.dynamicanalyzer.ui.widgets.table.DATableComposite;
+import org.tizen.dynamicanalyzer.ui.widgets.table.DATableHeaderRenderer;
+import org.tizen.dynamicanalyzer.ui.widgets.table.DefaultTableComparator;
+import org.tizen.dynamicanalyzer.ui.widgets.table.TableColumnSizePackListener;
public class MemoryMapTable extends DATableComposite {
+
+ private int[] columnSizes = { 100, 0, 0, 90};
+ private boolean[] columnVisibility = { true, true, true, true };
+ private int[] columnAlignment = { SWT.CENTER, SWT.LEFT, SWT.LEFT, SWT.LEFT };
+
+ private int keyindex = 0;
+
+ private String[] columnNames = {
+ MemoryPageLabels.MEMORY_MEMORYMAP_ADDRESS,
+ MemoryPageLabels.MEMORY_MEMORYMAP_ADDRESS_LOW,
+ MemoryPageLabels.MEMORY_MEMORYMAP_ADDRESS_HIGH,
+ MemoryPageLabels.MEMORY_MEMORYMAP_LIBNAME
+ };
+
+ int[] sortTypes = { AnalyzerConstants.SORT_TYPE_NONE, AnalyzerConstants.SORT_TYPE_NONE,
+ AnalyzerConstants.SORT_TYPE_NONE, AnalyzerConstants.SORT_TYPE_NONE
+ };
public MemoryMapTable(Composite parent, int style, int tableStyle) {
super(parent, style, tableStyle);
- // TODO Auto-generated method stub
+
+ setContextMenu(AnalyzerConstants.CONTEXT_TABLE_RANGE);
+
+ setTableName(MemoryPageLabels.MEMORY_MAP_VIEW_TITLE);
+ setComparator(new DefaultTableComparator());
+
+ setSortTypes(sortTypes);
+ setColumnAlignment(columnAlignment);
+ List<ColumnData> columnData = createColumnData();
+ setColumns(columnData);
+ setColumnSize(columnSizes);
+ setColumnVisibility(columnVisibility);
+
+ setTableToolTipEnable(false);
+
+ comparator.setType(AnalyzerConstants.SORT_TYPE_NONE);
+ comparator.setColumn(0);
+
+ parent.addControlListener(new TableColumnSizePackListener(this, columnSizes));
}
@Override
protected List<TableInput> makeTableInput() {
- // TODO Auto-generated method stub
- return null;
+ List<TableInput> output = new ArrayList<TableInput>();
+ List<Integer> pidlist = new ArrayList<Integer>();
+
+ if(Global.getProject() == null) {
+ return output;
+ }
+
+ int[] pids = Global.getProject().getProcessIDs();
+ int targetPID = Toolbar.INSTANCE.getSelectedPid();
+
+ if(targetPID > 0) {
+ pidlist.add(targetPID);
+ }
+ else {
+ for (int i = 0; i < pids.length; i++) {
+ pidlist.add(pids[i]);
+ }
+ }
+
+ Project project = Global.getProject();
+
+ for(int i = 0 ; i < pidlist.size() ; i++) {
+
+ ProcessMemoryMap pmap = project.getProcessInformation(pidlist.get(i)).getLastProcessMemoryMap();
+ }
+
+ return output;
+ }
+
+ private List<ColumnData> createColumnData() {
+ List<ColumnData> columnData = new ArrayList<ColumnData>();
+
+ ColumnData data1 = new ColumnData(MemoryPageLabels.MEMORY_MEMORYMAP_ADDRESS);
+ ColumnData data1Child1 = new ColumnData(MemoryPageLabels.MEMORY_MEMORYMAP_ADDRESS_LOW);
+ ColumnData data1Child2 = new ColumnData(MemoryPageLabels.MEMORY_MEMORYMAP_ADDRESS_HIGH);
+ data1.getChildren().add(data1Child1);
+ data1.getChildren().add(data1Child2);
+ columnData.add(data1);
+
+ ColumnData data2 = new ColumnData(MemoryPageLabels.MEMORY_MEMORYMAP_LIBNAME);
+ columnData.add(data2);
+
+ return columnData;
+ }
+
+ public void setColumns(List<ColumnData> columnData) {
+ int size = columnData.size();
+ int index = 0;
+ for (int i = 0; i < size; i++) {
+ if (columnData.get(i).isParent()) {
+ GridColumnGroup columnGroup = new GridColumnGroup(table,
+ SWT.NONE);
+ columnGroup.setHeaderRenderer(new ColumnGroupRenderer());
+ columnGroup.setText(columnData.get(i).getText());
+ List<ColumnData> children = columnData.get(i).getChildren();
+ int childSize = children.size();
+ for (int ii = 0; ii < childSize; ii++) {
+ createColumn(columnGroup, children.get(ii), index++);
+ }
+ } else {
+ createColumn(table, columnData.get(i), index++);
+ }
+ }
+ }
+
+ private void createColumn(Object parent, ColumnData data, int index) {
+ GridColumn column = null;
+ if (parent instanceof GridColumnGroup) {
+ GridColumnGroup group = (GridColumnGroup) parent;
+ column = new GridColumn(group, SWT.NONE);
+ } else {
+ Grid table = (Grid) parent;
+ column = new GridColumn(table, SWT.NONE);
+ }
+
+ column.setCellRenderer(new DATableCellRenderer());
+ column.setHeaderRenderer(new DATableHeaderRenderer());
+ column.setText(data.getText());
+ if (columnAlignment != null) {
+ if (columnAlignment.length > index) {
+ column.setAlignment(columnAlignment[index]);
+ }
+ }
+ if (data.getWidth() == 0) {
+ column.pack();
+ } else {
+ column.setWidth(data.getWidth());
+ }
}
}
import java.util.List;\r
import java.util.Map;\r
\r
-import org.eclipse.nebula.widgets.grid.GridItem;\r
import org.eclipse.swt.SWT;\r
-import org.eclipse.swt.events.SelectionEvent;\r
-import org.eclipse.swt.events.SelectionListener;\r
import org.eclipse.swt.widgets.Composite;\r
import org.tizen.dynamicanalyzer.common.AnalyzerConstants;\r
-import org.tizen.dynamicanalyzer.common.AnalyzerManager;\r
-import org.tizen.dynamicanalyzer.common.DASelectionData;\r
import org.tizen.dynamicanalyzer.common.Global;\r
import org.tizen.dynamicanalyzer.model.TableInput;\r
import org.tizen.dynamicanalyzer.model.TreeInput;\r
import org.tizen.dynamicanalyzer.nl.MemoryPageLabels;\r
-import org.tizen.dynamicanalyzer.ui.memory.MemoryStatisticsTableView;\r
import org.tizen.dynamicanalyzer.ui.memory.data.AllocateDBTable;\r
import org.tizen.dynamicanalyzer.ui.memory.data.MemoryDataManager;\r
import org.tizen.dynamicanalyzer.ui.toolbar.Toolbar;\r