From: dongkyu6 lee Date: Thu, 24 Mar 2016 07:56:22 +0000 (+0900) Subject: [SRADA-177] Add license message and remove unused import X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f6f5f38d8e14aa5ebaa261fa7d94d3fdba5078cc;p=sdk%2Ftools%2Fdynamic-analyzer.git [SRADA-177] Add license message and remove unused import Change-Id: I7614ae4b0cf0726dd8721cea919d34a94818ee4d Signed-off-by: dongkyu6 lee --- diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/nl/MemoryPageLabels.java b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/nl/MemoryPageLabels.java index bfcfa96..dc11ad4 100755 --- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/nl/MemoryPageLabels.java +++ b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/nl/MemoryPageLabels.java @@ -40,6 +40,10 @@ public class MemoryPageLabels extends NLS { 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 diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/nl/MemoryPageLabels.properties b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/nl/MemoryPageLabels.properties index f8abc77..8d04090 100755 --- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/nl/MemoryPageLabels.properties +++ b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/nl/MemoryPageLabels.properties @@ -29,6 +29,11 @@ MEMORY_ALLOCATION_TRACE_VIEW_SIZE=Size MEMORY_ALLOCATION_TRACE_VIEW_LIBRARY=Library MEMORY_ALLOCATION_TRACE_VIEW_CALLER_FUNCTION=Caller Function +MEMORY_MEMORYMAP_LIBNAME=Name +MEMORY_MEMORYMAP_ADDRESS=Address +MEMORY_MEMORYMAP_ADDRESS_LOW=Low +MEMORY_MEMORYMAP_ADDRESS_HIGH=High + MEMORY_CHART_HEAP_MEMORY=Heap allocation MEMORY_CHART_PROCESS_MEMORY=Process Size MEMORY_CHART_SYSTEM_MEMORY=Memory \ No newline at end of file diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/memory/MemoryAllocationTraceTableView.java b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/memory/MemoryAllocationTraceTableView.java index aa2cc78..f5e6b0a 100755 --- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/memory/MemoryAllocationTraceTableView.java +++ b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/memory/MemoryAllocationTraceTableView.java @@ -1,3 +1,27 @@ +/* + * Dynamic Analyzer + * + * Copyright (c) 2000 - 2016 Samsung Electronics Co., Ltd. All rights reserved. + * + * Contact: + * Dongkye Lee + * Jaeyong Lee + * Gihun Chang + * + * 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; diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/memory/MemoryCallStackView.java b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/memory/MemoryCallStackView.java index f98c218..c722b14 100644 --- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/memory/MemoryCallStackView.java +++ b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/memory/MemoryCallStackView.java @@ -1,8 +1,29 @@ -package org.tizen.dynamicanalyzer.ui.memory; +/* + * Dynamic Analyzer + * + * Copyright (c) 2000 - 2016 Samsung Electronics Co., Ltd. All rights reserved. + * + * Contact: + * Dongkye Lee + * Jaeyong Lee + * Gihun Chang + * + * 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; @@ -13,19 +34,11 @@ 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.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; diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/memory/MemoryChartView.java b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/memory/MemoryChartView.java index fb90991..43b0389 100755 --- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/memory/MemoryChartView.java +++ b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/memory/MemoryChartView.java @@ -1,3 +1,27 @@ +/* + * Dynamic Analyzer + * + * Copyright (c) 2000 - 2016 Samsung Electronics Co., Ltd. All rights reserved. + * + * Contact: + * Dongkye Lee + * Jaeyong Lee + * Gihun Chang + * + * 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; @@ -12,11 +36,9 @@ import org.tizen.dynamicanalyzer.common.DASelectionData; 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; @@ -142,9 +164,6 @@ public class MemoryChartView extends DAViewComposite { @Override public void updateView(DAViewData data) { memoryChartBoard.updateChart(); - if (data instanceof DASelectionData == false) { - return; - } } @Override diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/memory/MemoryDetailsTableView.java b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/memory/MemoryDetailsTableView.java index 543cb99..cceedf2 100755 --- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/memory/MemoryDetailsTableView.java +++ b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/memory/MemoryDetailsTableView.java @@ -1,3 +1,27 @@ +/* + * Dynamic Analyzer + * + * Copyright (c) 2000 - 2016 Samsung Electronics Co., Ltd. All rights reserved. + * + * Contact: + * Dongkye Lee + * Jaeyong Lee + * Gihun Chang + * + * 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; diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/memory/MemoryMapView.java b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/memory/MemoryMapView.java index a2d256f..d42ac5a 100755 --- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/memory/MemoryMapView.java +++ b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/memory/MemoryMapView.java @@ -1,72 +1,67 @@ +/* + * Dynamic Analyzer + * + * Copyright (c) 2000 - 2016 Samsung Electronics Co., Ltd. All rights reserved. + * + * Contact: + * Dongkye Lee + * Jaeyong Lee + * Gihun Chang + * + * 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 @@ -75,20 +70,15 @@ public class MemoryMapView extends DAViewComposite { 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; } } diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/memory/MemoryPage.java b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/memory/MemoryPage.java index 5c0b98d..a66c93b 100755 --- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/memory/MemoryPage.java +++ b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/memory/MemoryPage.java @@ -1,3 +1,27 @@ +/* + * Dynamic Analyzer + * + * Copyright (c) 2000 - 2016 Samsung Electronics Co., Ltd. All rights reserved. + * + * Contact: + * Dongkye Lee + * Jaeyong Lee + * Gihun Chang + * + * 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; diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/memory/chart/HeapMemoryChart.java b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/memory/chart/HeapMemoryChart.java index 6e718e8..b44ecbe 100755 --- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/memory/chart/HeapMemoryChart.java +++ b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/memory/chart/HeapMemoryChart.java @@ -1,3 +1,27 @@ +/* + * Dynamic Analyzer + * + * Copyright (c) 2000 - 2016 Samsung Electronics Co., Ltd. All rights reserved. + * + * Contact: + * Dongkye Lee + * Jaeyong Lee + * Gihun Chang + * + * 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.chart; import java.util.ArrayList; diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/memory/chart/MemoryChart.java b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/memory/chart/MemoryChart.java index ce700e9..cd6e10b 100755 --- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/memory/chart/MemoryChart.java +++ b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/memory/chart/MemoryChart.java @@ -1,3 +1,27 @@ +/* + * Dynamic Analyzer + * + * Copyright (c) 2000 - 2016 Samsung Electronics Co., Ltd. All rights reserved. + * + * Contact: + * Dongkye Lee + * Jaeyong Lee + * Gihun Chang + * + * 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.chart; import java.util.List; diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/memory/chart/MemoryChartBoard.java b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/memory/chart/MemoryChartBoard.java index 4c750ce..29bd4b5 100755 --- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/memory/chart/MemoryChartBoard.java +++ b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/memory/chart/MemoryChartBoard.java @@ -1,3 +1,27 @@ +/* + * Dynamic Analyzer + * + * Copyright (c) 2000 - 2016 Samsung Electronics Co., Ltd. All rights reserved. + * + * Contact: + * Dongkye Lee + * Jaeyong Lee + * Gihun Chang + * + * 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.chart; import java.util.ArrayList; diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/memory/chart/ProcessMemoryChart.java b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/memory/chart/ProcessMemoryChart.java index d801985..123e279 100755 --- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/memory/chart/ProcessMemoryChart.java +++ b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/memory/chart/ProcessMemoryChart.java @@ -1,3 +1,27 @@ +/* + * Dynamic Analyzer + * + * Copyright (c) 2000 - 2016 Samsung Electronics Co., Ltd. All rights reserved. + * + * Contact: + * Dongkye Lee + * Jaeyong Lee + * Gihun Chang + * + * 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.chart; import java.util.ArrayList; diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/memory/chart/SystemMemoryChart.java b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/memory/chart/SystemMemoryChart.java index addb08b..665755c 100755 --- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/memory/chart/SystemMemoryChart.java +++ b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/memory/chart/SystemMemoryChart.java @@ -1,3 +1,27 @@ +/* + * Dynamic Analyzer + * + * Copyright (c) 2000 - 2016 Samsung Electronics Co., Ltd. All rights reserved. + * + * Contact: + * Dongkye Lee + * Jaeyong Lee + * Gihun Chang + * + * 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.chart; import java.util.ArrayList; diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/memory/data/AllocateCallStackDBTable.java b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/memory/data/AllocateCallStackDBTable.java index 2cbcfdb..d8b7124 100644 --- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/memory/data/AllocateCallStackDBTable.java +++ b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/memory/data/AllocateCallStackDBTable.java @@ -1,3 +1,27 @@ +/* + * Dynamic Analyzer + * + * Copyright (c) 2000 - 2016 Samsung Electronics Co., Ltd. All rights reserved. + * + * Contact: + * Dongkye Lee + * Jaeyong Lee + * Gihun Chang + * + * 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; diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/memory/data/MemoryDataManager.java b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/memory/data/MemoryDataManager.java index ba4e369..a767b8a 100755 --- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/memory/data/MemoryDataManager.java +++ b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/memory/data/MemoryDataManager.java @@ -29,7 +29,6 @@ import java.sql.SQLException; import java.util.ArrayList; import java.util.HashMap; import java.util.Iterator; -import java.util.LinkedHashMap; import java.util.List; import java.util.Map; @@ -39,6 +38,7 @@ import org.tizen.dynamicanalyzer.database.DBInserter; import org.tizen.dynamicanalyzer.database.SqlConnectionManager; import org.tizen.dynamicanalyzer.project.BinaryInfo; import org.tizen.dynamicanalyzer.project.LibraryObject; +import org.tizen.dynamicanalyzer.project.ProcessInformation; import org.tizen.dynamicanalyzer.project.ProcessMemoryMap; import org.tizen.dynamicanalyzer.project.Project; import org.tizen.dynamicanalyzer.protocol.ProtocolConstants; @@ -47,16 +47,14 @@ import org.tizen.dynamicanalyzer.swap.logparser.Logs; import org.tizen.dynamicanalyzer.swap.logparser.PageDataManager; import org.tizen.dynamicanalyzer.swap.model.data.LogData; import org.tizen.dynamicanalyzer.swap.model.data.MemoryData; +import org.tizen.dynamicanalyzer.swap.model.data.MemoryMapData; import org.tizen.dynamicanalyzer.swap.model.data.ProcessProfileData; import org.tizen.dynamicanalyzer.swap.model.data.SystemData; import org.tizen.dynamicanalyzer.util.Logger; -import org.tizen.dynamicanalyzer.widgets.chartBoard.DAChartBoard; public class MemoryDataManager extends PageDataManager { private static MemoryDataManager instance = new MemoryDataManager(); - private DAChartBoard chartBoard = null; - private static final int MEM_API_TYPE_ALLOC = 0; private static final int MEM_API_TYPE_FREE = 1; private static final int MEM_USER = 2; @@ -83,9 +81,6 @@ public class MemoryDataManager extends PageDataManager { private DBInserter allocateDBInserter = null; private DBInserter freeDBInserter = null; private DBInserter allocateCallStackDBInserter = null; - - private LinkedHashMap parentChartIndexOfSeq = new LinkedHashMap(); - private LinkedHashMap childChartIndexOfSeq = new LinkedHashMap(); public static MemoryDataManager getInstance() { return instance; @@ -104,17 +99,11 @@ public class MemoryDataManager extends PageDataManager { freeDBInserter = makeInserter(freeDBTable); //allocateCallStackDBInserter = makeInserter(allocateCallStackDBTable); } - - public void setChartMemoryChartBoard(DAChartBoard board) { - chartBoard = board; - } public void clear() { allocByteMap = new HashMap(); libraryAllocByteMap = new HashMap>(); allocationSeriesDataSetMap = new HashMap(); - parentChartIndexOfSeq = new LinkedHashMap(); - childChartIndexOfSeq = new LinkedHashMap(); memoryAllocDataList.clear(); memoryfreeDataList.clear(); @@ -133,6 +122,9 @@ public class MemoryDataManager extends PageDataManager { Logs systemmemorylogs = getLogsFromLogPackage(pack, ProtocolConstants.MSG_DATA_SYSTEM); Logs allocatedlogs = getLogsFromLogPackage(pack, ProtocolConstants.MSG_PROBE_MEMORY); + //Logs memorymaplogs = getLogsFromLogPackage(pack, ProtocolConstants.MSG_PROCESS_MAP); + //Logs memoryunmaplogs = getLogsFromLogPackage(pack, ProtocolConstants.MSG_PROCESS_UNMAP); + makeSystemMemoryData(systemmemorylogs, allocatedlogs); } @@ -456,7 +448,7 @@ public class MemoryDataManager extends PageDataManager { public List> makeLeakDataForRange(long startTime, long endTime, int targetPID) { List> rangeDataList = new ArrayList> (); - + if (targetPID != 0) { List> allocDataList = getAllocationDataFromDB(startTime, endTime, targetPID); List> freeDataList = getFreeDataFromDB(startTime, endTime, targetPID); @@ -519,39 +511,6 @@ public class MemoryDataManager extends PageDataManager { return allocData; } - public int getParentIndexOfSeq(long seq) { - Integer chartIndex = this.parentChartIndexOfSeq.get(seq); - if (null != chartIndex) { - return chartIndex; - } else { - return 0; - } - } - - public void setParentIndexOfSeq(long seq, int paretnChartIndex) { - Integer chartIndex = this.parentChartIndexOfSeq.get(seq); - if (null == chartIndex) { - this.parentChartIndexOfSeq.put(seq, paretnChartIndex); - } - - } - - public int getChildIndexOfSeq(long seq) { - Integer chartIndex = this.childChartIndexOfSeq.get(seq); - if (null != chartIndex) { - return chartIndex; - } else { - return 0; - } - } - - public void setChildIndexOfSeq(long seq, int childChartIndex) { - Integer chartIndex = this.childChartIndexOfSeq.get(seq); - if (null == chartIndex) { - this.childChartIndexOfSeq.put(seq, childChartIndex); - } - } - private void GetAllocationData(List memoryLogList) { int size = memoryLogList.size(); for (int i = 0; i < size; i++) { @@ -585,6 +544,9 @@ public class MemoryDataManager extends PageDataManager { } } + /* + * Save allocation and free api call + */ if(MEM_API_TYPE_ALLOC == memApiType) { makeAllocData(logData); } @@ -699,4 +661,5 @@ public class MemoryDataManager extends PageDataManager { systemMemoryDBInserter.pushData(systemDataList); processMemoryDBInserter.pushData(targetProcessDataList); } + } diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/memory/table/MemoryCallStackTable.java b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/memory/table/MemoryCallStackTable.java index b6b057a..15b3163 100644 --- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/memory/table/MemoryCallStackTable.java +++ b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/memory/table/MemoryCallStackTable.java @@ -1,3 +1,27 @@ +/* + * Dynamic Analyzer + * + * Copyright (c) 2000 - 2016 Samsung Electronics Co., Ltd. All rights reserved. + * + * Contact: + * Dongkye Lee + * Jaeyong Lee + * Gihun Chang + * + * 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; diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/memory/table/MemoryDetailsTable.java b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/memory/table/MemoryDetailsTable.java index c6d73d3..78178fc 100755 --- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/memory/table/MemoryDetailsTable.java +++ b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/memory/table/MemoryDetailsTable.java @@ -31,8 +31,6 @@ import java.util.Map; import org.eclipse.nebula.widgets.grid.GridItem; import org.eclipse.swt.SWT; -import org.eclipse.swt.events.MouseEvent; -import org.eclipse.swt.events.MouseListener; import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Event; import org.eclipse.swt.widgets.Listener; @@ -118,34 +116,6 @@ public class MemoryDetailsTable extends DATreeComposite { setExpand(item, false); } }); - - table.addMouseListener(new MouseListener() { - - @Override - public void mouseUp(MouseEvent e) { - // do nothing - } - - @Override - public void mouseDown(MouseEvent e) { - // do nothing - } - - @Override - public void mouseDoubleClick(MouseEvent e) { - GridItem[] items = (GridItem[]) table.getSelection(); - if (null == items || items.length == 0) { - return; - } - GridItem item = items[0]; - if (item.isExpanded()) { - setExpand(item, false); - } else { - setExpand(item, true); - } - updateTree(); - } - }); } public void setSelectionRange(Long start, Long end) { diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/memory/table/MemoryMapTable.java b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/memory/table/MemoryMapTable.java index 3b28968..2006562 100644 --- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/memory/table/MemoryMapTable.java +++ b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/memory/table/MemoryMapTable.java @@ -1,22 +1,184 @@ +/* + * Dynamic Analyzer + * + * Copyright (c) 2000 - 2016 Samsung Electronics Co., Ltd. All rights reserved. + * + * Contact: + * Dongkye Lee + * Jaeyong Lee + * Gihun Chang + * + * 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 = 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 makeTableInput() { - // TODO Auto-generated method stub - return null; + List output = new ArrayList(); + List pidlist = new ArrayList(); + + 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 createColumnData() { + List columnData = new ArrayList(); + + 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) { + 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 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()); + } } } diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/memory/table/MemoryStatisticsTable.java b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/memory/table/MemoryStatisticsTable.java index 94c36c5..0da138d 100755 --- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/memory/table/MemoryStatisticsTable.java +++ b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/memory/table/MemoryStatisticsTable.java @@ -29,19 +29,13 @@ import java.util.HashMap; import java.util.List; import java.util.Map; -import org.eclipse.nebula.widgets.grid.GridItem; import org.eclipse.swt.SWT; -import org.eclipse.swt.events.SelectionEvent; -import org.eclipse.swt.events.SelectionListener; import org.eclipse.swt.widgets.Composite; import org.tizen.dynamicanalyzer.common.AnalyzerConstants; -import org.tizen.dynamicanalyzer.common.AnalyzerManager; -import org.tizen.dynamicanalyzer.common.DASelectionData; import org.tizen.dynamicanalyzer.common.Global; import org.tizen.dynamicanalyzer.model.TableInput; import org.tizen.dynamicanalyzer.model.TreeInput; import org.tizen.dynamicanalyzer.nl.MemoryPageLabels; -import org.tizen.dynamicanalyzer.ui.memory.MemoryStatisticsTableView; import org.tizen.dynamicanalyzer.ui.memory.data.AllocateDBTable; import org.tizen.dynamicanalyzer.ui.memory.data.MemoryDataManager; import org.tizen.dynamicanalyzer.ui.toolbar.Toolbar;