From 895bffa9826b77e14f38969f3f35f784405fab89 Mon Sep 17 00:00:00 2001 From: "seokgil.kang" Date: Sat, 31 May 2014 21:52:05 +0900 Subject: [PATCH] Summary : save Failed API / Warning / Leak information to DB in runtime Change-Id: I96ab49213d297ce380207955be2cfc91851f67e8 Signed-off-by: seokgil.kang --- .../dynamicanalyzer/common/AnalyzerManager.java | 7 + .../listeners/SummaryMouseDoubleClickListener.java | 48 ++-- .../logparser/LogCenterConstants.java | 5 + .../swap/logparser/SWAPLogParser.java | 4 +- .../dynamicanalyzer/ui/file/FileDataMaker.java | 23 +- .../ui/opengl/data/GLDataManager.java | 7 +- .../dynamicanalyzer/ui/summary/SummaryPage.java | 14 ++ .../ui/summary/failed/FailedApiTable.java | 226 ++++++++++++++---- .../ui/summary/leaks/LeakTable.java | 265 ++++++++++++++++----- .../ui/summary/warning/WarningDetailView.java | 33 ++- .../ui/summary/warning/WarningTable.java | 113 +++++++-- .../dynamicanalyzer/ui/thread/ThreadPageData.java | 8 +- .../thread/thread/ThreadPageThreadDataManager.java | 27 ++- 13 files changed, 599 insertions(+), 181 deletions(-) diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/common/AnalyzerManager.java b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/common/AnalyzerManager.java index fc7a819..53880f4 100755 --- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/common/AnalyzerManager.java +++ b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/common/AnalyzerManager.java @@ -50,6 +50,7 @@ import org.tizen.dynamicanalyzer.ui.page.BaseView; import org.tizen.dynamicanalyzer.ui.range.RangeDataManager; import org.tizen.dynamicanalyzer.ui.summary.failed.FailedChecker; import org.tizen.dynamicanalyzer.ui.summary.leaks.LeakDetector; +import org.tizen.dynamicanalyzer.ui.summary.leaks.LeakDetector2; import org.tizen.dynamicanalyzer.ui.summary.profiling.FunctionUsageProfiler; import org.tizen.dynamicanalyzer.ui.summary.warning.WarningChecker; import org.tizen.dynamicanalyzer.ui.toolbar.ConfigureManager; @@ -75,6 +76,7 @@ public class AnalyzerManager { private static HashMap> funcNameMapByPid = null; private static LeakDetector leakDetector = new LeakDetector(); + private static LeakDetector2 leakDetector2 = new LeakDetector2(); // add 201405 private static FailedChecker failedChecker = new FailedChecker(); private static FailedChecker calledChecker = new FailedChecker(); private static WarningChecker warningChecker = new WarningChecker(); @@ -158,6 +160,7 @@ public class AnalyzerManager { imageListSize = 0; leakDetector.clear(); + leakDetector2.clear(); // add 201405 failedChecker.clear(); warningChecker.clear(); calledChecker.clear(); @@ -266,6 +269,10 @@ public class AnalyzerManager { public static LeakDetector getLeakDetector() { return leakDetector; } + + public static LeakDetector2 getLeakDetector2() { // add 201405 + return leakDetector2; + } public static FailedChecker getFailedChecker() { return failedChecker; diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/listeners/SummaryMouseDoubleClickListener.java b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/listeners/SummaryMouseDoubleClickListener.java index 7c70b67..ec0edcc 100644 --- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/listeners/SummaryMouseDoubleClickListener.java +++ b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/listeners/SummaryMouseDoubleClickListener.java @@ -32,6 +32,7 @@ import org.eclipse.swt.events.MouseEvent; import org.eclipse.swt.events.MouseListener; import org.eclipse.swt.graphics.Point; import org.tizen.dynamicanalyzer.common.DASelectionData; +import org.tizen.dynamicanalyzer.swap.channel.data.DataChannelConstants; import org.tizen.dynamicanalyzer.swap.model.data.FileData; import org.tizen.dynamicanalyzer.swap.model.data.GLES20LogData; import org.tizen.dynamicanalyzer.swap.model.data.LogData; @@ -91,25 +92,42 @@ public class SummaryMouseDoubleClickListener implements MouseListener { } DATableDataFormat tableData = (DATableDataFormat) item.getData(); data = tableData.getLogData(); - if (data instanceof FileData) { - // String fdType = - // data.get(LogCenterConstants.RESOURCE_FDTYPE_INDEX); - // int type = Integer.parseInt(fdType); - // if (type == LogCenterConstants.FD_TYPE_FILE) { +// if (data instanceof FileData) { +// // String fdType = +// // data.get(LogCenterConstants.RESOURCE_FDTYPE_INDEX); +// // int type = Integer.parseInt(fdType); +// // if (type == LogCenterConstants.FD_TYPE_FILE) { +// pageId = FilePage.pageID; +// // } +// // else { +// // pageId = NetworkPage.ID; +// // } +// } else if (data instanceof ThreadData) { +// pageId = ThreadPage.pageID; +//// } else if (data instanceof UIEventData) { +//// pageId = UIPage.pageID; +// } else if (data instanceof NetworkData) { +// pageId = NetworkPage.pageID; +// } else if (data instanceof GLES20LogData) { +// pageId = GLPage.pageID; +// } else { +// return; +// } + + switch (data.getId()) { + case DataChannelConstants.MSG_PROBE_FILE: pageId = FilePage.pageID; - // } - // else { - // pageId = NetworkPage.ID; - // } - } else if (data instanceof ThreadData) { + break; + case DataChannelConstants.MSG_PROBE_THREAD: pageId = ThreadPage.pageID; -// } else if (data instanceof UIEventData) { -// pageId = UIPage.pageID; - } else if (data instanceof NetworkData) { + break; + case DataChannelConstants.MSG_PROBE_NETWORK: pageId = NetworkPage.pageID; - } else if (data instanceof GLES20LogData) { + break; + case DataChannelConstants.MSG_PROBE_GLES20: pageId = GLPage.pageID; - } else { + break; + default: return; } diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/logparser/LogCenterConstants.java b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/logparser/LogCenterConstants.java index 58ff762..1b2eaab 100644 --- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/logparser/LogCenterConstants.java +++ b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/logparser/LogCenterConstants.java @@ -151,6 +151,11 @@ public class LogCenterConstants { public static final int HTTP_API_RESPONSE = 21; public static final int HTTP_API_OTHER = 22; public static final int HTTP_API_CLOSE = 23; + + /* Log Memory */ + public static final int MEMORY_API_ALLOC = 0; + public static final int MEMORY_API_FREE = 1; + public static final int MEMORY_API_MANAGE = 2; /* Log snapshot */ public static final int SCREENSHOT_IMAGE_PATH_INDEX = 12; diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/swap/logparser/SWAPLogParser.java b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/swap/logparser/SWAPLogParser.java index 6925c2c..8b76b8f 100755 --- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/swap/logparser/SWAPLogParser.java +++ b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/swap/logparser/SWAPLogParser.java @@ -156,7 +156,7 @@ public class SWAPLogParser implements Runnable { if (id != DataChannelConstants.MSG_DATA_SAMPLE) { ProfileData pData = (ProfileData) log; - System.out.println("@@@@ " + pData.getProbeType() + pData.getProbeSubType() + " @@@@@"); +// System.out.println("@@@@ " + pData.getProbeType() + pData.getProbeSubType() + " @@@@@"); // function_exit log doesn't have probe type yet // if (pData.getProbeType() // == AnalyzerConstants.FUNCTION_TYPE_APPINST) { @@ -175,7 +175,7 @@ public class SWAPLogParser implements Runnable { pData.setApiName(apiName); } } - System.out.println("@@@@ " + pData.getApiName() + " @@@@@"); +// System.out.println("@@@@ " + pData.getApiName() + " @@@@@"); if (processInfoPkg.isDropLog()) { apiName = pData.getApiName(); if (apiName.contains(OSP_MAIN)) { diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/file/FileDataMaker.java b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/file/FileDataMaker.java index 2df3e20..76543f0 100644 --- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/file/FileDataMaker.java +++ b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/file/FileDataMaker.java @@ -51,6 +51,7 @@ import org.tizen.dynamicanalyzer.ui.common.PopupFromSelectionMenuItemClickListen import org.tizen.dynamicanalyzer.ui.common.PopupStartMenuItemClickListener; import org.tizen.dynamicanalyzer.ui.common.TimelineChartMouseEventListener; import org.tizen.dynamicanalyzer.ui.common.TimelineChartMouseTrackAdapter; +import org.tizen.dynamicanalyzer.ui.summary.SummaryDataManager; import org.tizen.dynamicanalyzer.ui.summary.failed.FailedChecker; import org.tizen.dynamicanalyzer.ui.summary.failed.FailedData; import org.tizen.dynamicanalyzer.ui.summary.leaks.LeakDetector; @@ -233,10 +234,13 @@ public class FileDataMaker { && (event.getApiType() == LogCenterConstants.FD_API_TYPE_OPEN)) { if (!warningChecker.isChecked(data.getFilePath(), WarningCase.DUPLICATE_OPEN.getType())) { - WarningData wData = new WarningData( - WarningCase.DUPLICATE_OPEN.getType(), - data.getContents(), data.getFilePath()); - warningChecker.getWarningData().add(wData); +// WarningData wData = new WarningData( +// WarningCase.DUPLICATE_OPEN.getType(), +// data.getContents(), data.getFilePath()); +// warningChecker.getWarningData().add(wData); + // add 201405 + SummaryDataManager.getInstance().getWarningDataMaker().makeData( + data.getContents(), data.getFilePath(), WarningCase.DUPLICATE_OPEN.getType()); } } } @@ -259,10 +263,13 @@ public class FileDataMaker { && (data.getFilePath().equals(AnalyzerLabels.EMPTY_STRING) == false)) { // open-close if (!warningChecker.isChecked(data.getFilePath(), WarningCase.WITHOUT_USING.getType())) { - WarningData wData = new WarningData( - WarningCase.WITHOUT_USING.getType(), - data.getContents(), data.getFilePath()); - warningChecker.getWarningData().add(wData); +// WarningData wData = new WarningData( +// WarningCase.WITHOUT_USING.getType(), +// data.getContents(), data.getFilePath()); +// warningChecker.getWarningData().add(wData); + // add 201405 + SummaryDataManager.getInstance().getWarningDataMaker().makeData( + data.getContents(), data.getFilePath(), WarningCase.WITHOUT_USING.getType()); } } } diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/opengl/data/GLDataManager.java b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/opengl/data/GLDataManager.java index 3f0da2a..b840561 100644 --- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/opengl/data/GLDataManager.java +++ b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/opengl/data/GLDataManager.java @@ -43,6 +43,7 @@ import org.tizen.dynamicanalyzer.ui.opengl.data.type.GLAPIType; import org.tizen.dynamicanalyzer.ui.opengl.data.type.GLES20ErrorDefine; import org.tizen.dynamicanalyzer.ui.opengl.data.type.GLFrameType; import org.tizen.dynamicanalyzer.ui.opengl.data.type.GLSharingContextType; +import org.tizen.dynamicanalyzer.ui.summary.SummaryDataManager; import org.tizen.dynamicanalyzer.ui.summary.failed.FailedData; import org.tizen.dynamicanalyzer.ui.timeline.common.TimelineConstants; @@ -160,8 +161,10 @@ public class GLDataManager extends PageDataManager { private void checkFailedAPI(GLES20LogData logData) { if (logData.getErrno() != GLES20ErrorDefine.EGL_SUCCESS && logData.getErrno() != GLES20ErrorDefine.GL_SUCCESS) { - FailedData ffd = new FailedData(logData); - AnalyzerManager.getFailedChecker().getFailedList().add(ffd); +// FailedData ffd = new FailedData(logData); +// AnalyzerManager.getFailedChecker().getFailedList().add(ffd); + // add 201405 + SummaryDataManager.getInstance().getFailedApiDataMaker().makeData(logData); } } diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/summary/SummaryPage.java b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/summary/SummaryPage.java index 37aa9ce..ec4af62 100644 --- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/summary/SummaryPage.java +++ b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/summary/SummaryPage.java @@ -36,6 +36,7 @@ import org.tizen.dynamicanalyzer.shortcut.ShortCutManager; import org.tizen.dynamicanalyzer.swap.logparser.DataManagerRegistry; import org.tizen.dynamicanalyzer.ui.page.ScreenshotTabComposite; import org.tizen.dynamicanalyzer.ui.summary.failed.FailedApiListView; +import org.tizen.dynamicanalyzer.ui.summary.SummaryDataManager; import org.tizen.dynamicanalyzer.ui.summary.leaks.LeakView; import org.tizen.dynamicanalyzer.ui.summary.profiling.FunctionUsageProfiler; import org.tizen.dynamicanalyzer.ui.summary.profiling.FunctionUsageProfilingView; @@ -60,6 +61,8 @@ public class SummaryPage extends DAPageComposite { public final static int FUNCTION_PROFILING_VIEW_INDEX = 3; public final static int WARNING_VIEW_INDEX = 4; public final static int WARNING_VIEW_DETAIL_INDEX = 5; + + private SummaryDataManager summaryDataManager; SashForm upperForm; SashForm bottomForm; @@ -68,6 +71,9 @@ public class SummaryPage extends DAPageComposite { public SummaryPage(Composite parent, int style) { super(parent, style); + + summaryDataManager = SummaryDataManager.getInstance(); + setTitle(AnalyzerLabels.COOLBAR_AREA_SUMMARY); this.setData(DAPageComposite.KEY_TOOLTIP, ShortCutManager.COOLBAR_AREA_SUMMARY_TOOLTIP); @@ -127,6 +133,7 @@ public class SummaryPage extends DAPageComposite { DataManagerRegistry.registerPageDataManager(FunctionUsageProfiler .getInstance()); + DataManagerRegistry.registerPageDataManager(summaryDataManager); } @Override @@ -143,4 +150,11 @@ public class SummaryPage extends DAPageComposite { upperForm.setWeights(new int[] { 37, 100 - 37 - wrate, wrate }); baseForm.setWeights(new int[] { hrate, 100 - hrate }); } + + @Override + public void clear() { + super.clear(); + if (summaryDataManager != null) + summaryDataManager.clear(); + } } diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/summary/failed/FailedApiTable.java b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/summary/failed/FailedApiTable.java index 4aaf6af..8c91497 100644 --- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/summary/failed/FailedApiTable.java +++ b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/summary/failed/FailedApiTable.java @@ -39,8 +39,10 @@ import org.tizen.dynamicanalyzer.common.DASelectionData; import org.tizen.dynamicanalyzer.error.ErrorCodeManager; import org.tizen.dynamicanalyzer.listeners.SummaryMouseDoubleClickListener; import org.tizen.dynamicanalyzer.model.TableInput; +import org.tizen.dynamicanalyzer.swap.model.data.ProbeCommonData; import org.tizen.dynamicanalyzer.ui.range.RangeDataManager; import org.tizen.dynamicanalyzer.ui.range.RangePage; +import org.tizen.dynamicanalyzer.ui.summary.SummaryDataManager; import org.tizen.dynamicanalyzer.ui.summary.SummaryPage; import org.tizen.dynamicanalyzer.ui.toolbar.ToolbarArea; import org.tizen.dynamicanalyzer.ui.widgets.table.DATableComposite; @@ -52,6 +54,10 @@ public class FailedApiTable extends DATableComposite { private static final DALogger DA_LOG = DALogger.getInstance(); private boolean isRange = false; + + // add 201405 + private final FailedApiDataMaker failedApiDataMaker = + SummaryDataManager.getInstance().getFailedApiDataMaker(); public FailedApiTable(Composite parent, int style, int tableStyle) { super(parent, style, tableStyle); @@ -86,90 +92,212 @@ public class FailedApiTable extends DATableComposite { this.isRange = isRange; } +// protected List makeTableInput() { +// List failedList = null; +// if (isRange) { +// failedList = RangeDataManager.getInstance().getFailedChecker() +// .getFailedList(); +// } else { +// failedList = AnalyzerManager.getFailedChecker().getFailedList(); +// } +// +// List input = new ArrayList(); +// int size = failedList.size(); +// for (int i = 0; i < size; i++) { +// FailedData failedData = failedList.get(i); +// int selectedPid = ToolbarArea.getInstance().getSelectedPid(); +// if (selectedPid != 0) { +// if (selectedPid != failedData.getPid()) { +// continue; +// } +// } +// +// // create text +// List text = new ArrayList(); +// List data = new ArrayList(); +// +// text.add(Integer.toString(failedData.getSeq())); // 0 +// data.add(new Integer(failedData.getSeq())); +// String time = Formatter.toTimeFormat(failedData.getTime()); +// text.add(time); // 1 +// data.add(new Long(failedData.getTime())); +// +// text.add(failedData.getName()); // 2 +// data.add(failedData.getName()); +// +// text.add(failedData.getArgs()); // 3 +// data.add(failedData.getArgs()); +// +// text.add(failedData.getReturn()); // 4 +// data.add(failedData.getReturn()); +// +// try { +// String errCode = ErrorCodeManager.getInatance() +// .getErrorCode(failedData.getErrorCode()).name(); +// if (null == errCode) { +// // FIXME : for debug +// errCode = "undefined error number"; //$NON-NLS-1$ +// } +// text.add(errCode); // 5 +// data.add(new Long(failedData.getErrorCode())); +// } catch (NullPointerException e) { +// DA_LOG.debug("debug"); +// continue; +// } +// String errMsg = ErrorCodeManager.getInatance().getErrorDescription( +// failedData.getErrorCode()); +// if (null == errMsg) { +// // FIXME : for debug +// errMsg = "undefined error number"; //$NON-NLS-1$ +// } +// text.add(errMsg); // 6 +// data.add(new Long(failedData.getErrorCode())); +// +// text.add(Integer.toString(failedData.getPid())); // 7 +// data.add(new Integer(failedData.getPid())); +// +// data.add(new Long(failedData.getCallerPc())); // 8 +// data.add(failedData.getLibName()); // 9 +// +// // create images +// +// // create DATableDataFormat +// DATableDataFormat tableData = new DATableDataFormat( +// failedData.getSeq()); +// tableData.setObject(failedData); +// tableData.setLogData(failedData.getData()); +// tableData.getData().addAll(data); +// tableData.setType(AnalyzerConstants.TYPE_TABLE_FAILED); +// +// TableInput tableInput = new TableInput(); +// tableInput.setText(text); +// tableInput.setData(tableData); +// input.add(tableInput); +// +// if (RangeDataManager.getInstance().isBeingAnalyzed()) { +// long failedTime = failedData.getTime(); +// long startTime = RangeDataManager.getInstance() +// .getAnalysisStartTime(); +// long endTime = RangeDataManager.getInstance() +// .getAnalysisEndTime(); +// if (failedTime >= startTime && failedTime <= endTime) { +// tableInput.setInRange(true); +// } +// } +// } +// return input; +// } + + // add 201405 protected List makeTableInput() { - List failedList = null; - if (isRange) { - failedList = RangeDataManager.getInstance().getFailedChecker() - .getFailedList(); - } else { - failedList = AnalyzerManager.getFailedChecker().getFailedList(); - } - +// List failedList = null; +// if (isRange) { +// failedList = RangeDataManager.getInstance().getFailedChecker() +// .getFailedList(); +// } else { +// failedList = AnalyzerManager.getFailedChecker().getFailedList(); +// } + List input = new ArrayList(); - int size = failedList.size(); + List> failedData = failedApiDataMaker.getFailedApiDataFromDB(); + int size = failedData.size(); for (int i = 0; i < size; i++) { - FailedData failedData = failedList.get(i); + List idata = failedData.get(i); int selectedPid = ToolbarArea.getInstance().getSelectedPid(); + int pid = (Integer)idata.get(FailedApiDataDBTable.COLUMN_INDEX_PID); if (selectedPid != 0) { - if (selectedPid != failedData.getPid()) { + if (selectedPid != pid) { continue; } } - + // create text List text = new ArrayList(); List data = new ArrayList(); + + // 0 : sequence number + int seq = (Integer)idata.get(FailedApiDataDBTable.COLUMN_INDEX_SEQ); + text.add(Integer.toString(seq)); + data.add(Integer.valueOf(seq)); + // 1 : start time + long time = (Long)idata.get(FailedApiDataDBTable.COLUMN_INDEX_START_TIME); + text.add(Formatter.toTimeFormat(time)); + data.add(Long.valueOf(time)); + // 2 : api name + String apiName = (String)idata.get(FailedApiDataDBTable.COLUMN_INDEX_API_NAME); + text.add(apiName); + data.add(apiName); + // 3 : argurments + String args = (String)idata.get(FailedApiDataDBTable.COLUMN_INDEX_ARGUMENT); + text.add(args); + data.add(args); + // 4 : return value + String retValue = (String)idata.get(FailedApiDataDBTable.COLUMN_INDEX_RETURN); + text.add(retValue); + data.add(retValue); - text.add(Integer.toString(failedData.getSeq())); // 0 - data.add(new Integer(failedData.getSeq())); - String time = Formatter.toTimeFormat(failedData.getTime()); - text.add(time); // 1 - data.add(new Long(failedData.getTime())); - - text.add(failedData.getName()); // 2 - data.add(failedData.getName()); - - text.add(failedData.getArgs()); // 3 - data.add(failedData.getArgs()); - - text.add(failedData.getReturn()); // 4 - data.add(failedData.getReturn()); - + long errNum = (Long)idata.get(FailedApiDataDBTable.COLUMN_INDEX_ERROR_CODE); try { String errCode = ErrorCodeManager.getInatance() - .getErrorCode(failedData.getErrorCode()).name(); + .getErrorCode(errNum).name(); if (null == errCode) { // FIXME : for debug errCode = "undefined error number"; //$NON-NLS-1$ } - text.add(errCode); // 5 - data.add(new Long(failedData.getErrorCode())); + // 5 : error code + text.add(errCode); + data.add(Long.valueOf(errNum)); } catch (NullPointerException e) { DA_LOG.debug("debug"); continue; } - String errMsg = ErrorCodeManager.getInatance().getErrorDescription( - failedData.getErrorCode()); + String errMsg = ErrorCodeManager.getInatance().getErrorDescription(errNum); if (null == errMsg) { // FIXME : for debug errMsg = "undefined error number"; //$NON-NLS-1$ } - text.add(errMsg); // 6 - data.add(new Long(failedData.getErrorCode())); - - text.add(Integer.toString(failedData.getPid())); // 7 - data.add(new Integer(failedData.getPid())); - - data.add(new Long(failedData.getCallerPc())); // 8 - data.add(failedData.getLibName()); // 9 - + // 6 : error message + text.add(errMsg); + data.add(Long.valueOf(errNum)); + // 7 : pid + text.add(Integer.toString(pid)); + data.add(Integer.valueOf(pid)); + // 8 : caller pc address + long callerPcAddr = (Long)idata.get(FailedApiDataDBTable.COLUMN_INDEX_CALLER_PC_ADDRESS); + data.add(Long.valueOf(callerPcAddr)); + // 9 : library name + String libName = (String)idata.get(FailedApiDataDBTable.COLUMN_INDEX_LIBRARY_NAME); + data.add(libName); + // create images - + // create DATableDataFormat - DATableDataFormat tableData = new DATableDataFormat( - failedData.getSeq()); - tableData.setObject(failedData); - tableData.setLogData(failedData.getData()); + DATableDataFormat tableData = new DATableDataFormat(seq); +// tableData.setObject(failedData); + // make ProbeCommonData for table data + ProbeCommonData probeData = new ProbeCommonData(); + probeData.setSeq(seq); + probeData.setApiName(apiName); + probeData.setPid(pid); + probeData.setTime(time); + probeData.setArgs(args); + probeData.setReturn(retValue); + probeData.setErrNo(errNum); + probeData.setCallerAddress(callerPcAddr); + probeData.setLibName(libName); + probeData.setId((Integer)idata.get(FailedApiDataDBTable.COLUMN_INDEX_MESSAGE_ID)); + tableData.setLogData(probeData); +// tableData.setLogData(failedData.getData()); tableData.getData().addAll(data); tableData.setType(AnalyzerConstants.TYPE_TABLE_FAILED); - + TableInput tableInput = new TableInput(); tableInput.setText(text); tableInput.setData(tableData); input.add(tableInput); - + if (RangeDataManager.getInstance().isBeingAnalyzed()) { - long failedTime = failedData.getTime(); + long failedTime = time; long startTime = RangeDataManager.getInstance() .getAnalysisStartTime(); long endTime = RangeDataManager.getInstance() diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/summary/leaks/LeakTable.java b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/summary/leaks/LeakTable.java index e5eba42..9622b23 100644 --- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/summary/leaks/LeakTable.java +++ b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/summary/leaks/LeakTable.java @@ -42,17 +42,28 @@ import org.tizen.dynamicanalyzer.common.AnalyzerManager; import org.tizen.dynamicanalyzer.common.DASelectionData; import org.tizen.dynamicanalyzer.listeners.SummaryMouseDoubleClickListener; import org.tizen.dynamicanalyzer.model.TreeInput; +import org.tizen.dynamicanalyzer.swap.channel.data.ApiNameManager; +import org.tizen.dynamicanalyzer.swap.model.data.LogDataFactory; +import org.tizen.dynamicanalyzer.swap.model.data.ProbeCommonData; import org.tizen.dynamicanalyzer.ui.range.RangeDataManager; import org.tizen.dynamicanalyzer.ui.range.RangePage; +import org.tizen.dynamicanalyzer.ui.summary.SummaryDataManager; import org.tizen.dynamicanalyzer.ui.summary.SummaryPage; +import org.tizen.dynamicanalyzer.ui.summary.warning.WarningDataDBTable; import org.tizen.dynamicanalyzer.ui.toolbar.ToolbarArea; import org.tizen.dynamicanalyzer.ui.widgets.table.DATableDataFormat; import org.tizen.dynamicanalyzer.ui.widgets.table.DATreeComposite; +import org.tizen.dynamicanalyzer.util.DALogger; import org.tizen.dynamicanalyzer.utils.Formatter; public class LeakTable extends DATreeComposite { - + private static final DALogger DA_LOG = DALogger.getInstance(); + private boolean isRange = false; + + // add 201405 + private final LeakDataMaker leakDataMaker = + SummaryDataManager.getInstance().getLeakDataMaker(); public LeakTable(Composite parent, int compStyle, int tableStyle) { super(parent, compStyle, tableStyle); @@ -109,99 +120,233 @@ public class LeakTable extends DATreeComposite { } // !! recursive!! - public void makeChildTree(List children, TreeInput parent, - String parentName) { - if (!children.isEmpty()) { - int size = children.size(); - for (int i = 0; i < size; i++) { - LeakData data = children.get(i); - TreeInput input = makeInput(data); - parent.getChildren().add(input); - input.setParent(parentName); - } - } - } +// public void makeChildTree(List children, TreeInput parent, +// String parentName) { +// if (!children.isEmpty()) { +// int size = children.size(); +// for (int i = 0; i < size; i++) { +// LeakData data = children.get(i); +// TreeInput input = makeInput(data); +// parent.getChildren().add(input); +// input.setParent(parentName); +// } +// } +// } +// @Override +// public List makeTreeInput() { +// List output = new ArrayList(); +// HashMap leaks = null; +// if (isRange) { +// leaks = RangeDataManager.getInstance().getLeakDetector() +// .getLeakHash(); +// } else { +// leaks = AnalyzerManager.getLeakDetector().getLeakHash(); +// } +// ArrayList leakList = new ArrayList(); +// leakList.addAll(leaks.values()); +// int selectedPid = ToolbarArea.getInstance().getSelectedPid(); +// int size = leakList.size(); +// for (int i = 0; i < size; i++) { +// LeakData leakData = leakList.get(i); +// if (selectedPid != 0) { +// if (selectedPid != leakData.getPid()) { +// continue; +// } +// } +// TreeInput leakInput = makeInput(leakData); +// makeChildTree(leakData.getChildren(), leakInput, +// Integer.toString(leakData.getParentKey())); +// } +// return output; +// } + + // add 201405 @Override public List makeTreeInput() { List output = new ArrayList(); - HashMap leaks = null; + HashMap leaks = null; + // TODO : make hashkey (Integer --> combination of pid and address) if (isRange) { - leaks = RangeDataManager.getInstance().getLeakDetector() - .getLeakHash(); + // TODO : currently this feature (DB refactoring) does not applied to the range page. +// leaks = RangeDataManager.getInstance().getLeakDetector2() +// .getLeakHash(); } else { - leaks = AnalyzerManager.getLeakDetector().getLeakHash(); + leaks = AnalyzerManager.getLeakDetector2().getLeakHash(); } - ArrayList leakList = new ArrayList(); - leakList.addAll(leaks.values()); + + ArrayList leakList = new ArrayList(); + leakList.addAll(leaks.values()); + // TODO : it is necessary to consider when choosing a multi-processes. int selectedPid = ToolbarArea.getInstance().getSelectedPid(); int size = leakList.size(); + // TODO : make a list of the sequence numbers for the leak data and send it to the makeTreeInputForLeaks() for (int i = 0; i < size; i++) { - LeakData leakData = leakList.get(i); + CurrentLeakData leakData = leakList.get(i); if (selectedPid != 0) { if (selectedPid != leakData.getPid()) { continue; } } - TreeInput leakInput = makeInput(leakData); - makeChildTree(leakData.getChildren(), leakInput, - Integer.toString(leakData.getParentKey())); - output.add(leakInput); + + TreeInput leakInput = makeTreeInputForLeaks(leakData, i); + if (leakInput != null) + output.add(leakInput); } return output; } - private TreeInput makeInput(LeakData leakData) { - DATableDataFormat tableData = new DATableDataFormat( - leakData.getLeakSeq()); +// private TreeInput makeInput(LeakData leakData) { +// DATableDataFormat tableData = new DATableDataFormat( +// leakData.getLeakSeq()); +// +// List text = new ArrayList(); +// List data = new ArrayList(); +// text.add(leakData.getName()); // 0 column empty value for tree +// data.add(leakData.getName()); +// text.add(Integer.toString(leakData.getPid())); // 1 +// data.add(Integer.valueOf(leakData.getPid())); +// text.add(Integer.toString(leakData.getSeq())); // 2 +// data.add(Integer.valueOf(leakData.getSeq())); +// +// text.add(leakData.getType()); +// data.add(leakData.getType()); // 3 +// +// long time = leakData.getTime(); +// data.add(Long.valueOf(time)); +// try { +// text.add(Formatter.toTimeFormat(time)); +// } catch (NumberFormatException e) { +// e.printStackTrace(); +// text.add(Long.toString(time)); +// } // 4 +// +// tableData.setObject(leakData.getName()); +// text.add(leakData.getParam()); // 5 +// data.add(leakData.getParam()); +// text.add(leakData.getRet()); // 6 +// data.add(leakData.getRet()); +// +// String libName = leakData.getLibName(); +// if (libName == null || libName.isEmpty()) { +// // TODO +// libName = "unknown"; +// } +// text.add(libName); // 7 +// data.add(libName); +// +// data.add(Long.valueOf(leakData.getAddr())); // 8 // for ToolTip +// // listener +// data.add(Long.valueOf(leakData.getCallerPc())); // 9 +// +// tableData.getData().addAll(data); +// tableData.setType(AnalyzerConstants.TYPE_TABLE_LEAK); +// +// TreeInput output = new TreeInput(); +// output.setText(text); +// output.setData(tableData); +// output.setParent(Integer.toString(leakData.getParentKey())); +// +// if (RangeDataManager.getInstance().isBeingAnalyzed()) { +// long leakTime = time; +// long startTime = RangeDataManager.getInstance() +// .getAnalysisStartTime(); +// long endTime = RangeDataManager.getInstance().getAnalysisEndTime(); +// if (leakTime >= startTime && leakTime <= endTime) { +// output.setInRange(true); +// } +// } +// +// return output; +// } + + // add 201405 + private TreeInput makeTreeInputForLeaks(CurrentLeakData leakInfo, int index) { + // TODO : need understand for the DATableDataFormat class + DATableDataFormat tableData = new DATableDataFormat(index); List text = new ArrayList(); List data = new ArrayList(); - text.add(leakData.getName()); // 0 column empty value for tree - data.add(leakData.getName()); - text.add(Integer.toString(leakData.getPid())); // 1 - data.add(new Integer(leakData.getPid())); - text.add(Integer.toString(leakData.getSeq())); // 2 - data.add(new Integer(leakData.getSeq())); - - text.add(leakData.getType()); - data.add(leakData.getType()); // 3 - - long time = leakData.getTime(); - data.add(new Long(time)); + TreeInput output = null; + + int seq = leakInfo.getSequenceNumber(); + // TODO : rename getLeakDataFromDB() --> getAllocationDataFromDB() + List> leakData = leakDataMaker.getLeakDataFromDB(seq); + if (leakData == null) { DA_LOG.error("very strange case !!"); return null;} + if (leakData.size() != 1) { // size of leakData must be 1 + DA_LOG.error("size of leakDataMaker.getLeakDataFromDB() is not '1'"); + return output; + } + List idata = leakData.get(0); + // 0 column empty value for tree + String apiName = (String)idata.get(MemoryAllocationDataDBTable.COLUMN_INDEX_API_NAME); + text.add(apiName); + data.add(apiName); + // 1 + int pid = (Integer)idata.get(MemoryAllocationDataDBTable.COLUMN_INDEX_PID); + text.add(Integer.toString(pid)); + data.add(pid); + // 2 + text.add(Integer.toString(seq)); + data.add(seq); + // 3 + int id = (Integer)idata.get(MemoryAllocationDataDBTable.COLUMN_INDEX_MESSAGE_ID); + String type = LogDataFactory.getLogFormatById(id).getName(); + text.add(type); + data.add(type); + // 4 + long time = (Long)idata.get(MemoryAllocationDataDBTable.COLUMN_INDEX_ALLOCATED_TIME); + data.add(Long.valueOf(time)); try { text.add(Formatter.toTimeFormat(time)); } catch (NumberFormatException e) { e.printStackTrace(); text.add(Long.toString(time)); - } // 4 - - tableData.setObject(leakData.getName()); - text.add(leakData.getParam()); // 5 - data.add(leakData.getParam()); - text.add(leakData.getRet()); // 6 - data.add(leakData.getRet()); - - String libName = leakData.getLibName(); + } + + tableData.setObject(apiName); + // 5 + String args = (String)idata.get(MemoryAllocationDataDBTable.COLUMN_INDEX_ARGUMENT); + text.add(args); + data.add(args); + // 6 + String retValue = (String)idata.get(MemoryAllocationDataDBTable.COLUMN_INDEX_RETURN); + text.add(retValue); + data.add(retValue); + // 7 + String libName = (String)idata.get(MemoryAllocationDataDBTable.COLUMN_INDEX_LIBRARY_NAME); if (libName == null || libName.isEmpty()) { - // TODO + // TODO : replace another one ?? libName = "unknown"; } - text.add(libName); // 7 + text.add(libName); data.add(libName); - - data.add(new Long(leakData.getAddr())); // 8 // for ToolTip - // listener - data.add(new Long(leakData.getCallerPc())); // 9 - + // 8 - for ToolTip Listener + data.add((Long)idata.get(MemoryAllocationDataDBTable.COLUMN_INDEX_ALLOCATED_ADDRESS)); + // 9 + long callerPcAddr = (Long)idata.get(MemoryAllocationDataDBTable.COLUMN_INDEX_CALLER_PC_ADDRESS); + data.add(callerPcAddr); + tableData.getData().addAll(data); tableData.setType(AnalyzerConstants.TYPE_TABLE_LEAK); - - TreeInput output = new TreeInput(); + + ProbeCommonData probeData = new ProbeCommonData(); + probeData.setSeq(seq); + probeData.setApiName(apiName); + probeData.setId(id); + probeData.setPid(pid); + probeData.setTime(time); + probeData.setArgs(args); + probeData.setReturn(retValue); + probeData.setCallerAddress(callerPcAddr); + probeData.setLibName(libName); + tableData.setLogData(probeData); + + output = new TreeInput(); output.setText(text); output.setData(tableData); - output.setParent(Integer.toString(leakData.getParentKey())); - +// output.setParent(Integer.toString(leakData.getParentKey())); + if (RangeDataManager.getInstance().isBeingAnalyzed()) { long leakTime = time; long startTime = RangeDataManager.getInstance() @@ -211,7 +356,7 @@ public class LeakTable extends DATreeComposite { output.setInRange(true); } } - + return output; } } diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/summary/warning/WarningDetailView.java b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/summary/warning/WarningDetailView.java index 1779c7c..b6af345 100644 --- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/summary/warning/WarningDetailView.java +++ b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/summary/warning/WarningDetailView.java @@ -42,6 +42,7 @@ import org.tizen.dynamicanalyzer.nl.SummaryLabels; import org.tizen.dynamicanalyzer.resources.ColorResources; import org.tizen.dynamicanalyzer.resources.FontResources; import org.tizen.dynamicanalyzer.ui.range.RangeDataManager; +import org.tizen.dynamicanalyzer.ui.summary.SummaryDataManager; import org.tizen.dynamicanalyzer.ui.summary.SummaryPage; import org.tizen.dynamicanalyzer.ui.widgets.table.DATableDataFormat; import org.tizen.dynamicanalyzer.widgets.da.view.DAViewComposite; @@ -92,7 +93,7 @@ public class WarningDetailView extends DAViewComposite { } } }; - + @Override public void updateView(DAViewData vdata) { if (vdata instanceof DASelectionData) { @@ -108,20 +109,26 @@ public class WarningDetailView extends DAViewComposite { .getData(); int seq = tableData.getLogData().getSeq(); - WarningChecker warningChecker = null; - if (isRange) { - warningChecker = RangeDataManager.getInstance() - .getWarningChecker(); - } else { - warningChecker = AnalyzerManager.getWarningChecker(); - } - WarningData warning = warningChecker - .getWarningDataByLogSeq(seq); - if (null == warning) { +// WarningChecker warningChecker = null; +// if (isRange) { +// warningChecker = RangeDataManager.getInstance() +// .getWarningChecker(); +// } else { +// warningChecker = AnalyzerManager.getWarningChecker(); +// } +// WarningData warning = warningChecker +// .getWarningDataByLogSeq(seq); +// if (null == warning) { +// warningMessage = CommonConstants.EMPTY; +// } else { +// warningMessage = WarningChecker +// .messageMaker(warning, false); +// } + String msg = SummaryDataManager.getInstance().getWarningDataMaker().getWarningMessage(seq); + if (msg == null) { warningMessage = CommonConstants.EMPTY; } else { - warningMessage = WarningChecker - .messageMaker(warning, false); + warningMessage = msg; } canvas.redraw(); } diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/summary/warning/WarningTable.java b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/summary/warning/WarningTable.java index 35b0320..f4be638 100644 --- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/summary/warning/WarningTable.java +++ b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/summary/warning/WarningTable.java @@ -38,14 +38,21 @@ import org.tizen.dynamicanalyzer.common.AnalyzerManager; import org.tizen.dynamicanalyzer.common.DASelectionData; import org.tizen.dynamicanalyzer.listeners.SummaryMouseDoubleClickListener; import org.tizen.dynamicanalyzer.model.TableInput; +import org.tizen.dynamicanalyzer.swap.model.data.LogDataFactory; +import org.tizen.dynamicanalyzer.swap.model.data.ProbeCommonData; import org.tizen.dynamicanalyzer.ui.range.RangeDataManager; import org.tizen.dynamicanalyzer.ui.range.RangePage; +import org.tizen.dynamicanalyzer.ui.summary.SummaryDataManager; import org.tizen.dynamicanalyzer.ui.summary.SummaryPage; import org.tizen.dynamicanalyzer.ui.widgets.table.DATableComposite; import org.tizen.dynamicanalyzer.ui.widgets.table.DATableDataFormat; public class WarningTable extends DATableComposite { private boolean isRange = false; + + // add 201405 + private final WarningDataMaker warningDataMaker = + SummaryDataManager.getInstance().getWarningDataMaker(); public WarningTable(Composite parent, int compStyle, int tableStyle) { super(parent, compStyle, tableStyle); @@ -82,40 +89,104 @@ public class WarningTable extends DATableComposite { this.isRange = isRange; } +// protected List makeTableInput() { +// List warningList = null; +// if (isRange) { +// warningList = RangeDataManager.getInstance().getWarningChecker() +// .getWarningData(); +// } else { +// warningList = AnalyzerManager.getWarningChecker().getWarningData(); +// } +// List input = new ArrayList(); +// int size = warningList.size(); +// for (int i = 0; i < size; i++) { +// // create text +// List text = new ArrayList(); +// List data = new ArrayList(); +// WarningData warningData = warningList.get(i); +// +// text.add(Integer.toString(warningData.getSeq())); +// data.add(Integer.toString(warningData.getSeq())); +// +// text.add(warningData.getCategory()); +// data.add(warningData.getCategory()); +// +// text.add(Integer.toString(warningData.getPid())); +// data.add(Integer.toString(warningData.getPid())); +// String message = WarningChecker.messageMaker(warningData, true); +// text.add(message); +// data.add(message); +// // create images +// +// // create DATableDataFormat +// DATableDataFormat tableData = new DATableDataFormat(warningData +// .getLogData().getSeq()); +// tableData.getData().addAll(text); +// tableData.setLogData(warningData.getLogData()); +// tableData.setType(AnalyzerConstants.TYPE_TABLE_WARNING); +// TableInput tableInput = new TableInput(); +// tableInput.setText(text); +// tableInput.setData(tableData); +// input.add(tableInput); +// } +// return input; +// } + + // add 201405 protected List makeTableInput() { - List warningList = null; - if (isRange) { - warningList = RangeDataManager.getInstance().getWarningChecker() - .getWarningData(); - } else { - warningList = AnalyzerManager.getWarningChecker().getWarningData(); - } +// List warningList = null; +// if (isRange) { +// warningList = RangeDataManager.getInstance().getWarningChecker() +// .getWarningData(); +// } else { +// warningList = AnalyzerManager.getWarningChecker().getWarningData(); +// } + List input = new ArrayList(); - int size = warningList.size(); + List> warningData = warningDataMaker.getWarningDataFromDB(); + int size = warningData.size(); for (int i = 0; i < size; i++) { + List idata = warningData.get(i); + // create text List text = new ArrayList(); List data = new ArrayList(); - WarningData warningData = warningList.get(i); - - text.add(Integer.toString(warningData.getSeq())); - data.add(Integer.toString(warningData.getSeq())); - - text.add(warningData.getCategory()); - data.add(warningData.getCategory()); - text.add(Integer.toString(warningData.getPid())); - data.add(Integer.toString(warningData.getPid())); - String message = WarningChecker.messageMaker(warningData, true); + // 0 + int rid = (Integer)idata.get(WarningDataDBTable.COLUMN_INDEX_RID); + text.add(Integer.toString(rid)); + data.add(Integer.toString(rid)); + // 1 + int msgID = (Integer)idata.get(WarningDataDBTable.COLUMN_INDEX_MESSAGE_ID); + String category = LogDataFactory.getLogFormatById(msgID).getName(); + text.add(category); + data.add(category); + // 2 + int pid = (Integer)idata.get(WarningDataDBTable.COLUMN_INDEX_PID); + text.add(Integer.toString(pid)); + data.add(Integer.toString(pid)); + // 3 + int warningCase = (Integer)idata.get(WarningDataDBTable.COLUMN_INDEX_WARNING_CASE); + String key = (String)idata.get(WarningDataDBTable.COLUMN_INDEX_WARNING_KEY); + String message = warningDataMaker.messageMaker(key, warningCase, true); text.add(message); data.add(message); // create images // create DATableDataFormat - DATableDataFormat tableData = new DATableDataFormat(warningData - .getLogData().getSeq()); + int seq = (Integer)idata.get(WarningDataDBTable.COLUMN_INDEX_SEQ); + DATableDataFormat tableData = new DATableDataFormat(seq); + + ProbeCommonData probeData = new ProbeCommonData(); + probeData.setSeq(seq); + probeData.setId(msgID); + probeData.setPid(pid); + probeData.setTime((Long)idata.get(WarningDataDBTable.COLUMN_INDEX_START_TIME)); + probeData.setReserved1(warningCase); // warningCase + probeData.setCallerAddress((Long)idata.get(WarningDataDBTable.COLUMN_INDEX_CALLER_PC_ADDRESS)); + probeData.setLibName((String)idata.get(WarningDataDBTable.COLUMN_INDEX_LIBRARY_NAME)); tableData.getData().addAll(text); - tableData.setLogData(warningData.getLogData()); + tableData.setLogData(probeData); tableData.setType(AnalyzerConstants.TYPE_TABLE_WARNING); TableInput tableInput = new TableInput(); tableInput.setText(text); diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/thread/ThreadPageData.java b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/thread/ThreadPageData.java index 1a0245a..99d3487 100644 --- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/thread/ThreadPageData.java +++ b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/thread/ThreadPageData.java @@ -31,6 +31,7 @@ import java.util.List; import org.tizen.dynamicanalyzer.common.AnalyzerManager; import org.tizen.dynamicanalyzer.nl.ThreadPageLabels; import org.tizen.dynamicanalyzer.resources.ColorResources; +import org.tizen.dynamicanalyzer.ui.summary.SummaryDataManager; import org.tizen.dynamicanalyzer.ui.summary.failed.FailedData; import org.tizen.dynamicanalyzer.widgets.chart.DAChart; import org.tizen.dynamicanalyzer.widgets.chart.DAChartSeriesItem; @@ -131,8 +132,11 @@ public abstract class ThreadPageData { ThreadPageDataEvent event, long errno) { DAChartSeriesItem apiItem = null; if (0 != errno) { - FailedData ffd = new FailedData(event.getContents()); - AnalyzerManager.getFailedChecker().getFailedList().add(ffd); +// FailedData ffd = new FailedData(event.getContents()); +// AnalyzerManager.getFailedChecker().getFailedList().add(ffd); + // add 201405 + SummaryDataManager.getInstance().getFailedApiDataMaker(). + makeData(event.getContents()); apiItem = new DAChartSeriesItem(event.getTime(), DAChartSeriesItem.SERIES_STATE_BAR, ColorResources.RED, event.getTooltipContent() diff --git a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/thread/thread/ThreadPageThreadDataManager.java b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/thread/thread/ThreadPageThreadDataManager.java index 9faf516..1a52fc8 100644 --- a/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/thread/thread/ThreadPageThreadDataManager.java +++ b/org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/thread/thread/ThreadPageThreadDataManager.java @@ -51,6 +51,7 @@ import org.tizen.dynamicanalyzer.ui.common.PopupFromSelectionMenuItemClickListen import org.tizen.dynamicanalyzer.ui.common.PopupStartMenuItemClickListener; import org.tizen.dynamicanalyzer.ui.common.TimelineChartMouseEventListener; import org.tizen.dynamicanalyzer.ui.common.TimelineChartMouseTrackAdapter; +import org.tizen.dynamicanalyzer.ui.summary.SummaryDataManager; import org.tizen.dynamicanalyzer.ui.summary.warning.WarningCase; import org.tizen.dynamicanalyzer.ui.summary.warning.WarningData; import org.tizen.dynamicanalyzer.ui.thread.ThreadPageData; @@ -491,10 +492,14 @@ public class ThreadPageThreadDataManager { pushCallEvent(event); if (true == isJoinableThread(tid)) { // warningData - WarningData wData = new WarningData( - WarningCase.JOINABLE_LEAK.getType(), input, - ThreadPageLabels.THREAD_CHART_NAME_TID + tid); - AnalyzerManager.getWarningChecker().getWarningData().add(wData); +// WarningData wData = new WarningData( +// WarningCase.JOINABLE_LEAK.getType(), input, +// ThreadPageLabels.THREAD_CHART_NAME_TID + tid); +// AnalyzerManager.getWarningChecker().getWarningData().add(wData); + // add 201405 + SummaryDataManager.getInstance().getWarningDataMaker().makeData( + input, ThreadPageLabels.THREAD_CHART_NAME_TID + tid, + WarningCase.JOINABLE_LEAK.getType()); } break; case LogCenterConstants.THREAD_API_TYPE_INTERNAL_START: @@ -586,11 +591,15 @@ public class ThreadPageThreadDataManager { pushCallEvent(event); if (true == isJoinableThread(tid)) { // warningData - WarningData wData = new WarningData( - WarningCase.JOINABLE_LEAK.getType(), - event.getContents(), - ThreadPageLabels.THREAD_CHART_NAME_TID + tid); - AnalyzerManager.getWarningChecker().getWarningData().add(wData); +// WarningData wData = new WarningData( +// WarningCase.JOINABLE_LEAK.getType(), +// event.getContents(), +// ThreadPageLabels.THREAD_CHART_NAME_TID + tid); +// AnalyzerManager.getWarningChecker().getWarningData().add(wData); + // 201405 + SummaryDataManager.getInstance().getWarningDataMaker().makeData( + event.getContents(), ThreadPageLabels.THREAD_CHART_NAME_TID + tid, + WarningCase.JOINABLE_LEAK.getType()); } break; case LogCenterConstants.THREAD_API_TYPE_INTERNAL_START: -- 2.7.4