public static String MEMORY_CHART_TITLE;
public static String MEMORY_MAP_VIEW_TITLE;
+ public static String MEMORY_CALLSTACK_VIEW_TITLE;
public static String MEMORY_DETAILS_VIEW_TITLE;
public static String MEMORY_STATISTICS_VIEW_TITLE;
public static String MEMORY_ALLOCATION_TRACE_VIEW_TITLE;
MEMORY_CHART_TITLE=Memory\r
MEMORY_MAP_VIEW_TITLE=Memory Map\r
+MEMORY_CALLSTACK_VIEW_TITLE=CallStack\r
MEMORY_DETAILS_VIEW_TITLE=Details\r
MEMORY_STATISTICS_VIEW_TITLE=Statistics\r
MEMORY_ALLOCATION_TRACE_VIEW_TITLE=Allocation Trace\r
-package org.tizen.dynamicanalyzer.ui.memory.data;\r
-\r
-import org.eclipse.swt.SWT;\r
-import org.eclipse.swt.layout.FillLayout;\r
-import org.eclipse.swt.widgets.Composite;\r
-import org.eclipse.swt.widgets.Control;\r
-import org.tizen.dynamicanalyzer.common.AnalyzerConstants;\r
-import org.tizen.dynamicanalyzer.common.AnalyzerManager;\r
-import org.tizen.dynamicanalyzer.nl.MemoryPageLabels;\r
-import org.tizen.dynamicanalyzer.resources.ColorResources;\r
-import org.tizen.dynamicanalyzer.ui.widgets.table.DefaultTableComparator;\r
-import org.tizen.dynamicanalyzer.ui.widgets.table.TableColumnSizePackListener;\r
-import org.tizen.dynamicanalyzer.widgets.da.view.DAViewComposite;\r
-import org.tizen.dynamicanalyzer.widgets.da.view.DAViewData;\r
-\r
-public class MemoryAllocationTraceTableView extends DAViewComposite {\r
- public static final int SEC_TABLE_INDEX = 0;\r
- public static final int TIMESTAMP_TABLE_INDEX = 1;\r
- public static final int LIVE_TABLE_INDEX = 2;\r
- public static final int ADDRESS_TABLE_INDEX = 3;\r
- public static final int SIZE_TABLE_INDEX = 4;\r
- public static final int LIBRARY_TABLE_INDEX = 5;\r
- public static final int CALLER_FUNCTION_TABLE_INDEX = 6;\r
- \r
- MemoryAllocationTraceTable tableComp = null;\r
- private int[] columnSizes = { 60, 120, 60, 120, 80, 160, 160 };\r
- private boolean[] columnVisibility = { true, true, true, true, true, true, true };\r
- private int[] columnAlignment = { SWT.LEFT, SWT.LEFT, SWT.CENTER, SWT.LEFT, \r
- SWT.LEFT, SWT.LEFT, SWT.LEFT };\r
- \r
- private String[] columnNames = { \r
- MemoryPageLabels.MEMORY_ALLOCATION_TRACE_VIEW_SEQ,\r
- MemoryPageLabels.MEMORY_ALLOCATION_TRACE_VIEW_TIMESTAMP,\r
- MemoryPageLabels.MEMORY_ALLOCATION_TRACE_VIEW_LIVE,\r
- MemoryPageLabels.MEMORY_ALLOCATION_TRACE_VIEW_ADDRESS,\r
- MemoryPageLabels.MEMORY_ALLOCATION_TRACE_VIEW_SIZE,\r
- MemoryPageLabels.MEMORY_ALLOCATION_TRACE_VIEW_LIBRARY,\r
- MemoryPageLabels.MEMORY_ALLOCATION_TRACE_VIEW_CALLER_FUNCTION\r
- };\r
- \r
- int[] sortTypes = { AnalyzerConstants.SORT_TYPE_NUM, AnalyzerConstants.SORT_TYPE_STRING,\r
- AnalyzerConstants.SORT_TYPE_STRING, AnalyzerConstants.SORT_TYPE_STRING,\r
- AnalyzerConstants.SORT_TYPE_STRING, AnalyzerConstants.SORT_TYPE_STRING,\r
- AnalyzerConstants.SORT_TYPE_STRING\r
- };\r
- \r
- public MemoryAllocationTraceTableView(Composite parent, int style) {\r
- super(parent, style, false);\r
- this.setLayout(new FillLayout());\r
- setTitle(MemoryPageLabels.MEMORY_ALLOCATION_TRACE_VIEW_TITLE);\r
- Composite contents = getContentArea();\r
- contents.setBackground(ColorResources.WINDOW_BG_COLOR);\r
- contents.setLayout(new FillLayout());\r
- tableComp = new MemoryAllocationTraceTable(contents, SWT.NONE, SWT.MULTI | SWT.BORDER \r
- | SWT.FULL_SELECTION | SWT.H_SCROLL | SWT.V_SCROLL);\r
- tableComp.setTableName(MemoryPageLabels.MEMORY_ALLOCATION_TRACE_VIEW_TITLE);\r
- tableComp.setComparator(new DefaultTableComparator());\r
- tableComp.setSortTypes(sortTypes);\r
- tableComp.setColumnAlignment(columnAlignment);\r
- tableComp.setColumns(columnNames);\r
- tableComp.setColumnSize(columnSizes);\r
- tableComp.setColumnVisibility(columnVisibility);\r
- tableComp.setTableToolTipEnable(false);\r
- contents.addControlListener(new TableColumnSizePackListener(tableComp, columnSizes));\r
- }\r
-\r
- @Override\r
- public void updateView() {\r
- if (!AnalyzerManager.isVisibleView(this.getID())) {\r
- return;\r
- }\r
- if (null == tableComp) {\r
- return;\r
- }\r
- tableComp.updateTable();\r
- }\r
- \r
- @Override\r
- public void updateView(DAViewData vdata) {\r
- if (vdata instanceof MemorySelectionData == false) {\r
- return;\r
- }\r
- String id = ((MemorySelectionData) vdata).getViewID();\r
- if (!id.endsWith(this.ID)) {\r
- tableComp.removeSelection();\r
- }\r
- tableComp.updateTable();\r
- }\r
- \r
- @Override\r
- public void clear() {\r
- tableComp.clear();\r
- }\r
-\r
- @Override\r
- public Control getControl() {\r
- return tableComp;\r
- }\r
-}\r
+package org.tizen.dynamicanalyzer.ui.memory;
+
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.layout.FillLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.tizen.dynamicanalyzer.common.AnalyzerConstants;
+import org.tizen.dynamicanalyzer.common.AnalyzerManager;
+import org.tizen.dynamicanalyzer.nl.MemoryPageLabels;
+import org.tizen.dynamicanalyzer.resources.ColorResources;
+import org.tizen.dynamicanalyzer.ui.memory.data.MemorySelectionData;
+import org.tizen.dynamicanalyzer.ui.memory.table.MemoryAllocationTraceTable;
+import org.tizen.dynamicanalyzer.ui.widgets.table.DefaultTableComparator;
+import org.tizen.dynamicanalyzer.ui.widgets.table.TableColumnSizePackListener;
+import org.tizen.dynamicanalyzer.widgets.da.view.DAViewComposite;
+import org.tizen.dynamicanalyzer.widgets.da.view.DAViewData;
+
+public class MemoryAllocationTraceTableView extends DAViewComposite {
+ public static final int SEC_TABLE_INDEX = 0;
+ public static final int TIMESTAMP_TABLE_INDEX = 1;
+ public static final int LIVE_TABLE_INDEX = 2;
+ public static final int ADDRESS_TABLE_INDEX = 3;
+ public static final int SIZE_TABLE_INDEX = 4;
+ public static final int LIBRARY_TABLE_INDEX = 5;
+ public static final int CALLER_FUNCTION_TABLE_INDEX = 6;
+
+ MemoryAllocationTraceTable tableComp = null;
+ private int[] columnSizes = { 60, 120, 60, 120, 80, 160, 160 };
+ private boolean[] columnVisibility = { true, true, true, true, true, true, true };
+ private int[] columnAlignment = { SWT.LEFT, SWT.LEFT, SWT.CENTER, SWT.LEFT,
+ SWT.LEFT, SWT.LEFT, SWT.LEFT };
+
+ private String[] columnNames = {
+ MemoryPageLabels.MEMORY_ALLOCATION_TRACE_VIEW_SEQ,
+ MemoryPageLabels.MEMORY_ALLOCATION_TRACE_VIEW_TIMESTAMP,
+ MemoryPageLabels.MEMORY_ALLOCATION_TRACE_VIEW_LIVE,
+ MemoryPageLabels.MEMORY_ALLOCATION_TRACE_VIEW_ADDRESS,
+ MemoryPageLabels.MEMORY_ALLOCATION_TRACE_VIEW_SIZE,
+ MemoryPageLabels.MEMORY_ALLOCATION_TRACE_VIEW_LIBRARY,
+ MemoryPageLabels.MEMORY_ALLOCATION_TRACE_VIEW_CALLER_FUNCTION
+ };
+
+ int[] sortTypes = { AnalyzerConstants.SORT_TYPE_NUM, AnalyzerConstants.SORT_TYPE_STRING,
+ AnalyzerConstants.SORT_TYPE_STRING, AnalyzerConstants.SORT_TYPE_STRING,
+ AnalyzerConstants.SORT_TYPE_STRING, AnalyzerConstants.SORT_TYPE_STRING,
+ AnalyzerConstants.SORT_TYPE_STRING
+ };
+
+ public MemoryAllocationTraceTableView(Composite parent, int style) {
+ super(parent, style, false);
+ this.setLayout(new FillLayout());
+ setTitle(MemoryPageLabels.MEMORY_ALLOCATION_TRACE_VIEW_TITLE);
+ Composite contents = getContentArea();
+ contents.setBackground(ColorResources.WINDOW_BG_COLOR);
+ contents.setLayout(new FillLayout());
+ tableComp = new MemoryAllocationTraceTable(contents, SWT.NONE, SWT.MULTI | SWT.BORDER
+ | SWT.FULL_SELECTION | SWT.H_SCROLL | SWT.V_SCROLL);
+ tableComp.setTableName(MemoryPageLabels.MEMORY_ALLOCATION_TRACE_VIEW_TITLE);
+ tableComp.setComparator(new DefaultTableComparator());
+ tableComp.setSortTypes(sortTypes);
+ tableComp.setColumnAlignment(columnAlignment);
+ tableComp.setColumns(columnNames);
+ tableComp.setColumnSize(columnSizes);
+ tableComp.setColumnVisibility(columnVisibility);
+ tableComp.setTableToolTipEnable(false);
+ contents.addControlListener(new TableColumnSizePackListener(tableComp, columnSizes));
+ }
+
+ @Override
+ public void updateView() {
+ if (!AnalyzerManager.isVisibleView(this.getID())) {
+ return;
+ }
+ if (null == tableComp) {
+ return;
+ }
+ tableComp.updateTable();
+ }
+
+ @Override
+ public void updateView(DAViewData vdata) {
+ if (vdata instanceof MemorySelectionData == false) {
+ return;
+ }
+ String id = ((MemorySelectionData) vdata).getViewID();
+ if (!id.endsWith(this.ID)) {
+ tableComp.removeSelection();
+ }
+ tableComp.updateTable();
+ }
+
+ @Override
+ public void clear() {
+ tableComp.clear();
+ }
+
+ @Override
+ public Control getControl() {
+ return tableComp;
+ }
+}
--- /dev/null
+package org.tizen.dynamicanalyzer.ui.memory;
+
+import java.util.List;
+
+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.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.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;
+
+public class MemoryCallStackView extends DAViewComposite {
+ private Composite contents = null;
+ private Text detailText = null;
+ private Label labelMessage = null;
+
+ private void init() {
+ detailText.setText(CommonConstants.EMPTY);
+ }
+
+ public MemoryCallStackView(Composite parent, int style) {
+ super(parent, style, true);
+ this.setLayout(new FillLayout());
+
+ setTitle(MemoryPageLabels.MEMORY_CALLSTACK_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);
+ }
+
+ @Override
+ public void updateView() {
+
+ }
+
+ @Override
+ public void updateView(DAViewData data) {
+ if (data instanceof DASelectionData == false) {
+ return;
+ }
+ DASelectionData seldata = (DASelectionData) data;
+ if (seldata.getData() instanceof GridItem[]) {
+
+ } else {
+
+ }
+ }
+
+ @Override
+ public Control getControl() {
+ return contents;
+ }
+
+ @Override
+ public void clear() {
+ init();
+ }
+
+}
import org.tizen.dynamicanalyzer.common.AnalyzerManager;
import org.tizen.dynamicanalyzer.common.DASelectionData;
import org.tizen.dynamicanalyzer.nl.MemoryPageLabels;
-import org.tizen.dynamicanalyzer.nl.NetworkPageLabels;
import org.tizen.dynamicanalyzer.resources.ColorResources;
import org.tizen.dynamicanalyzer.resources.FontResources;
import org.tizen.dynamicanalyzer.ui.common.SetRangeMarkerMouseMoveListener;
import org.tizen.dynamicanalyzer.ui.common.UICommonConstants;
-import org.tizen.dynamicanalyzer.ui.memory.data.MemoryChartBoard;
+import org.tizen.dynamicanalyzer.ui.memory.chart.MemoryChartBoard;
import org.tizen.dynamicanalyzer.ui.network.NetworkPage;
import org.tizen.dynamicanalyzer.ui.range.RangeDataManager;
import org.tizen.dynamicanalyzer.ui.timeline.common.TimelineConstants;
this.setLayout(new FillLayout());
setTitle(MemoryPageLabels.MEMORY_CHART_TITLE);
-
+
contents = getContentArea();
contents.setBackground(ColorResources.WINDOW_BG_COLOR);
stackLayout = new StackLayout();
-package org.tizen.dynamicanalyzer.ui.memory.data;\r
-\r
-import org.eclipse.swt.SWT;\r
-import org.eclipse.swt.layout.FillLayout;\r
-import org.eclipse.swt.widgets.Composite;\r
-import org.eclipse.swt.widgets.Control;\r
-import org.tizen.dynamicanalyzer.common.AnalyzerConstants;\r
-import org.tizen.dynamicanalyzer.common.AnalyzerManager;\r
-import org.tizen.dynamicanalyzer.nl.MemoryPageLabels;\r
-import org.tizen.dynamicanalyzer.resources.ColorResources;\r
-import org.tizen.dynamicanalyzer.ui.widgets.table.DefaultTableComparator;\r
-import org.tizen.dynamicanalyzer.ui.widgets.table.TableColumnSizePackListener;\r
-import org.tizen.dynamicanalyzer.widgets.da.view.DAViewComposite;\r
-import org.tizen.dynamicanalyzer.widgets.da.view.DAViewData;\r
-\r
-public class MemoryDetailsTableView extends DAViewComposite {\r
- public static final int ITEM_TABLE_IDEX = 0;\r
- public static final int CURRENT_TABLE_INDEX = 1;\r
- public static final int START_TABLE_INDEX = 2;\r
- public static final int END_TABLE_INDEX = 3;\r
- public static final int DELTA_TABLE_INDEX = 4;\r
- public static final int MIN_TABLE_INDEX = 5;\r
- public static final int MAX_TABLE_INDEX = 6;\r
- \r
- MemoryDetailsTable tableComp = null;\r
- private int[] columnSizes = { 200, 90, 90, 90, 90, 90, 90 };\r
- private boolean[] columnVisibility = { true, true, true, true, true, true, true };\r
- private int[] columnAlignment = { SWT.LEFT, SWT.LEFT, SWT.LEFT, SWT.LEFT, \r
- SWT.LEFT, SWT.LEFT, SWT.LEFT };\r
- \r
- private String[] columnNames = { \r
- MemoryPageLabels.MEMORY_DETAILS_VIEW_ITEM,\r
- MemoryPageLabels.MEMORY_DETAILS_VIEW_CURRENT,\r
- MemoryPageLabels.MEMORY_DETAILS_VIEW_START,\r
- MemoryPageLabels.MEMORY_DETAILS_VIEW_END,\r
- MemoryPageLabels.MEMORY_DETAILS_VIEW_DELTA,\r
- MemoryPageLabels.MEMORY_DETAILS_VIEW_MIN,\r
- MemoryPageLabels.MEMORY_DETAILS_VIEW_MAX\r
- };\r
- \r
- int[] sortTypes = { AnalyzerConstants.SORT_TYPE_STRING, AnalyzerConstants.SORT_TYPE_NUM,\r
- AnalyzerConstants.SORT_TYPE_NUM, AnalyzerConstants.SORT_TYPE_NUM,\r
- AnalyzerConstants.SORT_TYPE_NUM, AnalyzerConstants.SORT_TYPE_NUM,\r
- AnalyzerConstants.SORT_TYPE_NUM\r
- };\r
-\r
- public MemoryDetailsTableView(Composite parent, int style) {\r
- super(parent, style, false);\r
- this.setLayout(new FillLayout());\r
- setTitle(MemoryPageLabels.MEMORY_DETAILS_VIEW_TITLE);\r
- Composite contents = getContentArea();\r
- contents.setBackground(ColorResources.WINDOW_BG_COLOR);\r
- contents.setLayout(new FillLayout());\r
- tableComp = new MemoryDetailsTable(contents, SWT.NONE, SWT.MULTI | SWT.BORDER \r
- | SWT.FULL_SELECTION | SWT.H_SCROLL | SWT.V_SCROLL);\r
- tableComp.setTableName(MemoryPageLabels.MEMORY_DETAILS_VIEW_TITLE);\r
- tableComp.setComparator(new DefaultTableComparator());\r
- tableComp.setSortTypes(sortTypes);\r
- tableComp.setColumnAlignment(columnAlignment);\r
- tableComp.setColumns(columnNames);\r
- tableComp.setColumnSize(columnSizes);\r
- tableComp.setColumnVisibility(columnVisibility);\r
- tableComp.setTableToolTipEnable(false);\r
- contents.addControlListener(new TableColumnSizePackListener(tableComp, columnSizes));\r
- }\r
- \r
- @Override\r
- public void updateView() {\r
- if (!AnalyzerManager.isVisibleView(this.getID())) {\r
- return;\r
- }\r
- if (null == tableComp) {\r
- return;\r
- }\r
- tableComp.updateTable();\r
- }\r
- \r
- @Override\r
- public void updateView(DAViewData vdata) {\r
- if (vdata instanceof MemorySelectionData == false) {\r
- return;\r
- }\r
- String id = ((MemorySelectionData) vdata).getViewID();\r
- if (!id.endsWith(this.ID)) {\r
- tableComp.removeSelection();\r
- }\r
- tableComp.updateTable();\r
- }\r
- \r
- @Override\r
- public void clear() {\r
- tableComp.clear();\r
- }\r
-\r
- @Override\r
- public Control getControl() {\r
- return tableComp;\r
- }\r
-}\r
+package org.tizen.dynamicanalyzer.ui.memory;
+
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.layout.FillLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.tizen.dynamicanalyzer.common.AnalyzerConstants;
+import org.tizen.dynamicanalyzer.common.AnalyzerManager;
+import org.tizen.dynamicanalyzer.nl.MemoryPageLabels;
+import org.tizen.dynamicanalyzer.resources.ColorResources;
+import org.tizen.dynamicanalyzer.ui.memory.data.MemorySelectionData;
+import org.tizen.dynamicanalyzer.ui.memory.table.MemoryDetailsTable;
+import org.tizen.dynamicanalyzer.ui.widgets.table.DefaultTableComparator;
+import org.tizen.dynamicanalyzer.ui.widgets.table.TableColumnSizePackListener;
+import org.tizen.dynamicanalyzer.widgets.da.view.DAViewComposite;
+import org.tizen.dynamicanalyzer.widgets.da.view.DAViewData;
+
+public class MemoryDetailsTableView extends DAViewComposite {
+ public static final int ITEM_TABLE_IDEX = 0;
+ public static final int CURRENT_TABLE_INDEX = 1;
+ public static final int START_TABLE_INDEX = 2;
+ public static final int END_TABLE_INDEX = 3;
+ public static final int DELTA_TABLE_INDEX = 4;
+ public static final int MIN_TABLE_INDEX = 5;
+ public static final int MAX_TABLE_INDEX = 6;
+
+ MemoryDetailsTable tableComp = null;
+ private int[] columnSizes = { 200, 90, 90, 90, 90, 90, 90 };
+ private boolean[] columnVisibility = { true, true, true, true, true, true, true };
+ private int[] columnAlignment = { SWT.LEFT, SWT.LEFT, SWT.LEFT, SWT.LEFT,
+ SWT.LEFT, SWT.LEFT, SWT.LEFT };
+
+ private String[] columnNames = {
+ MemoryPageLabels.MEMORY_DETAILS_VIEW_ITEM,
+ MemoryPageLabels.MEMORY_DETAILS_VIEW_CURRENT,
+ MemoryPageLabels.MEMORY_DETAILS_VIEW_START,
+ MemoryPageLabels.MEMORY_DETAILS_VIEW_END,
+ MemoryPageLabels.MEMORY_DETAILS_VIEW_DELTA,
+ MemoryPageLabels.MEMORY_DETAILS_VIEW_MIN,
+ MemoryPageLabels.MEMORY_DETAILS_VIEW_MAX
+ };
+
+ int[] sortTypes = { AnalyzerConstants.SORT_TYPE_STRING, AnalyzerConstants.SORT_TYPE_NUM,
+ AnalyzerConstants.SORT_TYPE_NUM, AnalyzerConstants.SORT_TYPE_NUM,
+ AnalyzerConstants.SORT_TYPE_NUM, AnalyzerConstants.SORT_TYPE_NUM,
+ AnalyzerConstants.SORT_TYPE_NUM
+ };
+
+ public MemoryDetailsTableView(Composite parent, int style) {
+ super(parent, style, false);
+ this.setLayout(new FillLayout());
+ setTitle(MemoryPageLabels.MEMORY_DETAILS_VIEW_TITLE);
+ Composite contents = getContentArea();
+ contents.setBackground(ColorResources.WINDOW_BG_COLOR);
+ contents.setLayout(new FillLayout());
+ tableComp = new MemoryDetailsTable(contents, SWT.NONE, SWT.MULTI | SWT.BORDER
+ | SWT.FULL_SELECTION | SWT.H_SCROLL | SWT.V_SCROLL);
+ tableComp.setTableName(MemoryPageLabels.MEMORY_DETAILS_VIEW_TITLE);
+ tableComp.setComparator(new DefaultTableComparator());
+ tableComp.setSortTypes(sortTypes);
+ tableComp.setColumnAlignment(columnAlignment);
+ tableComp.setColumns(columnNames);
+ tableComp.setColumnSize(columnSizes);
+ tableComp.setColumnVisibility(columnVisibility);
+ tableComp.setTableToolTipEnable(false);
+ contents.addControlListener(new TableColumnSizePackListener(tableComp, columnSizes));
+ }
+
+ @Override
+ public void updateView() {
+ if (!AnalyzerManager.isVisibleView(this.getID())) {
+ return;
+ }
+ if (null == tableComp) {
+ return;
+ }
+ tableComp.updateTable();
+ }
+
+ @Override
+ public void updateView(DAViewData vdata) {
+ if (vdata instanceof MemorySelectionData == false) {
+ return;
+ }
+ String id = ((MemorySelectionData) vdata).getViewID();
+ if (!id.endsWith(this.ID)) {
+ tableComp.removeSelection();
+ }
+ tableComp.updateTable();
+ }
+
+ @Override
+ public void clear() {
+ tableComp.clear();
+ }
+
+ @Override
+ public Control getControl() {
+ return tableComp;
+ }
+}
}
DASelectionData seldata = (DASelectionData) data;
if (seldata.getData() instanceof GridItem[]) {
- GridItem[] tableData = (GridItem[]) data.getData();
- DATableDataFormat tableFormat = (DATableDataFormat) tableData[0].getData();
- NetworkAPIType apiType = (NetworkAPIType) tableFormat.getLogData();
- updateData(apiType.getSeq());
+
} else {
- updateData(0);
+
}
}
-
- private void updateData(long seq) {
-
- }
@Override
public Control getControl() {
import org.tizen.dynamicanalyzer.nl.AnalyzerLabels;
import org.tizen.dynamicanalyzer.resources.ColorResources;
import org.tizen.dynamicanalyzer.shortcut.ShortCutManager;
-import org.tizen.dynamicanalyzer.ui.memory.data.MemoryAllocationTraceTableView;
+import org.tizen.dynamicanalyzer.swap.logparser.DataManagerRegistry;
import org.tizen.dynamicanalyzer.ui.memory.data.MemoryDataManager;
-import org.tizen.dynamicanalyzer.ui.memory.data.MemoryDetailsTableView;
-import org.tizen.dynamicanalyzer.ui.memory.data.MemoryStatisticsTableView;
import org.tizen.dynamicanalyzer.ui.page.ScreenshotTabComposite;
import org.tizen.dynamicanalyzer.widgets.da.view.DAPageComposite;
import org.tizen.dynamicanalyzer.widgets.da.view.DATabComposite;
MemoryStatisticsTableView memoryStatisticsTableView;
MemoryAllocationTraceTableView memoryAllocationTraceTableView;
MemoryMapView memoryMapView;
+ MemoryCallStackView memoryCallStackView;
public MemoryPage(Composite parent, int style) {
super(parent, style);
}
leftForm.setWeights(new int[] { 46, 54 });
-// bottomForm.setWeights(new int[] { 50, 50 });
rightForm = new SashForm(baseForm, SWT.VERTICAL);
memoryMapView = new MemoryMapView(rightForm, SWT.NONE);
addView(memoryMapView);
- /*
- ScreenshotTabComposite tabView = new ScreenshotTabComposite(rightForm, SWT.NONE,
- MemoryPage.pageID);
- tabView.setObservingViews(ScreenshotTabComposite.screenshotViewID,
- new String[] { MemoryPage.detailsViewID });
- tabView.setObservingViews(ScreenshotTabComposite.callstackViewID,
- new String[] { MemoryPage.detailsViewID });
- addView(tabView);
- */
- DATabComposite memorycallstackView = new DATabComposite(rightForm, SWT.NONE, false);
- addView(memorycallstackView);
+
+ memoryCallStackView = new MemoryCallStackView(rightForm, SWT.NONE);
+ addView(memoryCallStackView);
rightForm.setWeights(new int[] { 65, 35 });
baseForm.setWeights(new int[] { 75, 25 });
leftForm.setSashWidth(AnalyzerConstants.SASH_WIDTH);
rightForm.setSashWidth(AnalyzerConstants.SASH_WIDTH);
bottomForm.setSashWidth(AnalyzerConstants.SASH_WIDTH);
+
+ DataManagerRegistry.registerPageDataManager(MemoryDataManager.getInstance());
}
@Override
-package org.tizen.dynamicanalyzer.ui.memory.data;\r
-\r
-import org.eclipse.swt.SWT;\r
-import org.eclipse.swt.layout.FillLayout;\r
-import org.eclipse.swt.widgets.Composite;\r
-import org.eclipse.swt.widgets.Control;\r
-import org.tizen.dynamicanalyzer.common.AnalyzerConstants;\r
-import org.tizen.dynamicanalyzer.common.AnalyzerManager;\r
-import org.tizen.dynamicanalyzer.nl.MemoryPageLabels;\r
-import org.tizen.dynamicanalyzer.ui.widgets.table.DefaultTableComparator;\r
-import org.tizen.dynamicanalyzer.ui.widgets.table.TableColumnSizePackListener;\r
-import org.tizen.dynamicanalyzer.widgets.da.view.DAViewComposite;\r
-import org.tizen.dynamicanalyzer.widgets.da.view.DAViewData;\r
-\r
-public class MemoryStatisticsTableView extends DAViewComposite {\r
- public static final int PATH_TABLE_INDEX = 0;\r
- public static final int PERSISTENT_BYTE_TABLE_INDEX = 1;\r
- public static final int PERSISTENT_TABLE_INDEX = 0;\r
- public static final int FREED_TABLE_INDEX = 0;\r
- public static final int TOTAL_BYTE_TABLE_INDEX = 0;\r
- public static final int TOTAL_TABLE_INDEX = 0;\r
- \r
- MemoryStatisticsTable tableComp = null;\r
- private int[] columnSizes = { 200 , 110, 110, 110, 110, 110 };\r
- private boolean[] columnVisibility = { true, true, true, true, true, true };\r
- private int[] columnAlignment = { SWT.LEFT, SWT.LEFT, SWT.LEFT, SWT.LEFT, \r
- SWT.LEFT, SWT.LEFT };\r
- \r
- private String[] columnNames = {\r
- MemoryPageLabels.MEMORY_STATISTICS_VIEW_PATH,\r
- MemoryPageLabels.MEMORY_STATISTICS_VIEW_PERSISTENT_BYTE,\r
- MemoryPageLabels.MEMORY_STATISTICS_VIEW_PERSISTENT,\r
- MemoryPageLabels.MEMORY_STATISTICS_VIEW_FREED,\r
- MemoryPageLabels.MEMORY_STATISTICS_VIEW_TOTAL_BYTE,\r
- MemoryPageLabels.MEMORY_STATISTICS_VIEW_TOTAL\r
- };\r
- \r
- int[] sortTypes = { AnalyzerConstants.SORT_TYPE_STRING, AnalyzerConstants.SORT_TYPE_STRING,\r
- AnalyzerConstants.SORT_TYPE_NUM, AnalyzerConstants.SORT_TYPE_NUM,\r
- AnalyzerConstants.SORT_TYPE_STRING, AnalyzerConstants.SORT_TYPE_NUM\r
- };\r
-\r
- public MemoryStatisticsTableView(Composite parent, int style) {\r
- super(parent, style, false);\r
- this.setLayout(new FillLayout());\r
- setTitle(MemoryPageLabels.MEMORY_STATISTICS_VIEW_TITLE);\r
- Composite contents = getContentArea();\r
- contents.setLayout(new FillLayout());\r
- tableComp = new MemoryStatisticsTable(contents, SWT.NONE, SWT.MULTI | SWT.BORDER \r
- | SWT.FULL_SELECTION | SWT.H_SCROLL | SWT.V_SCROLL);\r
- tableComp.setTableName(MemoryPageLabels.MEMORY_STATISTICS_VIEW_TITLE);\r
- tableComp.setComparator(new DefaultTableComparator());\r
- tableComp.setSortTypes(sortTypes);\r
- tableComp.setColumnAlignment(columnAlignment);\r
- tableComp.setColumns(columnNames);\r
- tableComp.setColumnSize(columnSizes);\r
- tableComp.setColumnVisibility(columnVisibility);\r
- tableComp.setTableToolTipEnable(false);\r
- contents.addControlListener(new TableColumnSizePackListener(tableComp, columnSizes));\r
- }\r
- \r
- @Override\r
- public void updateView() {\r
- if (!AnalyzerManager.isVisibleView(this.getID())) {\r
- return;\r
- }\r
- if (null == tableComp) {\r
- return;\r
- }\r
- tableComp.updateTable();\r
- }\r
- \r
- @Override\r
- public void updateView(DAViewData vdata) {\r
- if (vdata instanceof MemorySelectionData == false) {\r
- return;\r
- }\r
- String id = ((MemorySelectionData) vdata).getViewID();\r
- if (!id.endsWith(this.ID)) {\r
- tableComp.removeSelection();\r
- }\r
- tableComp.updateTable();\r
- }\r
- \r
- @Override\r
- public void clear() {\r
- tableComp.clear();\r
- }\r
-\r
- @Override\r
- public Control getControl() {\r
- return tableComp;\r
- }\r
-}\r
+package org.tizen.dynamicanalyzer.ui.memory;
+
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.layout.FillLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.tizen.dynamicanalyzer.common.AnalyzerConstants;
+import org.tizen.dynamicanalyzer.common.AnalyzerManager;
+import org.tizen.dynamicanalyzer.nl.MemoryPageLabels;
+import org.tizen.dynamicanalyzer.ui.memory.data.MemorySelectionData;
+import org.tizen.dynamicanalyzer.ui.memory.table.MemoryStatisticsTable;
+import org.tizen.dynamicanalyzer.ui.widgets.table.DefaultTableComparator;
+import org.tizen.dynamicanalyzer.ui.widgets.table.TableColumnSizePackListener;
+import org.tizen.dynamicanalyzer.widgets.da.view.DAViewComposite;
+import org.tizen.dynamicanalyzer.widgets.da.view.DAViewData;
+
+public class MemoryStatisticsTableView extends DAViewComposite {
+ public static final int PATH_TABLE_INDEX = 0;
+ public static final int PERSISTENT_BYTE_TABLE_INDEX = 1;
+ public static final int PERSISTENT_TABLE_INDEX = 0;
+ public static final int FREED_TABLE_INDEX = 0;
+ public static final int TOTAL_BYTE_TABLE_INDEX = 0;
+ public static final int TOTAL_TABLE_INDEX = 0;
+
+ MemoryStatisticsTable tableComp = null;
+ private int[] columnSizes = { 200 , 110, 110, 110, 110, 110 };
+ private boolean[] columnVisibility = { true, true, true, true, true, true };
+ private int[] columnAlignment = { SWT.LEFT, SWT.LEFT, SWT.LEFT, SWT.LEFT,
+ SWT.LEFT, SWT.LEFT };
+
+ private String[] columnNames = {
+ MemoryPageLabels.MEMORY_STATISTICS_VIEW_PATH,
+ MemoryPageLabels.MEMORY_STATISTICS_VIEW_PERSISTENT_BYTE,
+ MemoryPageLabels.MEMORY_STATISTICS_VIEW_PERSISTENT,
+ MemoryPageLabels.MEMORY_STATISTICS_VIEW_FREED,
+ MemoryPageLabels.MEMORY_STATISTICS_VIEW_TOTAL_BYTE,
+ MemoryPageLabels.MEMORY_STATISTICS_VIEW_TOTAL
+ };
+
+ int[] sortTypes = { AnalyzerConstants.SORT_TYPE_STRING, AnalyzerConstants.SORT_TYPE_STRING,
+ AnalyzerConstants.SORT_TYPE_NUM, AnalyzerConstants.SORT_TYPE_NUM,
+ AnalyzerConstants.SORT_TYPE_STRING, AnalyzerConstants.SORT_TYPE_NUM
+ };
+
+ public MemoryStatisticsTableView(Composite parent, int style) {
+ super(parent, style, false);
+ this.setLayout(new FillLayout());
+ setTitle(MemoryPageLabels.MEMORY_STATISTICS_VIEW_TITLE);
+ Composite contents = getContentArea();
+ contents.setLayout(new FillLayout());
+ tableComp = new MemoryStatisticsTable(contents, SWT.NONE, SWT.MULTI | SWT.BORDER
+ | SWT.FULL_SELECTION | SWT.H_SCROLL | SWT.V_SCROLL);
+ tableComp.setTableName(MemoryPageLabels.MEMORY_STATISTICS_VIEW_TITLE);
+ tableComp.setComparator(new DefaultTableComparator());
+ tableComp.setSortTypes(sortTypes);
+ tableComp.setColumnAlignment(columnAlignment);
+ tableComp.setColumns(columnNames);
+ tableComp.setColumnSize(columnSizes);
+ tableComp.setColumnVisibility(columnVisibility);
+ tableComp.setTableToolTipEnable(false);
+ contents.addControlListener(new TableColumnSizePackListener(tableComp, columnSizes));
+ }
+
+ @Override
+ public void updateView() {
+ if (!AnalyzerManager.isVisibleView(this.getID())) {
+ return;
+ }
+ if (null == tableComp) {
+ return;
+ }
+ tableComp.updateTable();
+ }
+
+ @Override
+ public void updateView(DAViewData vdata) {
+ if (vdata instanceof MemorySelectionData == false) {
+ return;
+ }
+ String id = ((MemorySelectionData) vdata).getViewID();
+ if (!id.endsWith(this.ID)) {
+ tableComp.removeSelection();
+ }
+ tableComp.updateTable();
+ }
+
+ @Override
+ public void clear() {
+ tableComp.clear();
+ }
+
+ @Override
+ public Control getControl() {
+ return tableComp;
+ }
+}
-package org.tizen.dynamicanalyzer.ui.memory.data;\r
+package org.tizen.dynamicanalyzer.ui.memory.chart;\r
\r
import org.eclipse.swt.widgets.Composite;\r
import org.tizen.dynamicanalyzer.resources.ColorResources;\r
--- /dev/null
+package org.tizen.dynamicanalyzer.ui.memory.data;
+
+import java.sql.PreparedStatement;
+import java.util.List;
+
+import org.tizen.dynamicanalyzer.database.DBTable;
+
+public class AllocateCallStackDBTable extends DBTable {
+
+ @Override
+ public boolean prepare(PreparedStatement prep, List<Object> rowData) {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+ @Override
+ public String getTableName() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+}
--- /dev/null
+package org.tizen.dynamicanalyzer.ui.memory.data;
+
+import java.sql.PreparedStatement;
+import java.util.List;
+
+import org.tizen.dynamicanalyzer.database.DBTable;
+
+public class AllocateDBTable extends DBTable {
+
+ @Override
+ public boolean prepare(PreparedStatement prep, List<Object> rowData) {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+ @Override
+ public String getTableName() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+}
package org.tizen.dynamicanalyzer.ui.memory.data;\r
\r
+import java.util.List;\r
import java.util.Map;\r
\r
+import org.tizen.dynamicanalyzer.database.DBInserter;\r
+import org.tizen.dynamicanalyzer.protocol.ProtocolConstants;\r
import org.tizen.dynamicanalyzer.swap.logparser.LogPackage;\r
import org.tizen.dynamicanalyzer.swap.logparser.Logs;\r
import org.tizen.dynamicanalyzer.swap.logparser.PageDataManager;\r
+import org.tizen.dynamicanalyzer.swap.model.data.LogData;\r
\r
public class MemoryDataManager extends PageDataManager {\r
private static MemoryDataManager instance = new MemoryDataManager();\r
\r
- private boolean isSelectFrameRateChart = true;\r
+ private SystemMemoryDBTable systemMemoryDBTable = null;\r
+ private ProcessMemoryDBTable processMemoryDBTable = null;\r
+ private AllocateDBTable allocateDBTable = null;\r
+ private AllocateCallStackDBTable allocateCallStackDBTable = null;\r
+ \r
+ private DBInserter systemMemoryDBInserter = null;\r
+ private DBInserter processMemoryDBInserter = null;\r
+ private DBInserter allocateDBInserter = null;\r
+ private DBInserter allocateCallStackDBInserter = null;\r
\r
public static MemoryDataManager getInstance() {\r
return instance;\r
}\r
\r
protected MemoryDataManager() {\r
+ systemMemoryDBTable = new SystemMemoryDBTable();\r
+ processMemoryDBTable = new ProcessMemoryDBTable();\r
+ allocateDBTable = new AllocateDBTable();\r
+ allocateCallStackDBTable = new AllocateCallStackDBTable();\r
\r
+ systemMemoryDBInserter = makeInserter(systemMemoryDBTable);\r
+ processMemoryDBInserter = makeInserter(processMemoryDBTable);\r
+ allocateDBInserter = makeInserter(allocateDBTable);\r
+ allocateCallStackDBInserter = makeInserter(allocateCallStackDBTable);\r
}\r
\r
public void clear() {\r
\r
@Override\r
protected void makeData(LogPackage pack) {\r
+ Logs systemmemorylogs = getLogsFromLogPackage(pack, ProtocolConstants.MSG_DATA_SYSTEM);\r
+ if (null != systemmemorylogs) {\r
+ makeSystemMemoryData(systemmemorylogs);\r
+ }\r
\r
+ Logs allocatedlogs = getLogsFromLogPackage(pack, ProtocolConstants.MSG_PROBE_MEMORY);\r
+ if (null != allocatedlogs) {\r
+ makeAllocateMemoryData(allocatedlogs);\r
+ }\r
}\r
\r
- public void makeMemoryData(Logs glesLogs) {\r
+ private Logs getLogsFromLogPackage(LogPackage logPack, int logCenterConstants) {\r
+ Logs logs = logPack.getLogs(logCenterConstants);\r
+ if (null == logs || logs.getRawLogs().size() == 0) {\r
+ return null;\r
+ }\r
\r
+ return logs;\r
}\r
\r
- public void setSelectFrameRateChart(boolean isShowFrameRateChart) {\r
- this.isSelectFrameRateChart = isShowFrameRateChart;\r
+ private void makeSystemMemoryData(Logs syslogs) {\r
+ \r
+ }\r
+ \r
+ private void makeAllocateMemoryData(Logs alloclogs) {\r
+ \r
}\r
}\r
import org.tizen.dynamicanalyzer.constant.CommonConstants;\r
\r
public class MemorySelectionData extends DASelectionData {\r
- private int frameTimeIndex = -1;\r
- private String seq = CommonConstants.EMPTY;\r
- private int secondFrameIndex = -1;\r
-\r
+ \r
public MemorySelectionData(String id, int frameIndex, int secondFrameIndex,\r
String seq) {\r
super(id, null);\r
- this.frameTimeIndex = frameIndex;\r
- this.seq = seq;\r
- this.secondFrameIndex = secondFrameIndex;\r
+ \r
}\r
}\r
--- /dev/null
+package org.tizen.dynamicanalyzer.ui.memory.data;
+
+import java.sql.PreparedStatement;
+import java.util.List;
+
+import org.tizen.dynamicanalyzer.database.DBTable;
+
+public class ProcessMemoryDBTable extends DBTable {
+
+ @Override
+ public boolean prepare(PreparedStatement prep, List<Object> rowData) {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+ @Override
+ public String getTableName() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+}
--- /dev/null
+package org.tizen.dynamicanalyzer.ui.memory.data;
+
+import java.sql.PreparedStatement;
+import java.util.List;
+
+import org.tizen.dynamicanalyzer.database.DBTable;
+
+public class SystemMemoryDBTable extends DBTable {
+
+ @Override
+ public boolean prepare(PreparedStatement prep, List<Object> rowData) {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+ @Override
+ public String getTableName() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+}
-package org.tizen.dynamicanalyzer.ui.memory.data;\r
+package org.tizen.dynamicanalyzer.ui.memory.table;\r
\r
import java.util.List;\r
\r
--- /dev/null
+package org.tizen.dynamicanalyzer.ui.memory.table;
+
+import java.util.List;
+
+import org.eclipse.swt.widgets.Composite;
+import org.tizen.dynamicanalyzer.model.TableInput;
+import org.tizen.dynamicanalyzer.ui.widgets.table.DATableComposite;
+
+public class MemoryCallStackTable extends DATableComposite {
+
+ public MemoryCallStackTable(Composite parent, int style) {
+ super(parent, style);
+ // TODO Auto-generated constructor stub
+ }
+
+ public MemoryCallStackTable(Composite parent, int compStyle, int tableStyle) {
+ super(parent, compStyle, tableStyle);
+ // TODO Auto-generated constructor stub
+ }
+
+ @Override
+ protected List<TableInput> makeTableInput() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+}
-package org.tizen.dynamicanalyzer.ui.memory.data;\r
+package org.tizen.dynamicanalyzer.ui.memory.table;\r
\r
import java.util.List;\r
\r
--- /dev/null
+package org.tizen.dynamicanalyzer.ui.memory.table;
+
+import java.util.List;
+
+import org.eclipse.swt.widgets.Composite;
+import org.tizen.dynamicanalyzer.model.TableInput;
+import org.tizen.dynamicanalyzer.ui.widgets.table.DATableComposite;
+
+public class MemoryMapTable extends DATableComposite {
+
+ public MemoryMapTable(Composite parent, int style, int tableStyle) {
+ super(parent, style, tableStyle);
+ // TODO Auto-generated method stub
+ }
+
+ @Override
+ protected List<TableInput> makeTableInput() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+}
-package org.tizen.dynamicanalyzer.ui.memory.data;\r
+package org.tizen.dynamicanalyzer.ui.memory.table;\r
\r
import java.util.List;\r
\r