<?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="1.0.0.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="1.0.0.qualifier" useFeatures="true" includeLaunchers="false">
<configIni use="default">
</configIni>
<windowImages i16="/org.tizen.dynamicanalyzer.workbench/icons/16_DA_icon.png" i32="/org.tizen.dynamicanalyzer.workbench/icons/32_DA_icon.png" i48="/org.tizen.dynamicanalyzer.workbench/icons/48_DA_icon.png" i64="/org.tizen.dynamicanalyzer.workbench/icons/64_DA_icon.png" i128="/org.tizen.dynamicanalyzer.workbench/icons/128_DA_icon.png"/>
+
<launcher name="dynamic-analyzer">
<linux icon="/org.tizen.dynamicanalyzer.workbench/icons/linux_icon.xpm"/>
<macosx icon="/org.tizen.dynamicanalyzer.workbench/icons/DA_icon.icns"/>
+/*
+ * Dynamic Analyzer
+ *
+ * Copyright (c) 2013 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact:
+ * Jooyoul Lee <jy.exe.lee@samsung.com>
+ * Juyoung Kim <j0.kim@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * Contributors:
+ * - S-Core Co., Ltd
+ *
+ */
+
package org.tizen.dynamicanalyzer.swap.communicator;
import static org.tizen.dynamicanalyzer.common.AnalyzerConstants.MSG_BINARY_INFO_ACK;
import org.tizen.dynamicanalyzer.swap.model.control.RunTimeConfiguration;
import org.tizen.dynamicanalyzer.swap.model.control.TargetInfo;
import org.tizen.dynamicanalyzer.swap.model.control.UserSpaceInst;
-import org.tizen.dynamicanalyzer.swap.model.data.BasicDataMessage;
import org.tizen.dynamicanalyzer.swap.model.probe2.ReplayData;
import org.tizen.dynamicanalyzer.ui.file.FileChartManager;
import org.tizen.dynamicanalyzer.ui.summary.profiling.FunctionUsageProfiler;
import org.tizen.dynamicanalyzer.ui.userinterface.UIDataManager;
import org.tizen.dynamicanalyzer.uirecorder.UIRecorderTool;
import org.tizen.dynamicanalyzer.utils.UpdateViewTimer;
+import org.tizen.sdblib.exception.SdbCommandRejectedException;
+import org.tizen.sdblib.exception.TimeoutException;
import org.tizen.sdblib.receiver.MultiLineReceiver;
import org.tizen.sdblib.service.SyncResult;
// on/off , replay start time, count, event objs
int onOff = 1;
DATime startTime = ReplayTraceHandler.startTime;
- ReplayData replayData = SqlManager.getInstance()
- .getReplayLogs();
+ ReplayData replayData = SqlManager.getInstance().getReplayLogs();
int count = replayData.getObjectCount();
byte[] eventObjs = null;
for (int i = 0; i < count; i++) {
- eventObjs = ByteUtils.concatByteArray(eventObjs, replayData.getRecordEvent()
- .get(i).getByteValues());
+ eventObjs = ByteUtils.concatByteArray(eventObjs, replayData
+ .getRecordEvent().get(i).getByteValues());
}
replayEvent = ByteUtils.getByte(onOff, startTime.getSec(),
startTime.getNano(), count, eventObjs);
// return HostResult.ERR_BIN_INFO_GET_FAIL;
binaryPath = CommonConstants.EMPTY;
}
-
StringBuffer strBuf = new StringBuffer();
strBuf.append(binaryDir).append(File.separator)
// FIXME: permission denied problem
if (!targetHashCode.equals(localHashCode)) {
- String destFilePath = AnalyzerPaths.TEMP_FOLDER_PATH;
- // + File.separator +
- // selectedApp.getExecFileName(appInfo.getAppType());
+ String destFilePath = AnalyzerPaths.TEMP_FOLDER_PATH
+ + File.separator
+ + selectedApp.getExecFileName(appInfo.getAppType());
try {
- Runtime rt = Runtime.getRuntime();
- command = "/home/casval/tizen-sdk/tools/sdb root on | /home/casval/tizen-sdk/tools/sdb pull "
- + targetPath + " " + destFilePath;
- Process process = rt.exec(new String[] {
- "/home/casval/tizen-sdk/tools/sdb", "root", "on" });
- process.waitFor();
- BufferedReader reader = new BufferedReader(
- new InputStreamReader(process.getInputStream()));
- BufferedReader error = new BufferedReader(
- new InputStreamReader(process.getErrorStream()));
- String line = reader.readLine();
- String errorStr = error.readLine();
- if (null == line) {
- System.out.println("host md5sum get failed : " + errorStr);
- return HostResult.ERR_BIN_INFO_GET_FAIL;
- }
-
- } catch (IOException e) {
+ DACommunicator.getSelectedDevice().getIDevice()
+ .becomeSuperUser(true);
+ } catch (TimeoutException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ } catch (SdbCommandRejectedException e) {
+ // TODO Auto-generated catch block
e.printStackTrace();
- } catch (InterruptedException e) {
+ } catch (IOException e) {
+ // TODO Auto-generated catch block
e.printStackTrace();
}
- //
- // SyncResult res = CommunicatorUtils.pull(targetPath,
- // destFilePath);
- // if (null != res && res.isOk()) {
- // System.out.println("binary copy success!!");//$NON-NLS-1$
- // } else {
- // System.out.println("Failed to get " + targetPath + " step 2"); //$NON-NLS-1$
- // return HostResult.ERR_BIN_INFO_GET_FAIL;
- // }
- // String[] splitName = binaryPath.split(CommonConstants.SLASH);
- // binaryPath = AnalyzerPaths.TEMP_FOLDER_PATH + File.separator
- // + new String(splitName[splitName.length - 1]);
- // binInfo.setPath(binaryPath);
+
+ SyncResult res = CommunicatorUtils.pull(targetPath, destFilePath);
+ if (null != res && res.isOk()) {
+ System.out.println("binary copy success!!");//$NON-NLS-1$
+ } else {
+ System.out.println("Failed to get " + targetPath + " step 2"); //$NON-NLS-1$
+ return HostResult.ERR_BIN_INFO_GET_FAIL;
+ }
+ String[] splitName = binaryPath.split(CommonConstants.SLASH);
+ binaryPath = AnalyzerPaths.TEMP_FOLDER_PATH + File.separator
+ + new String(splitName[splitName.length - 1]);
+ binInfo.setPath(binaryPath);
}
binInfo.setPath(binaryPath);
continue;
}
}
+
+ System.out.println("CallerPCAddr : "
+ + ((ProbeCommonData) log).getCallerPcAddr());
}
int seqNum = log.getSeq();
String pcAddr = Long.toString(input.getPcAddr());
String functionName = SymbolManager.addr2func(path, pcAddr, isPieBuild,
baseAddr);
- System.out.println("function name : " + functionName + "[ low :"
- + baseAddr + " high : " + highAddr + " pcAddr : " + pcAddr + " ]");
+
+ /** debug code */
+ System.out.print("id : ");
+ AnalyzerUtil.printHexdecimal(input.getId());
+ System.out.print(" function name : " + functionName + "[ low :");
+ AnalyzerUtil.printHexdecimal(Long.parseLong(baseAddr));
+ System.out.print(" high : ");
+ AnalyzerUtil.printHexdecimal(Long.parseLong(highAddr));
+ System.out.print(" pcAddr : ");
+ AnalyzerUtil.printHexdecimal(Long.parseLong(pcAddr));
+ System.out.print(" probe type : ");
+ AnalyzerUtil.printHexdecimal(input.getProbeType());
+ System.out.print(" subtype : ");
+ AnalyzerUtil.printHexdecimal(input.getProbeSubType());
+ System.out.println(" ]");
+
if (null == functionName || functionName.isEmpty()
|| functionName.equals("_end")) { //$NON-NLS-1$
functionName = InformationViewLabels.CALLSTACK_TABLE_UNKNOWN_FUNCTION;
chk = LeakCheckList.getLeakCheckList().get(apiName);
}
+ if (logData.getId() == 0x3004)
+ {
+ System.out.println("file arrived");
+ }
HashMap<Integer, LeakData2> leaks = getLeakHash();
if (chk.getApiType() == API_TYPE_OPEN) {
- if (chk.isCheckUserCall()) {
- checkUserFuncLeakData(logData, chk);
- } else {
+// if (chk.isCheckUserCall()) {
+// checkUserFuncLeakData(logData, chk);
+// } else {
LeakData2 newLeak = new LeakData2(logData, this);
leaks.put(logData.getKey(), newLeak);
- }
+// }
} else if (chk.getApiType() == API_TYPE_CLOSE) {
int key = log.getKey();
LeakData2 freeData = getChildHash().get(key);
tableData.setObject(leakData);
List<String> text = new ArrayList<String>();
+ List<String> data = new ArrayList<String>();
text.add(leakData.getName()); // 0 column empty value for tree
+ data.add(leakData.getName());
text.add(Integer.toString(leakData.getSeq())); // 1
+ data.add(Integer.toString(leakData.getSeq()));
int type = leakData.getId();
if (type == AnalyzerConstants.MSG_PROBE_MEMORY) {
text.add(SummaryLabels.LEAK_TABLE_MEMORY);
+ data.add(SummaryLabels.LEAK_TABLE_MEMORY);
} else if (type == AnalyzerConstants.MSG_PROBE_FILE) {
text.add(SummaryLabels.LEAK_TABLE_FILE);
+ data.add(SummaryLabels.LEAK_TABLE_FILE);
} else {
text.add(SummaryLabels.LEAK_TABLE_ETC);
+ data.add(SummaryLabels.LEAK_TABLE_ETC);
} // 2
long time = leakData.getTime();
+ data.add(Long.toString(time));
try {
text.add(Formatter.toTimeFormat(time));
} catch (NumberFormatException e) {
e.printStackTrace();
text.add(Long.toString(time));
} // 3
- tableData.setObject(leakData.getName()); // 4
- text.add(leakData.getParam()); // 5
- text.add(Long.toString(leakData.getRet())); // 6
+ tableData.setObject(leakData.getName());
+ text.add(leakData.getParam()); // 4
+ data.add(leakData.getParam());
+ text.add(Long.toString(leakData.getRet())); // 5
+ data.add(Long.toString(leakData.getRet()));
+ tableData.getData().addAll(data);
TreeInput output = new TreeInput();
output.setText(text);
import org.tizen.dynamicanalyzer.logparser.LogCenterConstants;
import org.tizen.dynamicanalyzer.model.TableInput;
import org.tizen.dynamicanalyzer.nl.SummaryLabels;
+import org.tizen.dynamicanalyzer.swap.model.probe2.FileData;
import org.tizen.dynamicanalyzer.ui.range.RangeDataManager;
import org.tizen.dynamicanalyzer.ui.range.RangeWarningListView;
import org.tizen.dynamicanalyzer.ui.widgets.table.DATableComposite;
// create text
List<String> text = new ArrayList<String>();
WarningData warningData = warningList.get(i);
- List<String> warningInput = warningData.getData();
- text.add(warningInput.get(LogCenterConstants.SEQUENCE_NUMBER_INDEX));
+ text.add(Integer.toString(warningData.getSeq()));
{
if (AnalyzerConstants.MSG_PROBE_FILE == warningData
.getCategory()) {
- String fdType = warningInput
- .get(LogCenterConstants.RESOURCE_FDTYPE_INDEX);
- int type = Integer.parseInt(fdType);
- if (type == LogCenterConstants.FD_TYPE_FILE) {
- text.add(SummaryLabels.WARNING_TABLE_FILE);
- } else {
- text.add(SummaryLabels.WARNING_TABLE_SOCKET);
- }
+ text.add(SummaryLabels.WARNING_TABLE_FILE);
} else {
text.add(LogCenterConstants
.getLogCenterNameFromId(warningData.getCategory()));
// create DATableDataFormat
DATableDataFormat tableData = new DATableDataFormat(
warningData.getSeq());
- tableData.getData().addAll(warningData.getData());
+ tableData.getData().addAll(text);
tableData.setLogData(warningData.getLogData());
TableInput tableInput = new TableInput();
tableInput.setText(text);
return result;
}
shell.setLayout(new FormLayout());
- shell.setSize(400, 410);
+ shell.setSize(400, 430);
shell.setText(AnalyzerLabels.OPEN_TRACE_TITLE);
shell.addDisposeListener(new DisposeListener() {
data.top = new FormAttachment(0, 0);
data.left = new FormAttachment(0, 0);
data.right = new FormAttachment(100, 0);
- data.height = 337;
+ data.height = 357;
tableComp.setLayoutData(data);
tableComp.setBackground(ColorResources.DIALOG_BG_UPPER);
data.top = new FormAttachment(detailLabel, 0);
data.left = new FormAttachment(0, 6);
data.right = new FormAttachment(100, -6);
- data.height = 50;
+ data.height = 70;
detail.setLayoutData(data);
Composite buttonComp = new Composite(shell, SWT.NONE);
+ application;
Point textSize = e.gc.textExtent(inputText, SWT.DRAW_MNEMONIC);
int fontHeight = textSize.y + 3;
-
+
int x = rect.x + 7;
int y = rect.y + 4;
-
+
e.gc.setForeground(ColorResources.OPEN_TRACE_SAVE_CONTENTS_COLOR);
e.gc.drawText(inputText, x, y);
-
+ y += fontHeight;
+
inputText = AnalyzerLabels.OPEN_TRACE_DLG_DETAILS_DEVICE
+ device;
- e.gc.drawText(inputText, x + (rect.width - 4) / 2, y);
+ e.gc.drawText(inputText, x, y);
y += fontHeight;
inputText = AnalyzerLabels.OPEN_TRACE_DLG_DETAILS_CREATE_TIME
}
}
}
-
+
public static String dotCutter(String input) {
if (null == input || input.isEmpty()) {
return null;
shell.setLocation(childX, childY);
}
-
+
/** stop trace -> change page to summary **/
public static void changePage(final String pageId) {
final BaseView baseView = (BaseView) AnalyzerUtil
return apiMap;
}
+ public static void printHexdecimal(long value) {
+ String output = String.format("%x", value);
+ System.out.print(output);
+ }
}