[Title] bug fiexd
authorjooyoul_lee <jy.exe.lee@samsung.com>
Mon, 4 Nov 2013 03:01:15 +0000 (12:01 +0900)
committerjooyoul_lee <jy.exe.lee@samsung.com>
Mon, 4 Nov 2013 03:01:15 +0000 (12:01 +0900)
[Desc.] warning detail view fixed, snapshot view sync fixed, process chart numberformat exception fixed.
[Issue]

13 files changed:
org.tizen.dynamicanalyzer.widgets/src/org/tizen/dynamicanalyzer/widgets/button/DACustomButton.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/nl/SummaryLabels.properties
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/swap/model/data/ProfileData.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/file/FilePage.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/info/snapshot/SnapshotView.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/network/NetworkPage.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/opengl/ui/GLPage.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/range/RangePage.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/summary/SummaryPage.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/thread/ThreadPage.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/timeline/TimelinePage.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/timeline/chart/CPUChart.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/userinterface/UIPage.java

index 8374a3d..560a859 100644 (file)
@@ -239,8 +239,7 @@ public class DACustomButton extends Canvas {
         * Sets default state colors
         */
        private void setDefaultColors() {
-               attr.setColor(STATE_DISABLE,
-                               ColorResources.BUTTON_STATE_DISABLE);
+               attr.setColor(STATE_DISABLE, ColorResources.BUTTON_STATE_DISABLE);
                attr.setColor(STATE_PUSH, ColorResources.BUTTON_STATE_PUSH);
                attr.setColor(STATE_HOVER, ColorResources.BUTTON_STATE_HOVER);
                attr.setColor(STATE_NORMAL, ColorResources.BUTTON_STATE_NORMAL);
index c0f8f39..29dc264 100644 (file)
@@ -20,14 +20,14 @@ FUNCTION_USER_PROFILING_VIEW_CALL_COUNT=Call count
 FUNCTION_USER_PROFILING_VIEW_EXCLUSIVE=Exclusive
 FUNCTION_USER_PROFILING_VIEW_INCLUSIVE=Inclusive
 
-WARNING_CASE_BRIEF_DUPLICATE=Duplicate file open.
-WARNING_CASE_BRIEF_NO_OPERATION=File closed without using it.
-WARNING_CASE_BRIEF_JOINABLE_LEAK=The joinable thread must call the join() method.
-WARNING_CASE_POST_FIX_DUPLICATE=File open multiple times with different file descriptors. It is recommended to open the file once and share the file descriptor.
-WARNING_CASE_POST_FIX_NO_OPERATION=File closed without accessing it. It is recommended to check if the file must be opened.
-WARNING_CASE_POST_FIX_JOINABLE_LEAK=If the thread is joinable, the join() method must be called, else it could create memory leaks. 
-WARNING_CASE_BRIEF_CLOSED_FD_FOR_FAILED_FD=FD that cannot be used is not closed.
-WARNING_CASE_POST_CLOSED_FD_FOR_FAILED_FD=State of the FD was closed, it is not possible to use this FD anymore, Please close the FD.
+WARNING_CASE_BRIEF_DUPLICATE= Duplicate file open.
+WARNING_CASE_BRIEF_NO_OPERATION= File closed without using it.
+WARNING_CASE_BRIEF_JOINABLE_LEAK= The joinable thread must call the join() method.
+WARNING_CASE_POST_FIX_DUPLICATE=File open multiple times with different file descriptors. It is recommended to open the file once and share the file descriptor.
+WARNING_CASE_POST_FIX_NO_OPERATION=File closed without accessing it. It is recommended to check if the file must be opened.
+WARNING_CASE_POST_FIX_JOINABLE_LEAK=If the thread is joinable, the join() method must be called, else it could create memory leaks. 
+WARNING_CASE_BRIEF_CLOSED_FD_FOR_FAILED_FD= FD that cannot be used is not closed.
+WARNING_CASE_POST_CLOSED_FD_FOR_FAILED_FD=State of the FD was closed, it is not possible to use this FD anymore, Please close the FD.
 
 WARNING_CASE_PRE_FIX=<
 
index b74399a..78bc681 100644 (file)
@@ -94,7 +94,7 @@ public class ProfileData extends LogData {
                        cpuNum = ByteUtils.toInt(data, index);
                        index += INT_SIZE;
                        ArgsInfo info = LogDataUtils.parseArgs(data, index);
-                       args = info.getProfileArgs();
+                       args = info.getArgs();
                        break;
                case MSG_FUNCTION_EXIT:
                        logCount++;
@@ -257,7 +257,6 @@ public class ProfileData extends LogData {
                prep.setLong(index++, ret);
                prep.setString(index++, args);
                prep.setString(index++, apiName);
-               prep.setString(index++, libName);
                prep.setString(index++, callstack);
        }
 
index 371ba50..8931cd2 100644 (file)
@@ -67,7 +67,7 @@ public class FilePage extends DAPageComposite {
                addView(tabView);
                {
                        SnapshotView snapshotView = new SnapshotView(
-                                       tabView.getContentComposite(), SWT.NONE, false);
+                                       tabView.getContentComposite(), SWT.NONE, false, name);
                        snapshotView.setObservingViews(new String[] { FileApiListView.ID });
                        tabView.addView(snapshotView, false);
 
index 9ebed10..12e7d29 100644 (file)
@@ -61,6 +61,7 @@ import org.tizen.dynamicanalyzer.swap.logparser.LogPackage;
 import org.tizen.dynamicanalyzer.swap.logparser.Logs;
 import org.tizen.dynamicanalyzer.swap.model.data.LogData;
 import org.tizen.dynamicanalyzer.swap.model.data.SystemData;
+import org.tizen.dynamicanalyzer.ui.page.DAPageComposite;
 import org.tizen.dynamicanalyzer.ui.page.ViewAction;
 import org.tizen.dynamicanalyzer.ui.widgets.ViewContainer;
 import org.tizen.dynamicanalyzer.ui.widgets.table.DATableComposite;
@@ -93,11 +94,14 @@ public class SnapshotView extends DAView {
        private long lastStartTime = 0;
        private long selectTime = -1;
 
+       private String pageName = null;
+
        private DACustomButton latestButton = null;
 
-       public SnapshotView(Composite parent, int style, boolean title) {
+       public SnapshotView(Composite parent, int style, boolean title, String page) {
                super(parent, style);
                name = InformationViewLabels.SNAPSHOT_VIEW_TITLE;
+               pageName = page;
                this.setLayout(new FillLayout());
 
                ViewContainer viewContainer = new ViewContainer(this, title);
@@ -333,7 +337,7 @@ public class SnapshotView extends DAView {
                } else if (latestButton.isButtonEnabled()) {
                        setStartTime(selectTime);
                }
-//             computeData();
+               // computeData();
                Display.getDefault().syncExec(new Runnable() {
                        @Override
                        public void run() {
@@ -393,27 +397,33 @@ public class SnapshotView extends DAView {
 
        @Override
        public void updateLog(LogPackage logPack) {
-               Logs logs = logPack.getLogs(DataChannelConstants.MSG_DATA_SYSTEM);
-               if (null == logs || null == logs.getLogs() || logs.getLogs().isEmpty()) {
-                       return;
-               }
-               List<LogData> inputs = logs.getLogs();
-               int lastIndex = inputs.size() - 1;
-               SystemData input = (SystemData) inputs.get(lastIndex);
+               DAPageComposite currentPage = AnalyzerManager.getCurrentPage();
+               if (currentPage.getViewName().equals(pageName)
+                               && !latestButton.isButtonEnabled()) {
+                       Logs logs = logPack.getLogs(DataChannelConstants.MSG_DATA_SYSTEM);
+                       if (null == logs || null == logs.getLogs()
+                                       || logs.getLogs().isEmpty()) {
+                               return;
+                       }
+                       List<LogData> inputs = logs.getLogs();
+                       int lastIndex = inputs.size() - 1;
+                       SystemData input = (SystemData) inputs.get(lastIndex);
+
+                       String[] cpuRates = input.getCpuLoad().split(CommonConstants.COMMA);
+                       cpuUsage.clear();
+                       for (int i = 0; i < cpuRates.length - 1; i++) {
+                               String cpu = cpuRates[i].trim();
+                               long value = (long) Float.parseFloat(cpu);
+                               cpuUsage.add(value);
+                       }
 
-               String[] cpuRates = input.getCpuLoad().split(CommonConstants.COMMA);
-               cpuUsage.clear();
-               for (int i = 0; i < cpuRates.length - 1; i++) {
-                       String cpu = cpuRates[i].trim();
-                       long value = (long) Float.parseFloat(cpu);
-                       cpuUsage.add(value);
-               }
+                       long totalMem = AnalyzerManager.getProject().getSystemMemorySize();
+                       maxMem = totalMem;
+                       processMem = input.getResidentMemory();
+                       lastStartTime = input.getTime();
 
-               long totalMem = AnalyzerManager.getProject().getSystemMemorySize();
-               maxMem = totalMem;
-               processMem = input.getResidentMemory();
-               lastStartTime = input.getTime();
-               setStartTime(lastStartTime);
+                       setStartTime(lastStartTime);
+               }
        }
 
        @Override
index 10bbd36..07c6c5b 100644 (file)
@@ -68,7 +68,7 @@ public class NetworkPage extends DAPageComposite {
                addView(tabView);
                {
                        SnapshotView snapshotView = new SnapshotView(
-                                       tabView.getContentComposite(), SWT.NONE, false);
+                                       tabView.getContentComposite(), SWT.NONE, false, name);
                        snapshotView.setObservingViews(new String[] { NetworkApiListView.ID });
                        tabView.addView(snapshotView, false);
 
index d808c5e..c1bfa9f 100644 (file)
@@ -95,7 +95,7 @@ public class GLPage extends DAPageComposite {
                DATabComposite tabView = new DATabComposite(rightForm, SWT.NONE);
                addView(tabView);
                SnapshotView snapshotView = new SnapshotView(
-                               tabView.getContentComposite(), SWT.NONE, false);
+                               tabView.getContentComposite(), SWT.NONE, false, name);
                snapshotView.setObservingViews(new String[] { GLAPIListView.ID });
                tabView.addView(snapshotView, false);
 
index 4c49963..9f45a59 100644 (file)
@@ -73,7 +73,7 @@ public class RangePage extends DAPageComposite {
                addView(tabView);
                {
                        SnapshotView currentView = new SnapshotView(
-                                       tabView.getContentComposite(), SWT.NONE, false);
+                                       tabView.getContentComposite(), SWT.NONE, false, name);
                        tabView.addView(currentView, false);
 
                        CallstackView callstack = new CallstackView(
index 90a97aa..48af3e4 100644 (file)
@@ -81,7 +81,7 @@ public class SummaryPage extends DAPageComposite {
                addView(tabView);
                {
                        SnapshotView snapshotView = new SnapshotView(
-                                       tabView.getContentComposite(), SWT.NONE, false);
+                                       tabView.getContentComposite(), SWT.NONE, false, name);
                        tabView.addView(snapshotView, false);
                        snapshotView.setObservingViews(new String[] { FailedApiListView.ID,
                                        LeakView.ID, WarningListView.ID });
index 3d91305..7e3606d 100644 (file)
@@ -70,7 +70,7 @@ public class ThreadPage extends DAPageComposite {
                addView(tabView);
                {
                        SnapshotView snapshotView = new SnapshotView(
-                                       tabView.getContentComposite(), SWT.NONE, false);
+                                       tabView.getContentComposite(), SWT.NONE, false, name);
                        snapshotView
                                        .setObservingViews(new String[] { ThreadAPIListView.ID });
                        tabView.addView(snapshotView, false);
index 8fa8f04..1bf94d4 100644 (file)
@@ -63,7 +63,7 @@ public class TimelinePage extends DAPageComposite {
                addView(tabView);
                {
                        SnapshotView snapshotView = new SnapshotView(
-                                       tabView.getContentComposite(), SWT.NONE, false);
+                                       tabView.getContentComposite(), SWT.NONE, false, name);
                        snapshotView.setObservingViews(new String[] { TimelineView.ID });
                        tabView.addView(snapshotView, false);
 
index 02ffe7f..d6465b7 100644 (file)
@@ -163,7 +163,7 @@ public class CPUChart extends TimelineChart {
                                        DAChart childChart = childItem.getChart();
                                        DAChartPlot childPlot = childChart.getPlot();
                                        DAChartPlotTooltip tooltip = new DAChartPlotTooltip(-1);
-                                       
+
                                        childPlot.setBackgroundImage(ImageResources.BG_GRADIENT);
                                        tooltip.setFont(FontResources.CHART_TOOLTIP_FONT);
                                        childPlot.setTooltip(tooltip);
@@ -206,7 +206,7 @@ public class CPUChart extends TimelineChart {
                                        clearItem.setText(TimelineChartLabels.RANGE_CONTEXT_CLEAR);
                                        clearItem
                                                        .addListener(new PopupClearMenuItemClickListener());
-                                       
+
                                        TimelineChartMouseEventListener timelineChartMouseEventListener = new TimelineChartMouseEventListener(
                                                        popupMenu, chartBoard.getTimeline());
                                        childChart
@@ -224,7 +224,11 @@ public class CPUChart extends TimelineChart {
 
                int prevChildSize = childSeriesMap.size();
                for (int i = 0; i < processLoadDatas.length; i++) {
-                       int pid = Integer.parseInt(processLoadDatas[i]);
+                       String processLoad = processLoadDatas[i];
+                       if (null == processLoad || processLoad.isEmpty()) {
+                               continue;
+                       }
+                       int pid = Integer.parseInt(processLoad);
                        double load = Double.parseDouble(processLoadDatas[++i]);
 
                        DAChartSeries series = childSeriesMap.get(pid);
@@ -260,7 +264,7 @@ public class CPUChart extends TimelineChart {
        public void setChartBoard(DAChartBoard chartBoard) {
                this.chartBoard = chartBoard;
        }
-       
+
        @Override
        public void clear() {
                super.clear();
index f6ce33e..a62ffae 100644 (file)
@@ -68,7 +68,7 @@ public class UIPage extends DAPageComposite {
                addView(tabView);
                {
                        SnapshotView currentView = new SnapshotView(
-                                       tabView.getContentComposite(), SWT.NONE, false);
+                                       tabView.getContentComposite(), SWT.NONE, false, name);
                        currentView.setObservingViews(new String[] { UISceneListView.ID,
                                        UIControlListView.ID });
                        tabView.addView(currentView, false);