From d140629b891c9f86132431d9d41cf6b7b98f69e4 Mon Sep 17 00:00:00 2001 From: Vladislav Eliseev Date: Thu, 20 Oct 2016 17:55:23 +0300 Subject: [PATCH] SRADA-1166: renamed classes related to Persistent Allocations view Previous view named as Allocation Trace was renamed. Now all related classes are named consistently. Change-Id: I0c09dc30afbcc53743505d1f2af44e6b7223629d --- .../org/tizen/dynamicanalyzer/ui/memory/MemoryPage.java | 12 ++++++------ ...ew.java => MemoryPersistentAllocationsTableView.java} | 12 ++++++------ ....java => PersistentAllocationsSelectionListener.java} | 12 ++++++------ .../ui/memory/table/MemoryCallStackTable.java | 16 ++++++++-------- ...eTable.java => MemoryPersistentAllocationsTable.java} | 12 ++++++------ 5 files changed, 32 insertions(+), 32 deletions(-) rename org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/memory/{MemoryAllocationTraceTableView.java => MemoryPersistentAllocationsTableView.java} (89%) rename org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/memory/{AllocationTraceSelectionListener.java => PersistentAllocationsSelectionListener.java} (78%) rename org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/memory/table/{MemoryAllocationTraceTable.java => MemoryPersistentAllocationsTable.java} (94%) 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 9ecd160..87a91b3 100644 --- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/memory/MemoryPage.java +++ b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/memory/MemoryPage.java @@ -42,7 +42,7 @@ import org.tizen.dynamicanalyzer.shortcut.ShortCutManager; import org.tizen.dynamicanalyzer.ui.memory.chart.MemoryChartBoard; import org.tizen.dynamicanalyzer.ui.memory.data.HeapDataManager; import org.tizen.dynamicanalyzer.ui.memory.data.MemoryDataManager; -import org.tizen.dynamicanalyzer.ui.memory.table.MemoryAllocationTraceTable; +import org.tizen.dynamicanalyzer.ui.memory.table.MemoryPersistentAllocationsTable; import org.tizen.dynamicanalyzer.ui.memory.table.MemoryStatisticsTable; import org.tizen.dynamicanalyzer.ui.page.BaseView; import org.tizen.dynamicanalyzer.ui.page.PageInfoRegistry; @@ -59,7 +59,7 @@ public class MemoryPage extends DAPageComposite { public static final String chartViewID = MemoryChartView.class.getName(); public static final String detailsViewID = MemoryDetailsTableView.class.getName(); public static final String mapViewID = MemoryMapView.class.getName(); - public static final String allocationtraceViewID = MemoryAllocationTraceTableView.class.getName(); + public static final String allocationtraceViewID = MemoryPersistentAllocationsTableView.class.getName(); SashForm baseForm; SashForm topForm; @@ -73,7 +73,7 @@ public class MemoryPage extends DAPageComposite { MemoryDetailsTableView memoryDetailsTableView; MemoryRangeAnalysisView memoryRangeAnalysisView; MemoryStatisticsTableView memoryStatisticsTableView; - MemoryAllocationTraceTableView memoryAllocationTraceTableView; + MemoryPersistentAllocationsTableView memoryAllocationTraceTableView; MemoryMapView memoryMapView; MemoryCallStackView memoryCallStackView; @@ -124,9 +124,9 @@ public class MemoryPage extends DAPageComposite { memoryTabView.addView(memoryStatisticsTableView, false); addView(memoryStatisticsTableView); - memoryAllocationTraceTableView = new MemoryAllocationTraceTableView(memoryTabView.getContentComposite(), SWT.NONE); - ((MemoryAllocationTraceTable) memoryAllocationTraceTableView.getControl()) - .getTable().addSelectionListener(new AllocationTraceSelectionListener(this)); + memoryAllocationTraceTableView = new MemoryPersistentAllocationsTableView(memoryTabView.getContentComposite(), SWT.NONE); + ((MemoryPersistentAllocationsTable) memoryAllocationTraceTableView.getControl()) + .getTable().addSelectionListener(new PersistentAllocationsSelectionListener(this)); memoryTabView.addView(memoryAllocationTraceTableView, false); addView(memoryAllocationTraceTableView); } diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/memory/MemoryAllocationTraceTableView.java b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/memory/MemoryPersistentAllocationsTableView.java similarity index 89% rename from org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/memory/MemoryAllocationTraceTableView.java rename to org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/memory/MemoryPersistentAllocationsTableView.java index 3b95935..2338412 100644 --- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/memory/MemoryAllocationTraceTableView.java +++ b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/memory/MemoryPersistentAllocationsTableView.java @@ -32,13 +32,13 @@ import org.tizen.dynamicanalyzer.common.AnalyzerManager; import org.tizen.dynamicanalyzer.common.DASelectionData; import org.tizen.dynamicanalyzer.common.DAState; import org.tizen.dynamicanalyzer.nl.MemoryPageLabels; -import org.tizen.dynamicanalyzer.ui.memory.table.MemoryAllocationTraceTable; +import org.tizen.dynamicanalyzer.ui.memory.table.MemoryPersistentAllocationsTable; import org.tizen.dynamicanalyzer.widgets.da.view.DAViewComposite; import org.tizen.dynamicanalyzer.widgets.da.view.DAViewData; -public class MemoryAllocationTraceTableView extends DAViewComposite { +public class MemoryPersistentAllocationsTableView extends DAViewComposite { - public static final String ID = MemoryAllocationTraceTableView.class.getName(); + public static final String ID = MemoryPersistentAllocationsTableView.class.getName(); public static final int SEC_TABLE_INDEX = 0; public static final int TIMESTAMP_TABLE_INDEX = 1; @@ -48,7 +48,7 @@ public class MemoryAllocationTraceTableView extends DAViewComposite { public static final int LIBRARY_TABLE_INDEX = 5; public static final int CALLER_FUNCTION_TABLE_INDEX = 6; - private MemoryAllocationTraceTable tableComp = null; + private MemoryPersistentAllocationsTable tableComp = null; private boolean firstUpdate; private boolean tableVisible; @@ -56,7 +56,7 @@ public class MemoryAllocationTraceTableView extends DAViewComposite { private boolean[] columnVisibilityEnable = { false, true, true, true, true, true, true, true, true, false }; private boolean[] columnVisibilityDisable = { false, false, false, false, false, false, false, false, false, true }; - public MemoryAllocationTraceTableView(Composite parent, int style) { + public MemoryPersistentAllocationsTableView(Composite parent, int style) { super(parent, style, false); this.setLayout(new FillLayout()); setTitle(MemoryPageLabels.MEMORY_ALLOCATION_TRACE_VIEW_TITLE); @@ -66,7 +66,7 @@ public class MemoryAllocationTraceTableView extends DAViewComposite { tableVisible = false; firstUpdate = true; - tableComp = new MemoryAllocationTraceTable(contents, SWT.NONE, SWT.BORDER + tableComp = new MemoryPersistentAllocationsTable(contents, SWT.NONE, SWT.BORDER | SWT.FULL_SELECTION | SWT.H_SCROLL | SWT.V_SCROLL); tableComp.setColumnVisibility(columnVisibilityEnable); diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/memory/AllocationTraceSelectionListener.java b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/memory/PersistentAllocationsSelectionListener.java similarity index 78% rename from org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/memory/AllocationTraceSelectionListener.java rename to org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/memory/PersistentAllocationsSelectionListener.java index 6995816..8cc8791 100644 --- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/memory/AllocationTraceSelectionListener.java +++ b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/memory/PersistentAllocationsSelectionListener.java @@ -7,17 +7,17 @@ import org.eclipse.nebula.widgets.grid.GridItem; import org.eclipse.swt.events.SelectionAdapter; import org.eclipse.swt.events.SelectionEvent; import org.tizen.dynamicanalyzer.ui.memory.chart.MemoryChartBoard; -import org.tizen.dynamicanalyzer.ui.memory.table.MemoryAllocationTraceTable.MemoryAllocationTraceTableIndex; +import org.tizen.dynamicanalyzer.ui.memory.table.MemoryPersistentAllocationsTable.MemoryPersistentAllocationsTableIndex; import org.tizen.dynamicanalyzer.ui.timeline.common.TimelineConstants; import org.tizen.dynamicanalyzer.ui.widgets.table.DATableDataFormat; import org.tizen.dynamicanalyzer.widgets.chart.DAChartPlot; import org.tizen.dynamicanalyzer.widgets.chart.DAChartPlotIntervalMarker; import org.tizen.dynamicanalyzer.widgets.chart.DAChartPlotMarker; -public class AllocationTraceSelectionListener extends SelectionAdapter { +public class PersistentAllocationsSelectionListener extends SelectionAdapter { MemoryPage page; - public AllocationTraceSelectionListener(MemoryPage memoryPage) { + public PersistentAllocationsSelectionListener(MemoryPage memoryPage) { page = memoryPage; } @@ -36,16 +36,16 @@ public class AllocationTraceSelectionListener extends SelectionAdapter { if (size == 1) { // one item selected - find one point on chart. List data = ((DATableDataFormat) items[0].getData()).getData(); - long time_micSec = (Long) data.get(MemoryAllocationTraceTableIndex.TIMESTAMP.getIndex()); + long time_micSec = (Long) data.get(MemoryPersistentAllocationsTableIndex.TIMESTAMP.getIndex()); eventStartTime_sec = time_micSec / TimelineConstants.MEGA_DOUBLE; eventEndTime_sec = eventStartTime_sec; } else { // few items selected - find corresponding range on chart. List startData = ((DATableDataFormat) items[0].getData()).getData(); List endData = ((DATableDataFormat) items[size - 1].getData()).getData(); - long startTime_micSec = (Long) startData.get(MemoryAllocationTraceTableIndex.TIMESTAMP.getIndex()); + long startTime_micSec = (Long) startData.get(MemoryPersistentAllocationsTableIndex.TIMESTAMP.getIndex()); eventStartTime_sec = startTime_micSec / TimelineConstants.MEGA_DOUBLE; - long endTime_micSec = (Long) endData.get(MemoryAllocationTraceTableIndex.TIMESTAMP.getIndex()); + long endTime_micSec = (Long) endData.get(MemoryPersistentAllocationsTableIndex.TIMESTAMP.getIndex()); eventEndTime_sec = endTime_micSec / TimelineConstants.MEGA_DOUBLE; } 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 e760dbe..647e56c 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 @@ -39,10 +39,10 @@ import org.tizen.dynamicanalyzer.common.Global; import org.tizen.dynamicanalyzer.model.TableInput; import org.tizen.dynamicanalyzer.project.callstack.RuntimeCallstackManager; import org.tizen.dynamicanalyzer.ui.info.callstack.CallStackUnit; -import org.tizen.dynamicanalyzer.ui.memory.MemoryAllocationTraceTableView; +import org.tizen.dynamicanalyzer.ui.memory.MemoryPersistentAllocationsTableView; import org.tizen.dynamicanalyzer.ui.memory.data.HeapDataManager; import org.tizen.dynamicanalyzer.ui.memory.data.MemAllocDBTable; -import org.tizen.dynamicanalyzer.ui.memory.table.MemoryAllocationTraceTable.MemoryAllocationTraceTableIndex; +import org.tizen.dynamicanalyzer.ui.memory.table.MemoryPersistentAllocationsTable.MemoryPersistentAllocationsTableIndex; import org.tizen.dynamicanalyzer.ui.timeline.common.TimelineTableView; import org.tizen.dynamicanalyzer.ui.widgets.table.DATableComposite; import org.tizen.dynamicanalyzer.ui.widgets.table.DATableDataFormat; @@ -103,7 +103,7 @@ public class MemoryCallStackTable extends DATableComposite { return; } String viewId = selData.getViewID(); - if (!viewId.equals(MemoryAllocationTraceTableView.class.getName())) + if (!viewId.equals(MemoryPersistentAllocationsTableView.class.getName())) return; Object obj = selData.getData(); @@ -123,14 +123,14 @@ public class MemoryCallStackTable extends DATableComposite { if (tableData.getType() == AnalyzerConstants.TYPE_TABLE_MEM_ALLOCATEDTRACE) { List memAllocationData = tableData.getData(); - seqNum = (Long) memAllocationData.get(MemoryAllocationTraceTableIndex.SEQ.getIndex()); + seqNum = (Long) memAllocationData.get(MemoryPersistentAllocationsTableIndex.SEQ.getIndex()); time = (Long) memAllocationData - .get(MemoryAllocationTraceTableIndex.TIMESTAMP + .get(MemoryPersistentAllocationsTableIndex.TIMESTAMP .getIndex()); - allocPath = (String) memAllocationData.get(MemoryAllocationTraceTableIndex.LIBRARY.getIndex()); + allocPath = (String) memAllocationData.get(MemoryPersistentAllocationsTableIndex.LIBRARY.getIndex()); allocName = (String) memAllocationData - .get(MemoryAllocationTraceTableIndex.CALLED.getIndex()); - pid = (Integer) memAllocationData.get(MemoryAllocationTraceTableIndex.PID.getIndex()); + .get(MemoryPersistentAllocationsTableIndex.CALLED.getIndex()); + pid = (Integer) memAllocationData.get(MemoryPersistentAllocationsTableIndex.PID.getIndex()); List row = getAllocationInfo(seqNum); if (row!=null) allocCallerAddr = (long) row.get(MemAllocDBTable.COLUMN.CALLER_PC_ADDRESS.index); diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/memory/table/MemoryAllocationTraceTable.java b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/memory/table/MemoryPersistentAllocationsTable.java similarity index 94% rename from org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/memory/table/MemoryAllocationTraceTable.java rename to org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/memory/table/MemoryPersistentAllocationsTable.java index 3e1ac5b..6e423db 100644 --- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/memory/table/MemoryAllocationTraceTable.java +++ b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/memory/table/MemoryPersistentAllocationsTable.java @@ -51,9 +51,9 @@ import org.tizen.dynamicanalyzer.ui.widgets.table.DefaultTableComparator; import org.tizen.dynamicanalyzer.ui.widgets.table.TableColumnSizePackListener; import org.tizen.dynamicanalyzer.widgets.timeline.MarkerManager; -public class MemoryAllocationTraceTable extends DATableComposite { +public class MemoryPersistentAllocationsTable extends DATableComposite { - public enum MemoryAllocationTraceTableIndex{ + public enum MemoryPersistentAllocationsTableIndex{ SEQ(0), TIMESTAMP(1), PID(2), @@ -66,7 +66,7 @@ public class MemoryAllocationTraceTable extends DATableComposite { RUNTIME_STUB(9); private int index; - private MemoryAllocationTraceTableIndex(int index){ + private MemoryPersistentAllocationsTableIndex(int index){ this.index = index; } public int getIndex(){ @@ -86,7 +86,7 @@ public class MemoryAllocationTraceTable extends DATableComposite { private Long StartTime; private Long EndTime; - public MemoryAllocationTraceTable(Composite parent, int style, int tableStyle) { + public MemoryPersistentAllocationsTable(Composite parent, int style, int tableStyle) { super(parent, style, tableStyle); StartTime = (long)0; @@ -136,8 +136,8 @@ public class MemoryAllocationTraceTable extends DATableComposite { int size = items.length; List startData = ((DATableDataFormat) items[0].getData()).getData(); List endData = ((DATableDataFormat) items[size - 1].getData()).getData(); - long startTime = (Long) startData.get(MemoryAllocationTraceTableIndex.TIMESTAMP.getIndex()); - long endTime = (Long) endData.get(MemoryAllocationTraceTableIndex.TIMESTAMP.getIndex()); + long startTime = (Long) startData.get(MemoryPersistentAllocationsTableIndex.TIMESTAMP.getIndex()); + long endTime = (Long) endData.get(MemoryPersistentAllocationsTableIndex.TIMESTAMP.getIndex()); Toolbar.INSTANCE.setChartDragStartTime(startTime); Toolbar.INSTANCE.setChartDragEndTime(endTime); Toolbar.INSTANCE.setDlogSelection(false); -- 2.7.4