<parent>
<artifactId>dynamic-analyzer</artifactId>
<groupId>org.tizen.dynamicanalyzer</groupId>
- <version>2.4.4-SNAPSHOT</version>
+ <version>2.4.5-SNAPSHOT</version>
<relativePath>..</relativePath>
</parent>
<groupId>org.tizen.dynamicanalyzer</groupId>
<parent>
<artifactId>dynamic-analyzer</artifactId>
<groupId>org.tizen.dynamicanalyzer</groupId>
- <version>2.4.4-SNAPSHOT</version>
+ <version>2.4.5-SNAPSHOT</version>
<relativePath>..</relativePath>
</parent>
<groupId>org.tizen.dynamicanalyzer</groupId>
public void clear() {\r
// do nothing\r
}\r
- \r
+\r
+ /**\r
+ * Make item with specified search selection index visible.\r
+ * Do nothing by default.\r
+ *\r
+ * @param index item index\r
+ */\r
+ public void showSearchSelection(int index) {\r
+ }\r
+\r
public Control getControl() {\r
// do nothing\r
// TODO : greatim, have to remove?\r
<?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.4.4.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.4.5.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.4.4-SNAPSHOT</version>
+ <version>2.4.5-SNAPSHOT</version>
<relativePath>..</relativePath>
</parent>
<groupId>org.tizen.dynamicanalyzer</groupId>
<artifactId>org.tizen.dynamicanalyzer.workbench.product</artifactId>
- <version>2.4.4-SNAPSHOT</version>
+ <version>2.4.5-SNAPSHOT</version>
<packaging>eclipse-repository</packaging>
<properties>
// application list management
public final static String UNKNOWN = "unknown";//$NON-NLS-1$
public final static String APPCONTROL = "_AppControl";//$NON-NLS-1$
+ public final static String WIDGETAPP = "widgetapp";//$NON-NLS-1$
public final static String SPECIAL_APP_PREFIX = "da.id.dummy.app";//$NON-NLS-1$
public final static String RUNNING_PROCESS = SPECIAL_APP_PREFIX + ".running";//$NON-NLS-1$
public final static String RUNNING_PROCESS_LABEL = "[Running process]";//$NON-NLS-1$
import org.tizen.dynamicanalyzer.common.Global;
import org.tizen.dynamicanalyzer.common.path.PathManager;
import org.tizen.dynamicanalyzer.constant.CommonConstants;
+import org.tizen.dynamicanalyzer.control.ApplistManager;
import org.tizen.dynamicanalyzer.handlers.UIActionHolder;
import org.tizen.dynamicanalyzer.nl.AnalyzerLabels;
import org.tizen.dynamicanalyzer.nl.UserErrorWarningLabels;
Toolbar.INSTANCE.setAllControlState(true);
return;
}
+ if (ApplistManager.isInBlackList(appInfo)) {
+ popupMessageWithAppname(binaryOfTarget,
+ UserErrorWarningLabels.ERROR_UNSUPPORTED_APPLICATION);
+ Toolbar.INSTANCE.setAllControlState(true);
+ return;
+ }
if (localPackagePathList.size() > 0) {
appInfo.setLocalPackagePath(localPackagePathList);
}
public static boolean isInBlackList(AppInfo application) {
- if (application.getAppID().contains(AnalyzerConstants.APPCONTROL)) {
- return true;
- } else {
- return false;
- }
+ return (application.getAppID().contains(AnalyzerConstants.APPCONTROL)
+ || application.getComponent().equals(AnalyzerConstants.WIDGETAPP)
+ || application.getAppComp().equals(AnalyzerConstants.WIDGETAPP));
}
}
ERROR_BY_SECURITY_REASON=Current device is not available in the root or developer account mode.
ERROR_APP_SELECT_BY_SECURITY=Application cannot be traced due to security reasons.
ERROR_NONEXIST_APPLICATION=Application does not exist in the device.\nCheck that it has been installed successfully.
-ERROR_UNSUPPORTED_APPLICATION=Invalid application. \nSelect another application or restart the dynamic analyzer.
+ERROR_UNSUPPORTED_APPLICATION=Cannot be profiled. \nSuch type of application (widget or appcontrol) is not supported for profiling.
ERROR_CONFIGURATION_FAILED=Configuration cannot be retrieved from the device. \nCheck the connection.
ERROR_CONNECTION_CLOSED=Socket seems to be closed. \nReconnect the device.
ERROR_DOWNLOAD_FILE_FAILED=Download failed.
SUPPORT(12, "support-disable"),
USERDATA(13, "user_data"),
DEBUGPATH(14, "DebugFilePath"),
- SRCPATH(15, "SourcePath");
+ SRCPATH(15, "SourcePath"),
+ APPCOMP(16, "Appcomp"); // This property used in Tizen 2.4
public final int index;
public final String name;
return properties.get(PROPERTY.EXEC.index);
}
+ public String getComponent() {
+ return properties.get(PROPERTY.COMPONENT.index);
+ }
+
+ public String getAppComp() {
+ return properties.get(PROPERTY.APPCOMP.index);
+ }
+
/**
* Tell whether this app info represents special app entry, e.g. running process.
*/
String rightBorder =
rangeIdx == MarkerManager.INSTANCE.getMarkerCount() ? "End" : "M" + rangeIdx;
- this.setText(String.format("Range [%s - %s]", leftBorder, rightBorder));
+ String text = String.format("Range [%s - %s]", leftBorder, rightBorder);
+ memoryTable.setTableName(text);
+ this.setText(text);
}
/**
import java.util.List;
import org.eclipse.nebula.widgets.grid.Grid;
+import org.eclipse.nebula.widgets.grid.GridItem;
import org.eclipse.swt.SWT;
import org.eclipse.swt.custom.ScrolledComposite;
+import org.eclipse.swt.events.FocusAdapter;
+import org.eclipse.swt.events.FocusEvent;
+import org.eclipse.swt.events.FocusListener;
import org.eclipse.swt.graphics.Point;
import org.eclipse.swt.layout.FormAttachment;
import org.eclipse.swt.layout.FormData;
import org.eclipse.swt.layout.FormLayout;
import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Event;
import org.eclipse.swt.widgets.Listener;
import org.eclipse.ui.forms.events.ExpansionAdapter;
import org.tizen.dynamicanalyzer.nl.MemoryPageLabels;
import org.tizen.dynamicanalyzer.resources.ColorResources;
import org.tizen.dynamicanalyzer.ui.memory.table.MemoryStatisticsTable;
+import org.tizen.dynamicanalyzer.ui.widgets.table.DATreeComposite;
import org.tizen.dynamicanalyzer.widgets.da.view.DAHidableViewComposite;
import org.tizen.dynamicanalyzer.widgets.timeline.MarkerManager;
import org.tizen.dynamicanalyzer.widgets.timeline.markers.IEventListener;
private static final int CHILD_MARGIN_HEIGHT = 5;
/**
+ * Height of table item.
+ */
+ private static int TABLE_ITEM_HEIGHT = 0;
+
+ /**
* Scrollable area composite, parent of {@link #content}.
*/
private ScrolledComposite scrolledComposite;
/**
* Setup listeners on specific events from child.
*/
- private void setupChildCompositeListeners(ExpandableMemoryRangeComposite child) {
+ private void setupChildCompositeListeners(final ExpandableMemoryRangeComposite child) {
+ FocusListener childFocusListener = new FocusAdapter() {
+ @Override
+ public void focusGained(FocusEvent e) {
+ focusRangeComposite(child, false);
+ }
+ };
+
+ child.addFocusListener(childFocusListener);
+
child.addExpansionListener(new ExpansionAdapter() {
@Override
public void expansionStateChanged(ExpansionEvent e) {
recalculateScrollArea();
+ if (e.getState())
+ focusRangeComposite(child, false);
}
});
};
MemoryStatisticsTable table = child.getMemoryTable();
- table.getTable().addListener(SWT.Collapse, eventListener);
- table.getTable().addListener(SWT.Expand, eventListener);
+ table.addFocusListener(childFocusListener);
+
+ final Grid memoryTableGrid = table.getTable();
+ memoryTableGrid.addListener(SWT.Collapse, eventListener);
+ memoryTableGrid.addListener(SWT.Expand, eventListener);
+ memoryTableGrid.addFocusListener(childFocusListener);
if (statisticsSelectionListener != null) {
- table.getTable().addSelectionListener(statisticsSelectionListener);
+ memoryTableGrid.addSelectionListener(statisticsSelectionListener);
}
if (statisticsSortListener != null) {
}
// setup listener for mouse wheel scroll event
- final Grid memoryTableGrid = table.getTable();
memoryTableGrid.addListener(SWT.MouseVerticalWheel, new Listener() {
@Override
public void handleEvent(Event event) {
Point origin = scrolledComposite.getOrigin();
- scrolledComposite.setOrigin(origin.x,
- origin.y - memoryTableGrid.getItemHeight() * event.count);
+ scrolledComposite.setOrigin(origin.x, origin.y - (TABLE_ITEM_HEIGHT + 1) * event.count);
event.doit = false;
}
});
* Set expanded state for range composite and bring focus to it.
*
* @param composite expandable composite to manipulate on
+ * @param forceShowControl whether parent should be scrolled to the specified composite
*/
- private void focusRangeComposite(ExpandableMemoryRangeComposite composite) {
+ private void focusRangeComposite(ExpandableMemoryRangeComposite composite,
+ boolean forceShowControl) {
+ if (focusedComposite == composite && !forceShowControl)
+ return;
+
composite.setExpanded(true);
recalculateScrollArea();
- scrolledComposite.showControl(composite);
+
+ if (forceShowControl)
+ scrolledComposite.showControl(composite);
if (focusedComposite != null && !focusedComposite.isDisposed()) {
focusedComposite.setBackground(ColorResources.WHITE);
}
/**
+ * See {@link #focusRangeComposite(ExpandableMemoryRangeComposite, boolean)}.
+ * This method forces show composite.
+ */
+ private void focusRangeComposite(ExpandableMemoryRangeComposite composite) {
+ focusRangeComposite(composite, true);
+ }
+
+ /**
* Create new range composite in specified position.
*
* @param pos position of a new range composite
rangeComposites.add(lastRangeComposite);
setupChildCompositeListeners(lastRangeComposite);
hideRangeComposite(0);
+
+ // fill constants
+ TABLE_ITEM_HEIGHT = lastRangeComposite.getMemoryTable().getItemHeightSize();
+ }
+
+ /**
+ * Auto expand item hierarchy and compute item visible index.
+ * Here we assume that tree has only two levels in depth (excluding root).
+ *
+ * @param index index of item to start from
+ * @return visible index of specified item
+ */
+ private int expandAndComputeVisibleIndex(int index) {
+ DATreeComposite treeComposite = focusedComposite.getMemoryTable();
+ Grid treeGrid = treeComposite.getTable();
+
+ boolean stateChanged = false;
+ int curIndex = index, visibleIndex = curIndex;
+ GridItem item = treeGrid.getItem(curIndex);
+ GridItem parent = item.getParentItem();
+
+ if (parent != null) {
+ if (!parent.isExpanded()) {
+ treeComposite.setExpand(parent, true);
+ stateChanged = true;
+ }
+ item = parent;
+ }
+
+ // count collapsed items on the way to the root
+ curIndex = treeGrid.indexOf(item) - 1;
+ while (curIndex >= 0) {
+ item = treeGrid.getItem(curIndex);
+ parent = item.getParentItem();
+
+ if (parent != null && !parent.isExpanded()) {
+ visibleIndex -= parent.getItemCount();
+ item = parent;
+ }
+
+ curIndex = treeGrid.indexOf(item) - 1;
+ }
+
+ // item expansion state changed -- table should be updated
+ if (stateChanged) {
+ treeComposite.updateTable();
+ }
+
+ return visibleIndex;
+ }
+
+ @Override
+ public void showSearchSelection(int index) {
+ // get item visible index
+ int visibleIndex = expandAndComputeVisibleIndex(index);
+
+ // reset scroll position
+ focusRangeComposite(focusedComposite, true);
+
+ // move scroll to the item
+ Point origin = scrolledComposite.getOrigin();
+ scrolledComposite.setOrigin(origin.x,
+ origin.y + (TABLE_ITEM_HEIGHT + 1) * visibleIndex);
+ }
+
+ /**
+ * Return table from last focused range composite.
+ */
+ @Override
+ public Control getControl() {
+ if (focusedComposite != null)
+ return focusedComposite.getMemoryTable();
+
+ return null;
}
@Override
} else {
DABaseDataPageComposite.setDetailMode(true);
}
- // Next 3 instructions performed to fire controlResized event.
- Shell shell = AnalyzerUtil.getTopPage().getShell();
- shell.setSize(shell.getSize().x, shell.getSize().y + 1);
- shell.setSize(shell.getSize().x, shell.getSize().y - 1);
AnalyzerManager.getCurrentPage().updateView();
}
private ScrolledComposite scrolledComp = null;
private Composite buttonContentsComp = null;
- final private static int DIALOG_HEIGHT = 500;
+ final private static int DIALOG_HEIGHT = 540;
final private static int DIALOG_WIDTH = 450;
final private static int LABLE_LEFT_MARGIN = 35;
view.setVisible(!data.exclude);
Composite baseComp = view.getParent().getParent();
- scrolledComp.layout(true, true);
scrolledComp.setMinSize(baseComp.computeSize(SWT.DEFAULT, SWT.DEFAULT));
+ scrolledComp.layout(true, true);
}
};
}
import org.eclipse.swt.SWT;
import org.eclipse.swt.custom.SashForm;
+import org.eclipse.swt.graphics.Point;
import org.eclipse.swt.layout.FillLayout;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
int tableHeight = -1;
protected static boolean isDetailMode = true;
+
+ /**
+ * Last detail mode flag for every composite instance.
+ */
+ protected boolean lastDetailMode = true;
+
/**
* Public constructor. Initialize page and forms for data.
*
for (Map.Entry<String, DABaseComposite> entry : childMap.entrySet()) {
entry.getValue().updateView();
}
- if (!isDetailMode) {
- if (baseForm.getChildren().length > 2) {
- ((Sash) baseForm.getChildren()[2]).setVisible(false);
- }
- } else {
- if (baseForm.getChildren().length > 2) {
- ((Sash) baseForm.getChildren()[2]).setVisible(true);
+
+ if (lastDetailMode != isDetailMode) {
+ lastDetailMode = isDetailMode;
+
+ if (!lastDetailMode) {
+ if (baseForm.getChildren().length > 2) {
+ ((Sash) baseForm.getChildren()[2]).setVisible(false);
+ }
+ } else {
+ if (baseForm.getChildren().length > 2) {
+ ((Sash) baseForm.getChildren()[2]).setVisible(true);
+ }
}
+
+ Point size = getSize();
+ onResized(size.x, size.y);
}
}
import org.tizen.dynamicanalyzer.util.Logger;
import org.tizen.dynamicanalyzer.util.WorkbenchUtil;
import org.tizen.dynamicanalyzer.widgets.da.view.DATabComposite;
+import org.tizen.dynamicanalyzer.widgets.da.view.DAViewComposite;
import org.tizen.dynamicanalyzer.widgets.helper.WidgetUtils;
import org.tizen.dynamicanalyzer.widgets.popupMenu.DAPopupMenu;
import org.tizen.dynamicanalyzer.widgets.popupMenu.DAPopupMenuItem;
int start = findProperty.getIndex();
setFindProferty(findProperty);
+ int findIndex = -1;
+
// forward
if (next) {
for (int i = start; i < size; i++) {
if (checkText(findProperty, items[i])) {
- table.getVerticalBar().setSelection(getScrollSelectionIndex(i));
- table.setSelection(i);
- updateTable();
- return i;
+ findIndex = i;
+ break;
}
}
// can't find
- for (int i = 0; i < start; i++) {
- if (checkText(findProperty, items[i])) {
- table.getVerticalBar().setSelection(getScrollSelectionIndex(i));
- table.setSelection(i);
- updateTable();
- return i;
+ if (findIndex < 0)
+ for (int i = 0; i < start; i++) {
+ if (checkText(findProperty, items[i])) {
+ findIndex = i;
+ break;
+ }
}
- }
} else { // back
for (int i = start; i >= 0; i--) {
if (checkText(findProperty, items[i])) {
- table.getVerticalBar().setSelection(getScrollSelectionIndex(i));
- table.setSelection(i);
- updateTable();
- return i;
+ findIndex = i;
+ break;
}
}
- for (int i = size - 1; i > start; i--) {
- if (checkText(findProperty, items[i])) {
- table.getVerticalBar().setSelection(getScrollSelectionIndex(i));
- table.setSelection(i);
- updateTable();
- return i;
+ if (findIndex < 0)
+ for (int i = size - 1; i > start; i--) {
+ if (checkText(findProperty, items[i])) {
+ findIndex = i;
+ break;
+ }
}
+ }
+
+ if (findIndex >= 0) {
+ if (table.getVerticalBar() != null) {
+ table.getVerticalBar().setSelection(getScrollSelectionIndex(findIndex));
+ }
+ table.setSelection(findIndex);
+
+ // Send information about search index to the table parent view
+ // TODO rewrite this fragment with more general design
+ DAViewComposite parentView = WidgetUtils.getParentOfType(this, DAViewComposite.class);
+ if (parentView != null) {
+ parentView.showSearchSelection(findIndex);
}
+
+ updateTable();
+ } else {
+ table.deselectAll();
}
- table.deselectAll();
- return -1;
+
+ return findIndex;
}
protected boolean checkText(FindProperty findProperty, GridItem items) {
+* 2.4.5
+== Maria Guseva <m.guseva@samsung.com> December 21, 2016
+- Add native widget applications to blacklist
+- Update warning message text for unsupported applications
+- Fix JIRA defects:
+ SPTSDKUX-2885: UI is distorted while clicking on screenshot feature in prefrences window.
+ SPTSDKUX-2966: Search not working for Range Analysis tab
+ SPTSDKUX-2972: Dynamic analyzer placement is change when check / uncheck Detail option from View menu
* 2.4.4
- Apply a workaround for non-root sdbd
- Make Persistent Allocations table to be hidden by default
- Fix JIRA defects:
SPTSDKUX-2879: All application package name are cropped.
SPTSDKUX-2964: Tracing unable to start second time when select Range during tracing.
+== Maria Guseva <m.guseva@samsung.com> December 12, 2016
* 2.4.3
- Fix chart tooltip redrawing on mouse move event
- Fix View>Report toggles state after trace opening
Source:dynamic-analyzer
-Version:2.4.4
+Version:2.4.5
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.4.4-SNAPSHOT</version>
+ <version>2.4.5-SNAPSHOT</version>
<packaging>pom</packaging>
<modules>
#include "da_0010_memory.h"
-#define ALLOC_SIZE 1024
-#define ALLOC_CHUNK 128
+#define ALLOC_SIZE 128
+#define ALLOC_CHUNK 4
typedef struct appdata {
Evas_Object *win;
void allocate_to_global(int nByte) {
int i, k;
- for (i = 0, k = 0; k <= ALLOC_CHUNK; i++) {
+ for (i = 0, k = 0; k < ALLOC_CHUNK; i++) {
if (i >= ALLOC_SIZE) break;
if (allocMem[i]) {
continue;
static void
_btn_alloc_clicked_cb(void *data, Evas_Object *obj, void *event_info)
{
- int nByte = 2048;
+ int nByte = 16000;
- data = simple_alloc(100); // never deallocate - memory leak!
+ allocate_to_global(nByte); // referenced in global variable allocMem, deallocated in _btn_free_clicked_cb
- allocate_to_global(nByte);
+ data = simple_alloc(100); // never deallocated, never referenced - memory leak!
}
static void