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;
/**
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;
}
/**
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
<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>
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;
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;
}
}
* 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);
<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>
<?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"/>
<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>
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
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);
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
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;
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;
// 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()) {
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;
}
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;
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);
}
}
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");
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
}\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
+* 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
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
<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>