[RELEASE] DA 2.3.19
authorMaria Guseva <m.guseva@samsung.com>
Tue, 18 Oct 2016 09:30:37 +0000 (12:30 +0300)
committerMaria Guseva <m.guseva@samsung.com>
Tue, 18 Oct 2016 09:58:32 +0000 (12:58 +0300)
- Fix DA CLI failed to create log directory
- Fix filtering doesn't work when click on Dlog table header
- Fix refinements in Remote Device dialog
- Fix bug in the Memory Callstack table
- Fix JIRA defects:
  SPTSDKUX-2297: How to use Dynamic analyzer is showing the old DA  working.
  SPTSDKUX-2315: Startup info is not showing for Wearable.

Change-Id: I53e877b0daa6f6a092a8c67d64b9ea5319c57cac

17 files changed:
org.tizen.dynamicanalyzer.cli/src/org/tizen/dynamicanalyzer/cli/manager/ClientUtils.java
org.tizen.dynamicanalyzer.common.test/pom.xml
org.tizen.dynamicanalyzer.common/src/org/tizen/dynamicanalyzer/util/InternalLogger.java
org.tizen.dynamicanalyzer.common/src/org/tizen/dynamicanalyzer/util/Logger.java
org.tizen.dynamicanalyzer.test/pom.xml
org.tizen.dynamicanalyzer.workbench.product/dynamicanalyzer.product
org.tizen.dynamicanalyzer.workbench.product/pom.xml
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/nl/MenuBarLabels.properties
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/nl/TimelinePageLabels.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/nl/TimelinePageLabels.properties
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/info/appStartup/AppStartupView.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/info/callstack/CallStackInserter.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/memory/table/MemoryCallStackTable.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/timeline/dlog/DlogTable.java
package/changelog
package/pkginfo.manifest
pom.xml

index 5ae04d0..5ae4696 100644 (file)
@@ -20,6 +20,7 @@ import javax.management.remote.JMXServiceURL;
 
 import org.tizen.dynamicanalyzer.common.path.PathManager;
 import org.tizen.dynamicanalyzer.util.CommonUtil;
+import org.tizen.dynamicanalyzer.util.InternalLogger;
 import org.tizen.dynamicanalyzer.util.Logger;
 
 /**
@@ -61,8 +62,10 @@ public class ClientUtils {
        private static File getLogFile() {
                SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy_MM_dd_HH-mm-ss");
                String logPostfix = dateFormat.format(new Date());
-               String logFilePath = String.format("%s%s%s", PathManager.DA_LOG_PATH, File.separator, "da_log_process_manager_" + logPostfix);
-               return new File(logFilePath);
+               String logFilePath = InternalLogger.getInstance().getLogPath(PathManager.DA_LOG_PATH,
+                               "da_log_process_manager_" + logPostfix);
+
+               return logFilePath != null ? new File(logFilePath) : null;
        }
 
        /**
@@ -97,6 +100,9 @@ public class ClientUtils {
                pb.redirectInput(Redirect.PIPE);
 
                File logFile = getLogFile();
+               if (logFile == null)
+                       throw new IOException("Failed to create log file");
+
                Logger.info("Redirecting ProcessManager output to: %s", logFile.getAbsolutePath());
                pb.redirectErrorStream(true); // merge err stream into out stream
                pb.redirectOutput(Redirect.to(logFile)); // redirect output to the log file
index 76de5a9..c39f302 100644 (file)
@@ -6,7 +6,7 @@
        <parent>
                <artifactId>dynamic-analyzer</artifactId>
                <groupId>org.tizen.dynamicanalyzer</groupId>
-               <version>2.3.18-SNAPSHOT</version>
+               <version>2.3.19-SNAPSHOT</version>
                <relativePath>..</relativePath>
        </parent>
        <groupId>org.tizen.dynamicanalyzer</groupId>
index 356f868..1e3368f 100644 (file)
@@ -255,7 +255,15 @@ public class InternalLogger {
                return callstackMsg;
        }
        
-       public String checkValidation(String filePath, String fileName) {
+       /**
+        * Constructs path to log file given its directory and name and tries to
+        * create given directory if it does not exist yet.
+        *
+        * @param filePath path to directory with new log
+        * @param fileName name of log file
+        * @return constructed path to log file on success or {@code null} otherwise
+        */
+       public String getLogPath(String filePath, String fileName) {
                if (filePath == null || fileName == null) {
                        System.out.println("Log File Path or Log File Name is null !!");
                        return null;
@@ -266,7 +274,7 @@ public class InternalLogger {
                        System.out.println("Failed to log directory or log file creation !!");
                        return null;
                } else {
-                       return new String(filePath + File.separator + fileName);
+                       return filePath + File.separator + fileName;
                }
        }
        
index 1e9ac04..a3671cc 100644 (file)
@@ -101,7 +101,7 @@ public class Logger {
         *            file name
         */
        public static void setLogToFile(String filePath, String fileName) throws Exception {
-               String logFilePath = instance.checkValidation(filePath, fileName);
+               String logFilePath = instance.getLogPath(filePath, fileName);
                if (logFilePath == null)        return;
                
                File logFile = new File(logFilePath);
index d2481bc..af80297 100644 (file)
@@ -6,7 +6,7 @@
        <parent>
                <artifactId>dynamic-analyzer</artifactId>
                <groupId>org.tizen.dynamicanalyzer</groupId>
-               <version>2.3.18-SNAPSHOT</version>
+               <version>2.3.19-SNAPSHOT</version>
                <relativePath>..</relativePath>
        </parent>
        <groupId>org.tizen.dynamicanalyzer</groupId>
index 3baa8de..d5499b7 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <?pde version="3.5"?>
 
-<product name="%DynamicAnalyzer" uid="org.tizen.dynamicanalyzer.workbench.product" id="org.tizen.dynamicanalyzer.workbench.product" application="org.tizen.dynamicanalyzer.workbench.application" version="2.3.18.qualifier" useFeatures="true" includeLaunchers="true">
+<product name="%DynamicAnalyzer" uid="org.tizen.dynamicanalyzer.workbench.product" id="org.tizen.dynamicanalyzer.workbench.product" application="org.tizen.dynamicanalyzer.workbench.application" version="2.3.19.qualifier" useFeatures="true" includeLaunchers="true">
 
    <aboutInfo>
       <image path="icons/about_tizen_sdk.png"/>
index 1e98ae8..0a1874a 100644 (file)
@@ -8,13 +8,13 @@
        <parent>
                <artifactId>dynamic-analyzer</artifactId>
                <groupId>org.tizen.dynamicanalyzer</groupId>
-               <version>2.3.18-SNAPSHOT</version>
+               <version>2.3.19-SNAPSHOT</version>
                <relativePath>..</relativePath>
        </parent>
 
        <groupId>org.tizen.dynamicanalyzer</groupId>
        <artifactId>org.tizen.dynamicanalyzer.workbench.product</artifactId>
-       <version>2.3.18-SNAPSHOT</version>
+       <version>2.3.19-SNAPSHOT</version>
        <packaging>eclipse-repository</packaging>
 
        <properties>
index 52982b0..15a114d 100644 (file)
@@ -37,5 +37,5 @@ HELP_HOWTO=How to use Dynamic Analyzer
 HELP_BUGREPORT=Bug Report
 HELP_ABOUT=About
 
-HELP_HOWTO_LINK=https://developer.tizen.org/development/tools/common-tools/dynamic-analyzer
+HELP_HOWTO_LINK=https://developer.tizen.org/development/tizen-studio/native-tools/debugging-your-app/dynamic-analyzer
 HELP_BUGREPORT_LINK=https://developer.tizen.org/forums/sdk-ide/active
\ No newline at end of file
index f68f139..9787b0a 100644 (file)
@@ -46,7 +46,8 @@ public class TimelinePageLabels extends NLS {
        public static String UI_EVENT_LIST_NAME;
        public static String UI_EVENT_LIST_TIME;
        public static String UI_EVENT_LIST_DETAIL;
-       public static String APPSTARTUP_NOT_SUPPORTED_LABEL;
+       public static String APPSTARTUP_NOT_SUPPORTED_LABEL_UIHV;
+       public static String APPSTARTUP_NOT_SUPPORTED_LABEL_TARGET;
        static {
                // initialize resource bundle
                NLS.initializeMessages(BUNDLE_NAME, TimelinePageLabels.class);
index cccc016..005cb7f 100644 (file)
@@ -12,4 +12,5 @@ UI_EVENT_LIST_NAME=Name
 UI_EVENT_LIST_TIME=Time
 UI_EVENT_LIST_DETAIL=Detail
 
-APPSTARTUP_NOT_SUPPORTED_LABEL=Startup info cannot be collected when UI Hierarchy Analysis is selected.
\ No newline at end of file
+APPSTARTUP_NOT_SUPPORTED_LABEL_UIHV=Startup info cannot be collected when UI Hierarchy Analysis is selected.
+APPSTARTUP_NOT_SUPPORTED_LABEL_TARGET=Startup info cannot be collected on your target platform: 
\ No newline at end of file
index b701a43..25d4529 100644 (file)
@@ -27,6 +27,7 @@
 package org.tizen.dynamicanalyzer.ui.info.appStartup;
 
 import java.util.Arrays;
+import java.util.List;
 
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.custom.StackLayout;
@@ -39,17 +40,22 @@ import org.tizen.dynamicanalyzer.common.Global;
 import org.tizen.dynamicanalyzer.nl.InformationViewLabels;
 import org.tizen.dynamicanalyzer.nl.TimelinePageLabels;
 import org.tizen.dynamicanalyzer.project.Project;
+import org.tizen.dynamicanalyzer.protocol.Protocol;
 import org.tizen.dynamicanalyzer.resources.ColorResources;
 import org.tizen.dynamicanalyzer.resources.FontResources;
 import org.tizen.dynamicanalyzer.setting.FlatFeature;
 import org.tizen.dynamicanalyzer.setting.SettingConstants;
 import org.tizen.dynamicanalyzer.setting.SettingDataManager;
+import org.tizen.dynamicanalyzer.setting.TargetData;
 import org.tizen.dynamicanalyzer.swap.logparser.DataManagerRegistry;
 import org.tizen.dynamicanalyzer.ui.widgets.table.DATableComposite;
 import org.tizen.dynamicanalyzer.widgets.da.view.DAViewComposite;
 import org.tizen.dynamicanalyzer.widgets.da.view.DAViewData;
 
 public class AppStartupView extends DAViewComposite {
+       private final static List<Protocol> notSupportedVersions = Arrays
+                       .asList(new Protocol[] { Protocol.VERSION_30, Protocol.VERSION_30_UIHV, Protocol.VERSION_30A });
+
        private String[] observingViews = null;
        Composite contents = null;
        
@@ -84,9 +90,8 @@ public class AppStartupView extends DAViewComposite {
                // create stub label
                startUpNotSupportedLabel = new Label(contents,
                                SWT.NONE | SWT.WRAP | SWT.BORDER);
-               startUpNotSupportedLabel
-                               .setText(TimelinePageLabels.APPSTARTUP_NOT_SUPPORTED_LABEL);
                startUpNotSupportedLabel.setFont(FontResources.TABLE_HEADER_FONT);
+               startUpNotSupportedLabel.setForeground(ColorResources.TABLE_HEADER_FONT_COLOR);
                startUpNotSupportedLabel.setAlignment(SWT.CENTER);
 
                if (!hideIfNotSupported()) {
@@ -164,6 +169,19 @@ public class AppStartupView extends DAViewComposite {
                else
                        hide = SettingDataManager.INSTANCE.getSelectedFlatFeatureSet()
                                        .contains(FlatFeature.UI_HIERARCHY_ANALYSIS);
+
+               if (!hide) {
+                       // Check if Application Startup feature is not supported by protocol
+                       TargetData target = SettingDataManager.INSTANCE.getConnectedTargetOrNull();
+                       hide = target != null && notSupportedVersions.contains(target.getProtocolVersion());
+
+                       if (hide)
+                               startUpNotSupportedLabel
+                                               .setText(TimelinePageLabels.APPSTARTUP_NOT_SUPPORTED_LABEL_TARGET + target.getTargetName());
+               } else {
+                       startUpNotSupportedLabel.setText(TimelinePageLabels.APPSTARTUP_NOT_SUPPORTED_LABEL_UIHV);
+               }
+
                stackLayout.topControl = hide ? startUpNotSupportedLabel : stackLayout.topControl;
                return hide;
        }
index 9e5cef4..3415cb7 100644 (file)
@@ -32,13 +32,14 @@ import java.util.List;
 import java.util.Map;
 import java.util.NavigableMap;
 import java.util.SortedMap;
+
 import org.tizen.dynamicanalyzer.common.AnalyzerConstants;
 import org.tizen.dynamicanalyzer.common.DALimit;
 import org.tizen.dynamicanalyzer.common.Global;
 import org.tizen.dynamicanalyzer.control.DataThread;
-import org.tizen.dynamicanalyzer.setting.Feature;
+import org.tizen.dynamicanalyzer.setting.FlatFeature;
+import org.tizen.dynamicanalyzer.setting.FlatPreferences;
 import org.tizen.dynamicanalyzer.setting.SettingDataManager;
-import org.tizen.dynamicanalyzer.setting.TargetData;
 import org.tizen.dynamicanalyzer.ui.summary.profiling.FunctionUsageProfiler;
 import org.tizen.dynamicanalyzer.util.Logger;
 
@@ -145,21 +146,29 @@ public class CallStackInserter extends DataThread<CallStackData> {
                if (!insertData.isEmpty()) {
                        callStackDataTable.insertData(insertData);
 
-                       // remove unnecessary callstackdata from memory
-                       TargetData target = SettingDataManager.INSTANCE.getConnectedTargetOrSelected();
-                       if (target.isSelectedFeature(Feature.FUNCTION_SAMPLING)) {
-                               // sample feature is on
-                               long lastSampleSeq = FunctionUsageProfiler.getInstance().getLastSampleSeq();
-                               if (lastSampleSeq != -1) {
-                                       if (lastSampleSeq <= lastInsertSeq) {
-                                               removeCallstackData(lastSampleSeq);
-                                       } else { // lastSampleSeq > lastInsertSeq
-                                               removeCallstackData(lastInsertSeq);
+                       // The next step is working only if we don't have to construct call trace for memory allocations.
+                       // FIXME:
+                       // Another option might be to fix MemoryCallStackTable to read data from database.
+                       // On one hand it takes additional time. On other hand keeping all calltraces in memory
+                       // may also result in memory/performance degradation (however it is anyway done when opening a trace).
+                       // We should consider some reasonable optimization here.
+                       if (!SettingDataManager.INSTANCE.getSelectedFlatFeatureSet().contains(FlatFeature.MEMORY_ALLOC))
+                       {
+                               // remove unnecessary callstackdata from memory
+                               if (SettingDataManager.INSTANCE.getOptionsPreferencesValue(FlatPreferences.FUNCTION_SAMPLING_RATE) > 0) {
+                                       // sample feature is on
+                                       long lastSampleSeq = FunctionUsageProfiler.getInstance().getLastSampleSeq();
+                                       if (lastSampleSeq != -1) {
+                                               if (lastSampleSeq <= lastInsertSeq) {
+                                                       removeCallstackData(lastSampleSeq);
+                                               } else { // lastSampleSeq > lastInsertSeq
+                                                       removeCallstackData(lastInsertSeq);
+                                               }
                                        }
+                               } else { // sample feature is off
+                                       // callstackdata is not needed in memory after insertion to DB
+                                       removeCallstackData(lastInsertSeq);
                                }
-                       } else { // sample feature is off
-                               // callstackdata is not needed in memory after insertion to DB
-                               removeCallstackData(lastInsertSeq);
                        }
                }
 
index 9774333..e760dbe 100644 (file)
@@ -145,6 +145,7 @@ public class MemoryCallStackTable extends DATableComposite {
                        List<Long> addrs = getAddrs(seqNum);
 
                        if (null == addrs) {
+                               //FIXME: actually below is too strong suggestion, any other issue may occur while getting addrs
                                addrs = getAddrs(Long.MAX_VALUE); // This case may occured if seq Num is above Long.MAX_VALUE
                                if (null == addrs) {
                                        Logger.error("Function entry or exit not found");
index e0ec688..6113fb9 100644 (file)
@@ -54,13 +54,13 @@ import org.tizen.dynamicanalyzer.ui.timeline.common.TimelineConstants;
 import org.tizen.dynamicanalyzer.ui.toolbar.Toolbar;\r
 import org.tizen.dynamicanalyzer.ui.widgets.table.DATableComposite;\r
 import org.tizen.dynamicanalyzer.ui.widgets.table.DATableDataFormat;\r
+import org.tizen.dynamicanalyzer.ui.widgets.table.DATablePopupMenu;\r
 import org.tizen.dynamicanalyzer.ui.widgets.table.DefaultTableComparator;\r
 import org.tizen.dynamicanalyzer.ui.widgets.table.TableColumnSizePackListener;\r
 import org.tizen.dynamicanalyzer.util.WorkbenchUtil;\r
 import org.tizen.dynamicanalyzer.utils.AnalyzerUtil;\r
 import org.tizen.dynamicanalyzer.utils.Formatter;\r
 import org.tizen.dynamicanalyzer.widgets.chart.DAChartPlotIntervalMarker;\r
-import org.tizen.dynamicanalyzer.widgets.popupMenu.DAPopupMenu;\r
 import org.tizen.dynamicanalyzer.widgets.popupMenu.DAPopupMenuItem;\r
 import org.tizen.dynamicanalyzer.widgets.popupMenu.DAPopupMenuListener;\r
 import org.tizen.dynamicanalyzer.widgets.timeline.MarkerManager;\r
@@ -109,7 +109,7 @@ public class DlogTable extends DATableComposite {
        }\r
        \r
        private void initPopupMenu() {\r
-               popupMenu = new DAPopupMenu(table);\r
+               popupMenu = new DATablePopupMenu(table);\r
                popupMenu.setFont(FontResources.CONTEXT_MENU_ITEM_FONT);\r
                \r
                DAPopupMenuItem filterByLevelItem = new DAPopupMenuItem(popupMenu);\r
index 44a56a6..5f036aa 100644 (file)
@@ -1,3 +1,12 @@
+* 2.3.19
+- Fix DA CLI failed to create log directory
+- Fix filtering doesn't work when click on Dlog table header
+- Fix refinements in Remote Device dialog
+- Fix bug in the Memory Callstack table
+- Fix JIRA defects:
+  SPTSDKUX-2297: How to use Dynamic analyzer is showing the old DA  working.
+  SPTSDKUX-2315: Startup info is not showing for Wearable.
+== Maria Guseva <m.guseva@samsung.com> October 18, 2016
 * 2.3.18
 - Fix Function Profiling info to be properly collected and shown
 - Fix missed call trace data after saving trace
index bb8bb6d..ae0869a 100644 (file)
@@ -1,5 +1,5 @@
 Source:dynamic-analyzer
-Version:2.3.18
+Version:2.3.19
 Maintainer:Gihun Chang <gihun.chang@samsung.com>, WooJin Jung <woojin2.jung@samsung.com>, Jaewon Lim <jaewon81.lim@samsung.com>, Seokgil Kang <seokgil.kang@samsung.com>
 
 Package:dynamic-analyzer-product
diff --git a/pom.xml b/pom.xml
index 8df1c77..1a663d9 100644 (file)
--- a/pom.xml
+++ b/pom.xml
@@ -6,7 +6,7 @@
        <modelVersion>4.0.0</modelVersion>
        <groupId>org.tizen.dynamicanalyzer</groupId>
        <artifactId>dynamic-analyzer</artifactId>
-       <version>2.3.18-SNAPSHOT</version>
+       <version>2.3.19-SNAPSHOT</version>
        <packaging>pom</packaging>
 
        <modules>