import org.eclipse.swt.widgets.Display;
import org.tizen.dynamicanalyzer.common.AnalyzerConstants;
import org.tizen.dynamicanalyzer.common.AnalyzerManager;
-import org.tizen.dynamicanalyzer.logparser.LogCenterConstants;
+import org.tizen.dynamicanalyzer.communicator.DACommunicator;
import org.tizen.dynamicanalyzer.sql.SqlManager;
+import org.tizen.dynamicanalyzer.swap.callstack.BaseCallstackManager;
+import org.tizen.dynamicanalyzer.swap.callstack.SWAPCallStackManager;
import org.tizen.dynamicanalyzer.swap.channel.data.DataChannelConstants;
+import org.tizen.dynamicanalyzer.swap.channel.data.ProcessInfo;
+import org.tizen.dynamicanalyzer.swap.channel.data.ProcessInfoPackage;
import org.tizen.dynamicanalyzer.swap.logparser.LogPackage;
import org.tizen.dynamicanalyzer.swap.logparser.Logs;
import org.tizen.dynamicanalyzer.swap.model.data.LogData;
import org.tizen.dynamicanalyzer.swap.model.data.LogDataFactory;
import org.tizen.dynamicanalyzer.swap.model.data.ProfileData;
-import org.tizen.dynamicanalyzer.swap.model.data.UserFunctionData;
import org.tizen.dynamicanalyzer.ui.file.FileDataMaker;
import org.tizen.dynamicanalyzer.ui.info.callstack.CallStackManager;
import org.tizen.dynamicanalyzer.ui.page.DAPageComposite;
import org.tizen.dynamicanalyzer.ui.summary.failed.FailedChecker;
+import org.tizen.dynamicanalyzer.ui.summary.failed.FailedData;
import org.tizen.dynamicanalyzer.ui.summary.leaks.LeakDetector;
import org.tizen.dynamicanalyzer.ui.summary.profiling.ProfileDataMaker;
import org.tizen.dynamicanalyzer.ui.summary.warning.WarningChecker;
+import org.tizen.dynamicanalyzer.ui.summary.warning.WarningData;
import org.tizen.dynamicanalyzer.ui.timeline.TimelinePage;
import org.tizen.dynamicanalyzer.ui.widgets.DATabButton;
import org.tizen.dynamicanalyzer.ui.widgets.DATabComposite;
private WarningChecker warningChecker = null;
private FileDataMaker fileDataMaker = null;
private ProfileDataMaker profileDataMaker = null;
- private CallStackManager callstackManager = null;
+ private BaseCallstackManager callstackManager = null;
+ private BaseCallstackManager swapCallstackManager = null;
private long markerStartTime = 0;
private long markerEndTime = 0;
leakDetector = new LeakDetector();
warningChecker = new WarningChecker();
callstackManager = new CallStackManager();
+ swapCallstackManager = new SWAPCallStackManager();
profileDataMaker = new ProfileDataMaker(callstackManager);
fileDataMaker = new FileDataMaker(failedChecker, leakDetector,
}
}
+ // make failed data
+
+ List<FailedData> failedList = AnalyzerManager.getFailedChecker()
+ .getFailedList();
+ for (FailedData failedData : failedList) {
+ long time = failedData.getTime();
+ if (time <= markerEndTime && time >= markerStartTime) {
+ failedChecker.getFailedList().add(failedData);
+ }
+ }
+
+ List<WarningData> warningList = AnalyzerManager.getWarningChecker()
+ .getWarningData();
+ for (WarningData warningData : warningList) {
+ long time = warningData.getLogData().getTime();
+ if (time <= markerEndTime && time >= markerStartTime) {
+ warningChecker.getWarningData().add(warningData);
+ }
+ }
+
AnalyzerUtil.changePage(RangePage.ID);
final DAPageComposite page = AnalyzerManager.getCurrentPage();
Display.getDefault().syncExec(new Runnable() {
private void makeRangeData(LogPackage logPack) {
Logs logs = logPack.getLogs(DataChannelConstants.LOG_USER_FUNCTION);
if (null != logs) {
- List<LogData> userFunctions = logs.getLogs();
- int size = userFunctions.size();
- for (int i = 0; i < size; i++) {
- UserFunctionData input = (UserFunctionData) userFunctions
- .get(i);
- if (input.getId() != DataChannelConstants.MSG_DATA_SAMPLE) {
- long start = input.getLowPc();
- long end = input.getHighPc();
- if (start > 0 && end > 0
- && !AnalyzerManager.isBinStartEndSet()) {
- AnalyzerManager.setBinaryStartEndAddr(start, end);
+ if (DACommunicator.isSWAPVersion()) {
+ List<LogData> profileData = logs.getLogs();
+ int size = profileData.size();
+ for (int i = 0; i < size; i++) {
+ ProfileData input = (ProfileData) profileData.get(i);
+ if (input.getId() != DataChannelConstants.MSG_DATA_SAMPLE) {
+ ProcessInfoPackage processInfoPkg = AnalyzerManager
+ .getProject().getProcessInfo(input.getPid());
+ ProcessInfo processInfo = processInfoPkg
+ .getProcessInfo(input.getTime());
+ long pcAddr = input.getPcAddr();
+ if (pcAddr >= processInfo.getLowestAddress()
+ && pcAddr <= processInfo.getHighestAddress()) {
+ /* user callstack create by entry and exit */
+ swapCallstackManager.makeUserCallstack(input,
+ profileDataMaker);
+ } else {
+ swapCallstackManager
+ .makeCallstackWithoutBacktrace(input);
+ }
+ } else {
+ profileDataMaker.makeFunctionUsageProfileData(input);
}
- callstackManager.makeUserCallstack(input, profileDataMaker);
- }
- }
- }
- logs = logPack.getLogs(DataChannelConstants.LOG_USER_FUNCTION);
- if (null != logs) {
- List<LogData> profilingInputs = logs.getLogs();
- /* profiling data make */
- int size = profilingInputs.size();
- for (int i = 0; i < size; i++) {
- ProfileData input = (ProfileData) profilingInputs.get(i);
- if (input.getId() == DataChannelConstants.MSG_DATA_SAMPLE) {
- profileDataMaker.makeFunctionUsageProfileData(input);
}
}
}
+ // logs = logPack.getLogs(DataChannelConstants.LOG_USER_FUNCTION);
+ // if (null != logs) {
+ // List<LogData> profilingInputs = logs.getLogs();
+ // /* profiling data make */
+ // int size = profilingInputs.size();
+ // for (int i = 0; i < size; i++) {
+ // ProfileData input = (ProfileData) profilingInputs.get(i);
+ // if (input.getId() == DataChannelConstants.MSG_DATA_SAMPLE) {
+ // profileDataMaker.makeFunctionUsageProfileData(input);
+ // }
+ // }
+ // }
+
logs = logPack.getLogs(DataChannelConstants.MSG_PROBE_FILE);
if (null != logs) {
List<LogData> resourceInputs = logs.getLogs();
/* make file failed data and warning data */
-// fileDataMaker.makeData(resourceInputs);
+ // fileDataMaker.makeData(resourceInputs);
/* resource leak check */
int size = resourceInputs.size();
for (int i = 0; i < size; i++) {
leakDetector.runLeakDectect(memoryInputs.get(i));
}
}
-
/* created failed and warning/leak data */
}
}