public class SWAPLogParser implements Runnable {
private final String OSP_MAIN = "OspMain"; //$NON-NLS-1$
private static Thread logParser = null;
-// default false, turn on when Tizen C++ app
-// private static boolean dropCallTraceLog = true;
- private static boolean dropCallTraceLog = false;
+ // default false, turn on when Tizen C++ app
+ // private static boolean dropCallTraceLog = true;
+ private static boolean dropCallTraceLog = false;
private static LogQueue logQueue = null;
private int SMALL_IMG_WIDTH = 40;
public static void startLogParser() {
getLogQueue().clear();
-// why here?
-// dropCallTraceLog = true;
+ // why here?
+ // dropCallTraceLog = true;
if (null == logParser || !logParser.isAlive()) {
logParser = new Thread(null, new SWAPLogParser(),
AnalyzerConstants.LOG_QUEUE_OBSERVING_THREAD);
if (!AnalyzerManager.isProcessInfoArrived()) {
continue;
}
-
+
if (id != DataChannelConstants.MSG_DATA_SAMPLE) {
ProfileData pData = (ProfileData) log;
String apiName = pData.getApiName();
// setFuncName(pData);
apiName = AnalyzerUtil.getFuncName(pData);
if (apiName.equals("<unknown function>")) {
-// necessary? pData.setApiName(apiName);
+ // necessary? pData.setApiName(apiName);
continue;
} else {
pData.setApiName(apiName);
}
}
-
+
if (isDropCallTraceLog()) {
apiName = pData.getApiName();
if (apiName.contains(OSP_MAIN)) {
continue;
}
}
- // irregular call check still necessary?
- if (AnalyzerManager.getCallstackManager().isIrregularUserCall(
- pData)) {
+ // irregular call check still necessary?
+ if (AnalyzerManager.getCallstackManager()
+ .isIrregularUserCall(pData)) {
continue;
}
-
+
ProcessInfoPackage processInfoPkg = AnalyzerManager
.getProject().getProcessInfo(pData.getPid());
- ProcessInfo processInfo = processInfoPkg.getProcessInfo(pData
- .getTime());
-
- System.out.println(" PROFILE LOG DEBUG = ID: "
- + pData.getId()
- + " PC : "
- + AnalyzerUtil.toHexdecimal(pData.getPcAddr())
- + " Api : "
- + pData.getApiName()
- + " caller : "
- + AnalyzerUtil.toHexdecimal(pData.getCallerPcAddr())
- + " base addr : "
- + AnalyzerUtil.toHexdecimal(processInfo
- .getLowestAddress()));
+ ProcessInfo processInfo = processInfoPkg
+ .getProcessInfo(pData.getTime());
+
+ // for debug
+ // System.out.println(" PROFILE LOG DEBUG = ID: "
+ // + pData.getId()
+ // + " PC : "
+ // + AnalyzerUtil.toHexdecimal(pData.getPcAddr())
+ // + " Api : "
+ // + pData.getApiName()
+ // + " caller : "
+ // + AnalyzerUtil.toHexdecimal(pData.getCallerPcAddr())
+ // + " base addr : "
+ // + AnalyzerUtil.toHexdecimal(processInfo
+ // .getLowestAddress()));
pushLog(log, logPack);
/* user callstack create by entry and exit */
AnalyzerManager.getCallstackManager().makeUserCallstack(
pData,
FunctionUsageProfiler.getInstance()
- .getProfileDataMaker());
+ .getProfileDataMaker());
} else {
- pushLog(log, logPack);
+ pushLog(log, logPack);
}
} else if (log instanceof ReplayData) {
pushLog(log, logPack);
}
pushLog(log, logPack);
AnalyzerManager.getCallstackManager()
- .makeCallstackWithoutBacktrace(log);
+ .makeCallstackWithoutBacktrace(log);
if (id == DataChannelConstants.MSG_PROBE_FILE
|| id == DataChannelConstants.MSG_PROBE_MEMORY) {
AnalyzerManager.getLeakDetector().runLeakDectect(log);
setName(NAME);
String[] dcn = { "PCAddr", "CallerPcAddr", "ProbeType", "ProbeSubType",
- "Pid", "Tid", "CpuNum", "Args", "Ret", "ApiName", "CallStack" };
+ "Pid", "Tid", "CpuNum", "Args", "Ret", "ApiName", "LibName", "CallStack" };
dbColumnNames = HeaderColumns.getDBColumnNames();
dbColumnNames.addAll(Arrays.asList(dcn));
- Integer[] dct = { L, L, I, I, I, I, I, T, L, T, T };
+ Integer[] dct = { L, L, I, I, I, I, I, T, L, T, T, T };
dbColumnTypes = HeaderColumns.getDBColumntypes();
dbColumnTypes.addAll(Arrays.asList(dct));
String[] tcn = { "PCAddr", "CallerPcAddr", "ProbeType", "ProbeSubType",
- "Pid", "Tid", "CpuNum", "Args", "Ret", "ApiName", "CallStack" };
+ "Pid", "Tid", "CpuNum", "Args", "Ret", "ApiName", "LibName", "CallStack" };
tableColumnNames = HeaderColumns.getTableColumnNames();
tableColumnNames.addAll(Arrays.asList(tcn));
- Integer[] types = { L, L, I, I, I, I, I, S, L, S, S };
+ Integer[] types = { L, L, I, I, I, I, I, S, L, S, S, S };
logColumnTypes = HeaderColumns.getLogColumnTypes();
logColumnTypes.addAll(Arrays.asList(types));
}