SRADA-886 Fixed minor issues.
authorp.privalov <p.privalov@partner.samsung.com>
Wed, 7 Sep 2016 13:26:37 +0000 (16:26 +0300)
committerp.privalov <p.privalov@partner.samsung.com>
Thu, 15 Sep 2016 08:38:21 +0000 (11:38 +0300)
Changes:
 * Renamed "Unknown" tab values to "<unknown>".
 * PC_Address is in lower case now in memory callstack table and in timeline
   callstack table.
 * Removed wrong address from caller function line in memory callstack table.

Change-Id: I11e10953670f3f6b503ae12f4407ff8d1034a565

org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/info/callstack/CallstackTable.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/memory/table/MemoryCallStackTable.java

index 6cbc519..83451eb 100644 (file)
@@ -182,7 +182,7 @@ public class CallstackTable extends DATableComposite {
                                }
 
                                String addrInput = (addrs.get(i) == 0) ? "" : hexAddr; //$NON-NLS-1$
-                               gridItem.setText(1, addrInput);
+                               gridItem.setText(1, addrInput.toLowerCase());
 
                                String fName = api.getFunctionName();
 
index c409798..0e71fbd 100644 (file)
@@ -50,6 +50,9 @@ import org.tizen.dynamicanalyzer.widgets.da.view.DAViewData;
 
 public class MemoryCallStackTable extends DATableComposite {
 
+       private String UNKNOWN = "<unknown>";
+       private String UNKNOWN_LIBRARY = "<unknown library>";
+
        public MemoryCallStackTable(Composite parent, int style) {
                super(parent, style);
                // TODO Auto-generated constructor stub
@@ -143,8 +146,8 @@ public class MemoryCallStackTable extends DATableComposite {
                        gridItem.setData(AnalyzerConstants.CALLSTACK_KEY_LIBNAME, allocPath);
 
                        gridItem.setText(0, allocName);
-                       gridItem.setText(1, "Unknown");
-                       gridItem.setText(2, "Unknown");
+                       gridItem.setText(1, UNKNOWN);
+                       gridItem.setText(2, UNKNOWN_LIBRARY);
 
                        gridItem = new GridItem(table, SWT.NONE);
                        gridItem.setData(callstackTableData);
@@ -153,8 +156,10 @@ public class MemoryCallStackTable extends DATableComposite {
                        gridItem.setData(AnalyzerConstants.CALLSTACK_KEY_TIME, time);
                        gridItem.setData(AnalyzerConstants.CALLSTACK_KEY_LIBNAME, allocPath);
 
-                       gridItem.setText(0, "Unknown");
-                       String addrInput = (allocAddr == 0) ? "" : Formatter.toHexString(Long.toString(allocAddr)); //$NON-NLS-1$
+                       gridItem.setText(0, UNKNOWN);
+                       String addrInput = (allocAddr == 0)
+                                       ? UNKNOWN
+                                       : Formatter.toHexString(Long.toString(allocAddr)).toLowerCase(); //$NON-NLS-1$
                        gridItem.setText(1, addrInput);
                        gridItem.setText(2, allocPath);
 
@@ -176,23 +181,21 @@ public class MemoryCallStackTable extends DATableComposite {
                                        break;
                                }
 
+                               long address = addrs.get(i);
+
                                gridItem = new GridItem(table, SWT.NONE);
                                // setData block
-                               {
-                                       long address = addrs.get(i);
-                                       callstackTableData = new DATableDataFormat(address);
-                                       callstackTableData.setType(AnalyzerConstants.TYPE_TABLE_MEM_CALLSTACK);
-                                       callstackTableData.setObject(address);
-                                       gridItem.setData(callstackTableData);
-                                       gridItem.setData(AnalyzerConstants.CALLSTACK_KEY_ADDR, address);
-                                       gridItem.setData(AnalyzerConstants.CALLSTACK_KEY_PID, pid);
-                                       gridItem.setData(AnalyzerConstants.CALLSTACK_KEY_TIME, time);
-                                       gridItem.setData(AnalyzerConstants.CALLSTACK_KEY_LIBNAME,
-                                                       path);
-                               }
-
-                               addrInput = (addrs.get(i) == 0) ? "" : hexAddr; //$NON-NLS-1$
-                               gridItem.setText(1, addrInput);
+                               callstackTableData = new DATableDataFormat(address);
+                               callstackTableData.setType(AnalyzerConstants.TYPE_TABLE_MEM_CALLSTACK);
+                               callstackTableData.setObject(address);
+                               gridItem.setData(callstackTableData);
+                               gridItem.setData(AnalyzerConstants.CALLSTACK_KEY_ADDR, address);
+                               gridItem.setData(AnalyzerConstants.CALLSTACK_KEY_PID, pid);
+                               gridItem.setData(AnalyzerConstants.CALLSTACK_KEY_TIME, time);
+                               gridItem.setData(AnalyzerConstants.CALLSTACK_KEY_LIBNAME, path);
+
+                               addrInput = (address == 0) ? UNKNOWN : hexAddr; //$NON-NLS-1$
+                               gridItem.setText(1, addrInput.toLowerCase());
                                String fName = api.getFunctionName();
                                gridItem.setText(0, fName);
                                gridItem.setText(2, path);