COOLBAR_AREA_OPENGLES=OpenGL ES
COOLBAR_AREA_TIMELINE_TOOLTIP=Timeline [Ctrl + 1]
-COOLBAR_AREA_FILE_TOOLTIP=File [Ctrl + 2]
+COOLBAR_AREA_FILE_TOOLTIP=File [Ctrl + 4]
COOLBAR_AREA_NETWORK_TOOLTIP=Network [Ctrl + 3]
-COOLBAR_AREA_THREAD_TOOLTIP=Thread [Ctrl + 4]
-COOLBAR_AREA_UI_TOOLTIP=UI [Ctrl + 5]
-COOLBAR_AREA_OPENGLES_TOOLTIP=OpenGL ES [Ctrl + 6]
-COOLBAR_AREA_SUMMARY_TOOLTIP=Summary [Ctrl + 7]
-COOLBAR_AREA_RANGE_TOOLTIP=Range [Ctrl + 8]
-COOLBAR_AREA_KERNEL_TOOLTIP=Kernel [Ctrl + 9]
+COOLBAR_AREA_THREAD_TOOLTIP=Thread [Ctrl + 2]
+COOLBAR_AREA_UI_TOOLTIP=UI [Ctrl + 6]
+COOLBAR_AREA_OPENGLES_TOOLTIP=OpenGL ES [Ctrl + 5]
+COOLBAR_AREA_SUMMARY_TOOLTIP=Summary [Ctrl + 8]
+COOLBAR_AREA_RANGE_TOOLTIP=Range [Ctrl + 9]
+COOLBAR_AREA_KERNEL_TOOLTIP=Kernel [Ctrl + 7]
COOLBAR_AREA_TIMELINE_TOOLTIP_MAC=Timeline [Command + 1]
-COOLBAR_AREA_FILE_TOOLTIP_MAC=File [Command + 2]
+COOLBAR_AREA_FILE_TOOLTIP_MAC=File [Command + 4]
COOLBAR_AREA_NETWORK_TOOLTIP_MAC=Network [Command + 3]
-COOLBAR_AREA_THREAD_TOOLTIP_MAC=Thread [Command + 4]
-COOLBAR_AREA_UI_TOOLTIP_MAC=UI [Command + 5]
-COOLBAR_AREA_OPENGLES_TOOLTIP_MAC=OpenGL ES [Command +6]
-COOLBAR_AREA_SUMMARY_TOOLTIP_MAC=Summary [Command + 7]
-COOLBAR_AREA_RANGE_TOOLTIP_MAC=Range [Command + 8]
-COOLBAR_AREA_KERNEL_TOOLTIP_MAC=Kernel [Command + 9]
+COOLBAR_AREA_THREAD_TOOLTIP_MAC=Thread [Command + 2]
+COOLBAR_AREA_UI_TOOLTIP_MAC=UI [Command + 6]
+COOLBAR_AREA_OPENGLES_TOOLTIP_MAC=OpenGL ES [Command + 5]
+COOLBAR_AREA_SUMMARY_TOOLTIP_MAC=Summary [Command + 8]
+COOLBAR_AREA_RANGE_TOOLTIP_MAC=Range [Command + 9]
+COOLBAR_AREA_KERNEL_TOOLTIP_MAC=Kernel [Command + 7]
COOLBAR_AREA_CONFIGURATION_FEATURES=Features
COOLBAR_AREA_CONFIGURATION_SETTING=Configuration
import org.tizen.dynamicanalyzer.handlers.ReplayTraceHandler;
import org.tizen.dynamicanalyzer.nl.AnalyzerLabels;
import org.tizen.dynamicanalyzer.ui.file.FilePage;
+import org.tizen.dynamicanalyzer.ui.kernel.KernelPage;
import org.tizen.dynamicanalyzer.ui.network.NetworkPage;
import org.tizen.dynamicanalyzer.ui.opengl.ui.GLPage;
import org.tizen.dynamicanalyzer.ui.range.RangeDataManager;
private static int KEY_6 = 54;
private static int KEY_7 = 55;
private static int KEY_8 = 56;
+ private static int KEY_9 = 57;
public static String START_TRACE = null;
public static String STOP_TRACE = null;
else if (event.stateMask == CTRL_STATE_MASK && event.keyCode == KEY_1) {
System.out.println("timeline page");
AnalyzerUtil.changePage(TimelinePage.ID);
- } else if (event.stateMask == CTRL_STATE_MASK && event.keyCode == KEY_2) {
+ } else if (event.stateMask == CTRL_STATE_MASK && event.keyCode == KEY_4) {
System.out.println("file page");
AnalyzerUtil.changePage(FilePage.ID);
} else if (event.stateMask == CTRL_STATE_MASK && event.keyCode == KEY_3) {
System.out.println("NetworkPage page");
AnalyzerUtil.changePage(NetworkPage.ID);
- } else if (event.stateMask == CTRL_STATE_MASK && event.keyCode == KEY_4) {
+ } else if (event.stateMask == CTRL_STATE_MASK && event.keyCode == KEY_2) {
System.out.println("thread page");
AnalyzerUtil.changePage(ThreadPage.ID);
- } else if (event.stateMask == CTRL_STATE_MASK && event.keyCode == KEY_5) {
+ } else if (event.stateMask == CTRL_STATE_MASK && event.keyCode == KEY_6) {
System.out.println("ui page");
AnalyzerUtil.changePage(UIPage.ID);
- } else if (event.stateMask == CTRL_STATE_MASK && event.keyCode == KEY_6) {
+ } else if (event.stateMask == CTRL_STATE_MASK && event.keyCode == KEY_5) {
System.out.println("Graphics page");
AnalyzerUtil.changePage(GLPage.ID);
} else if (event.stateMask == CTRL_STATE_MASK && event.keyCode == KEY_7) {
+ System.out.println("Kernel page");
+ AnalyzerUtil.changePage(KernelPage.ID);
+ } else if (event.stateMask == CTRL_STATE_MASK && event.keyCode == KEY_8) {
System.out.println("summary page");
AnalyzerUtil.changePage(SummaryPage.ID);
- } else if (event.stateMask == CTRL_STATE_MASK && event.keyCode == KEY_8) {
+ } else if (event.stateMask == CTRL_STATE_MASK && event.keyCode == KEY_9) {
System.out.println("range page");
AnalyzerUtil.changePage(RangePage.ID);
}
tabView.getContentComposite(), SWT.NONE);
tabView.addView(timelinePage, false);
+ Composite threadPage = new ThreadPage(
+ tabView.getContentComposite(), SWT.NONE);
+ tabView.addView(threadPage, false);
+
+ Composite networkPage = new NetworkPage(
+ tabView.getContentComposite(), SWT.NONE);
+ tabView.addView(networkPage, false);
+
Composite filePage = new FilePage(tabView.getContentComposite(),
SWT.NONE);
tabView.addView(filePage, false);
-
- Composite networkPage = new NetworkPage(tabView.getContentComposite(),
- SWT.NONE);
- tabView.addView(networkPage, false);
- Composite threadPage = new ThreadPage(
- tabView.getContentComposite(), SWT.NONE);
- tabView.addView(threadPage, false);
+ Composite graphicsPage = new GLPage(tabView.getContentComposite(),
+ SWT.NONE);
+ tabView.addView(graphicsPage, false);
Composite uiPage = new UIPage(tabView.getContentComposite(),
SWT.NONE);
tabView.addView(uiPage, false);
-
- Composite graphicsPage = new GLPage(
- tabView.getContentComposite(), SWT.NONE);
- tabView.addView(graphicsPage, false);
-
- Composite kernelPage = new KernelPage(
- tabView.getContentComposite(), SWT.NONE);
- tabView.addView(kernelPage, false);
+
+// Composite kernelPage = new KernelPage(
+// tabView.getContentComposite(), SWT.NONE);
+// tabView.addView(kernelPage, false);
Composite summaryPage = new SummaryPage(
tabView.getContentComposite(), SWT.NONE);
public List<Integer> getPidsOfProfileDataMakerMap() {
ArrayList<Integer> pids = new ArrayList<Integer>();
- pids.addAll(profileDataMakerMap.keySet());
-
+ pids.addAll(getProfileDataMakerMap().keySet());
return pids;
}
-
- public ProfileDataMaker getProfileDataMakerByPid(int pid) {
- if(null == profileDataMakerMap) {
+
+ public synchronized HashMap<Integer, ProfileDataMaker> getProfileDataMakerMap() {
+ if (null == profileDataMakerMap) {
profileDataMakerMap = new HashMap<Integer, ProfileDataMaker>();
}
- ProfileDataMaker profileDataMaker = profileDataMakerMap.get(pid);
- if(null == profileDataMaker) {
+ return profileDataMakerMap;
+ }
+
+ public ProfileDataMaker getProfileDataMakerByPid(int pid) {
+ ProfileDataMaker profileDataMaker = getProfileDataMakerMap().get(pid);
+ if (null == profileDataMaker) {
profileDataMaker = new ProfileDataMaker(
AnalyzerManager.getCallstackManager());
profileDataMaker.setPid(pid);
- profileDataMakerMap.put(pid, profileDataMaker);
+ getProfileDataMakerMap().put(pid, profileDataMaker);
}
return profileDataMaker;
}
return instance;
}
- private List<List<LogData>> getSampleInputs() {
+ private synchronized List<List<LogData>> getSampleInputs() {
if (null == sampleInputs) {
sampleInputs = new ArrayList<List<LogData>>();
}
}
}
- public static void stopProfiler() {
+ public static synchronized void stopProfiler() {
if (null != profiler && profiler.isAlive()) {
try {
sendNotify();
int size = sample.size();
for (int i = 0; i < size; i++) {
getInstance().getProfileDataMakerByPid(sample.get(i).getPid())
- .makeFunctionUsageProfileData((ProfileData) sample.get(i));
+ .makeFunctionUsageProfileData(
+ (ProfileData) sample.get(i));
}
}
public static final int SCREENSHOT_BUTTON = 8;
public static final int REPLAY_EDIT_BUTTON = 9;
+ public static final String ALL_PROCESS = "All Processes";
+ public static final String PROCESS_SPLITER = CommonConstants.SPACE
+ + CommonConstants.COLON + CommonConstants.SPACE;
+
String selectedDevice = null;
AppInfo selectedApp = null;
return;
}
processCombo.initCombo();
- processCombo.add("ALL");
+ processCombo.add(ALL_PROCESS);
List<ProcessInfoPackage> processInfoPkgList = new ArrayList<ProcessInfoPackage>();
processInfoPkgList.addAll(project.getProcessInfoPackHash()
.values());
for (ProcessInfoPackage pkg : processInfoPkgList) {
- String pid = Integer.toString(pkg.getPid());
- processCombo.add(pid);
+ // String pid = Integer.toString(pkg.getPid());
+ String binPath = pkg.getTargetBinaryPath();
+ String binName = CommonConstants.EMPTY;
+ if (null != binPath && !binPath.isEmpty()) {
+ int index = binPath.lastIndexOf(CommonConstants.SLASH);
+ binName = binPath.substring(index + 1, binPath.length());
+ }
+ StringBuffer buffer = new StringBuffer();
+ buffer.append(pkg.getPid()).append(PROCESS_SPLITER);
+ buffer.append(binName);
+ processCombo.add(buffer.toString());
}
}
});
AnalyzerUtil.changePage(TimelinePage.ID);
AnalyzerManager.setRunningState(true);
processCombo.initCombo();
- processCombo.add("ALL");
+ processCombo.add(ALL_PROCESS);
processCombo.select(0);
TraceStartStopThread.runStartStopThread();
}
processCombo.setLayoutData(data);
processCombo.initCombo();
- processCombo.add("ALL");
+ processCombo.add(ALL_PROCESS);
processCombo.select(0);
// Adds toolbar listeners.
public int getSelectedPid() {
int ret = 0;
String pid = processCombo.getText();
- if (!pid.equals("ALL")) {
- ret = Integer.parseInt(pid);
+ if (!pid.equals(ALL_PROCESS)) {
+ int index = pid.indexOf(PROCESS_SPLITER);
+ String str = pid.substring(0, index);
+ if (null != str && !str.isEmpty()) {
+ try {
+ ret = Integer.parseInt(str);
+ } catch (NumberFormatException e) {
+ e.printStackTrace();
+ }
+ }
}
return ret;
}
import org.eclipse.swt.graphics.Point;
import org.eclipse.swt.graphics.Rectangle;
import org.eclipse.swt.layout.FillLayout;
+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.Event;
import org.eclipse.swt.widgets.Listener;
protected long selectionEndTime = -1;
private int scrollStartSelection = 0;
private int scrollEndSelection = 0;
-// private int preDBTableItemsCount = 0;
+ // private int preDBTableItemsCount = 0;
private List<TableInput> savedTableInputList = null;
private int preLogCount = -1;
scrollComp = new Composite(this, SWT.V_SCROLL);
scrollComp.setBackground(ColorResources.TABLE_CONTENTS_NORMAL);
- scrollComp.setLayout(new FillLayout());
+ scrollComp.setLayout(new FormLayout());
scrollbar = scrollComp.getVerticalBar();
scrollbar.setMaximum(0);
table.setEmptyCellRenderer(new DATableEmptyCellRenderer());
table.setItemHeight(16);
+ FormData data = new FormData();
+ data.top = new FormAttachment(0, 0);
+ data.bottom = new FormAttachment(100, 0);
+ data.left = new FormAttachment(0, 0);
+
+ if (AnalyzerUtil.isLinux()) {
+ data.right = new FormAttachment(100, -2);
+ } else {
+ data.right = new FormAttachment(100, 0);
+ }
+ table.setLayoutData(data);
+
table.addListener(SWT.MouseMove, new Listener() {
@Override
selectionStartTime = 0;
selectionEndTime = 0;
focusSeq = 0;
- if(table.getItemCount() <= index){
- index = table.getItemCount()-1;
+ if (table.getItemCount() <= index) {
+ index = table.getItemCount() - 1;
}
GridItem focusedItem = table.getItem(index);
if (null != focusedItem) {
selectionEndTime = -1;
scrollStartSelection = 0;
scrollEndSelection = 0;
- // preDBTableItemsCount = 0;
+ // preDBTableItemsCount = 0;
savedTableInputList = null;
savedLogDataList = null;
dbInsetedItemCount = 0;
if (isSelectDB) {
setSavedDBList(makeAddTableInputFromDB());
}
- // preDBTableItemsCount = getItemCount();
+ // preDBTableItemsCount = getItemCount();
return makeTableList(getSavedDBList());
}