swapCallstackManager.clear();
// UserFunctionManager.getInstance().clear();
- FunctionUsageProfiler.getInstance().clear();
FunctionUsageProfiler.getInstance().stopNormal();
ProfilingData.clear(); // reset internal sequence number
RangeDataManager.getInstance().initRange();
pushEOQ_toInserter();
}
- public void clear() {
-
- }
-
protected abstract void makeData(LogPackage pack);
protected void onThreadStop() {
baseForm.setWeights(new int[] { 100 - wrate, wrate });
rightForm.setWeights(new int[] { hrate, 100 - hrate });
}
+
+ @Override
+ public void clear() {
+ super.clear();
+
+ FileDataManager.getInstance().clear();
+ }
}
}
public void clear() {
- accessDB = null;
- apiDB = null;
- statusDB = null;
- accessorDB = null;
selectedData = null;
}
}
return instance;
}
+
+ public void clear() {
+ // do nothing
+ }
public List<Long> getLastCpuRate() {
return lastCpuRate;
@Override
public void clear() {
+ dataManager.clear();
cpuUsage.clear();
maxMem = 100;
processMem = 0;
public class KernelPage extends DAPageComposite {
public static final String pageID = KernelPage.class.getName();
- public static final String contextViewID = ContextSwitchingChartView.class
- .getName();
+ public static final String contextViewID = ContextSwitchingChartView.class.getName();
public static final String callflowTabID = "CallFlowTab.id";
- public static final String callflowViewID = CallFlowChartView.class
- .getName();
+ public static final String callflowViewID = CallFlowChartView.class.getName();
public static final String listViewID = KernelListView.class.getName();
- public static final String statViewID = KernelStatisticInfoView.class
- .getName();
-
- private KernelDataManager kdataManager;
+ public static final String statViewID = KernelStatisticInfoView.class.getName();
SashForm baseForm;
SashForm leftForm;
public KernelPage(Composite parent, int style) {
super(parent, style);
- kdataManager = KernelDataManager.getInstance();
setTitle(AnalyzerLabels.COOLBAR_AREA_KERNEL);
- this.setData(DAPageComposite.KEY_TOOLTIP,
- ShortCutManager.COOLBAR_AREA_KERNEL_TOOLTIP);
+ this.setData(DAPageComposite.KEY_TOOLTIP, ShortCutManager.COOLBAR_AREA_KERNEL_TOOLTIP);
this.setLayout(new FillLayout());
baseForm = new SashForm(this, SWT.HORIZONTAL);
baseForm.setLayout(new FillLayout());
leftForm = new SashForm(baseForm, SWT.VERTICAL);
- ContextSwitchingChartView kernelChartView = new ContextSwitchingChartView(
- leftForm, SWT.NONE);
+ ContextSwitchingChartView kernelChartView = new ContextSwitchingChartView(leftForm,
+ SWT.NONE);
addView(kernelChartView);
- DATabComposite lefttabView = new DATabComposite(leftForm,
- SWT.NONE, false);
+ DATabComposite lefttabView = new DATabComposite(leftForm, SWT.NONE, false);
addView(callflowTabID, lefttabView);
{
CallFlowChartView callflowView = new CallFlowChartView(
lefttabView.getContentComposite(), SWT.NONE);
lefttabView.addView(callflowView, false);
- KernelListView kernelListView = new KernelListView(
- lefttabView.getContentComposite(), SWT.NONE);
+ KernelListView kernelListView = new KernelListView(lefttabView.getContentComposite(),
+ SWT.NONE);
lefttabView.addView(kernelListView, false);
}
leftForm.setWeights(new int[] { 60, 40 });
rightForm = new SashForm(baseForm, SWT.VERTICAL);
- ScreenshotTabComposite tabView = new ScreenshotTabComposite(rightForm,
- SWT.NONE, KernelPage.pageID);
+ ScreenshotTabComposite tabView = new ScreenshotTabComposite(rightForm, SWT.NONE,
+ KernelPage.pageID);
tabView.setObservingViews(ScreenshotTabComposite.screenshotViewID,
new String[] { KernelPage.listViewID });
tabView.setObservingViews(ScreenshotTabComposite.callstackViewID,
new String[] { KernelPage.listViewID });
addView(tabView);
- KernelStatisticInfoView statInfo = new KernelStatisticInfoView(
- rightForm, SWT.NONE);
+ KernelStatisticInfoView statInfo = new KernelStatisticInfoView(rightForm, SWT.NONE);
addView(statInfo);
rightForm.setWeights(new int[] { 50, 50 });
baseForm.setWeights(new int[] { 75, 25 });
-
- DataManagerRegistry.registerPageDataManager(kdataManager);
+
+ DataManagerRegistry.registerPageDataManager(KernelDataManager.getInstance());
}
@Override
@Override
public void clear() {
super.clear();
- if (kdataManager != null)
- kdataManager.clear();
+ KernelDataManager.getInstance().clear();
}
}
// 'threads' may be necessary to synchronize but i didn't
// because i think that it does not make critical error
- private ArrayList<KernelDataPerThread> threads;
+ private List<KernelDataPerThread> threads;
- private ArrayList<List<Object>> contextDataList;
- private ArrayList<List<Object>> functionDataList;
private DBInserter contextDBInserter = null;
private DBInserter functionDBInserter = null;
public KernelDataMaker(DBInserter cDBInserter, DBInserter fDBInserter) {
threads = new ArrayList<KernelDataPerThread>();
- contextDataList = new ArrayList<List<Object>>();
- functionDataList = new ArrayList<List<Object>>();
-
contextDBInserter = cDBInserter;
functionDBInserter = fDBInserter;
}
Stack<ProfileData> prefunc;
Stack<Integer> prefunc_type;
+ List<List<Object>> contextDataList = new ArrayList<List<Object>>();
+ List<List<Object>> functionDataList = new ArrayList<List<Object>>();
+
int size = inputs.size();
for (int i = 0; i < size; i++) {
LogData input = (LogData) inputs.get(i);
}
}
- @SuppressWarnings("unchecked")
- List<List<Object>> clist = (List<List<Object>>) contextDataList.clone();
- contextDataList.clear();
-
- @SuppressWarnings("unchecked")
- List<List<Object>> flist = (List<List<Object>>) functionDataList.clone();
- functionDataList.clear();
+ if (!contextDataList.isEmpty()) {
+ contextDBInserter.pushData(contextDataList);
+ }
- contextDBInserter.pushData(clist);
- functionDBInserter.pushData(flist);
+ if (!functionDataList.isEmpty()) {
+ functionDBInserter.pushData(functionDataList);
+ }
}
public void clear() {
threads.clear();
- contextDataList.clear();
- functionDataList.clear();
}
public List<List<Object>> getContextDataFromDB(long start, long end) {
@Override
public void clear() {
networkChartBoard.clear();
- NetworkDataManager.getInstance().clear();
}
@Override
baseForm.setWeights(new int[] { 100 - wrate, wrate });
rightForm.setWeights(new int[] { hrate, 100 - hrate });
}
+
+ @Override
+ public void clear() {
+ super.clear();
+
+ NetworkDataManager.getInstance().clear();
+ }
}
}
public void saveData(Map<String, String> dataMap) {
- stopProcess();
- }
-
- public void openData(Map<String, String> dataMap) {
- openProcess();
- }
-
- public void openProcess() {
- // set series list from DB
- if (null == seriesList) {
- return;
- }
- if (seriesList.size() == 0) {
- seriesList = seriesDBManager.select(0, MAX_CHART_TIME);
- }
- }
-
- public void stopProcess() {
if (null == seriesList || null == seriesDBManager) {
return;
}
}
}
- @Override
- protected void onThreadStop() {
+ public void openData(Map<String, String> dataMap) {
+ // set series list from DB
+ if (null == seriesList) {
+ return;
+ }
+ if (seriesList.size() == 0) {
+ seriesList = seriesDBManager.select(0, MAX_CHART_TIME);
+ }
}
public List<NetworkSeriesType> getSeriesList() {
}
public void saveData(Map<String, String> dataMap) {
- stopProcess();
+ if (null != stateDataManager) {
+ stateProgramDBTable.insertProgramData();
+ stateTextureDBTable.insertTextureData();
+ statisticsDataManger.insertRedundantData();
+ }
}
public void openData(Map<String, String> dataMap) {
- openProcess();
- }
-
- public void openProcess() {
if (null != stateDataManager) {
updateFrameTimeChartEndTimeAtOpen();
stateProgramDBTable.initProgramDataAtOpen();
}
}
- public void stopProcess() {
- if (null != stateDataManager) {
- stateProgramDBTable.insertProgramData();
- stateTextureDBTable.insertTextureData();
- statisticsDataManger.insertRedundantData();
- }
- }
-
- @Override
- protected void onThreadStop() {
-
- }
-
@Override
protected void makeData(LogPackage pack) {
Logs glesLogs = pack.getLogs(DataChannelConstants.MSG_PROBE_GLES20);
leakDataMaker = new LeakDataMaker(makeInserter(memoryAllocationDataTable),
makeInserter(freeDataTable));
- failedApiDataMaker = new FailedApiDataMaker(
- makeInserter(failedApiDataTable));
+ failedApiDataMaker = new FailedApiDataMaker(makeInserter(failedApiDataTable));
warningDataMaker = new WarningDataMaker(warningDataDBTable);
}
public void clear() {
leakDataMaker.clear();
+ failedApiDataMaker.clear();
warningDataMaker.clear();
}
CurrentLeakData newLeakData = new CurrentLeakData(seqNum, allocValue, pid);
leakDetector.addCurrentLeakData(newLeakData);
}
-
+
warningDataMaker.selectDBWhenOpen();
}
}
public static final String pageID = SummaryPage.class.getName();
public static final String failedViewID = FailedApiListView.class.getName();
public static final String leakViewID = LeakView.class.getName();
- public static final String profilingViewID = FunctionUsageProfilingView.class
- .getName();
- public static final String warningListViewID = WarningListView.class
- .getName();
- public static final String warningDetailViewID = WarningDetailView.class
- .getName();
+ public static final String profilingViewID = FunctionUsageProfilingView.class.getName();
+ public static final String warningListViewID = WarningListView.class.getName();
+ public static final String warningDetailViewID = WarningDetailView.class.getName();
public final static int FAILED_APILIST_VIEW_INDEX = 0;
public final static int LEAK_VIEW_INDEX = 1;
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;
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);
+ this.setData(DAPageComposite.KEY_TOOLTIP, ShortCutManager.COOLBAR_AREA_SUMMARY_TOOLTIP);
this.setLayout(new FillLayout());
baseForm = new SashForm(this, SWT.VERTICAL);
upperForm = new SashForm(baseForm, SWT.HORIZONTAL);
// FAILED_APILIST_VIEW_INDEX = 0;
- FailedApiListView failedApiListView = new FailedApiListView(upperForm,
- SWT.NONE);
+ FailedApiListView failedApiListView = new FailedApiListView(upperForm, SWT.NONE);
addView(failedApiListView);
// LEAK_VIEW_INDEX = 1;
addView(leakView);
// INFO_VIEW_INDEX = 2;
- ScreenshotTabComposite tabView = new ScreenshotTabComposite(upperForm,
- SWT.NONE, SummaryPage.pageID);
- tabView.setObservingViews(ScreenshotTabComposite.screenshotViewID,
- new String[] { SummaryPage.failedViewID,
- SummaryPage.leakViewID, SummaryPage.warningListViewID });
- tabView.setObservingViews(ScreenshotTabComposite.callstackViewID,
- new String[] { SummaryPage.failedViewID,
- SummaryPage.leakViewID, SummaryPage.warningListViewID });
+ ScreenshotTabComposite tabView = new ScreenshotTabComposite(upperForm, SWT.NONE,
+ SummaryPage.pageID);
+ tabView.setObservingViews(ScreenshotTabComposite.screenshotViewID, new String[] {
+ SummaryPage.failedViewID, SummaryPage.leakViewID, SummaryPage.warningListViewID });
+ tabView.setObservingViews(ScreenshotTabComposite.callstackViewID, new String[] {
+ SummaryPage.failedViewID, SummaryPage.leakViewID, SummaryPage.warningListViewID });
addView(tabView);
upperForm.setWeights(new int[] { 37, 40, 23 });
bottomForm.setWeights(new int[] { 70, 30 });
// WARNING_VIEW_INDEX = 4;
- WarningListView warningListView = new WarningListView(warningForm,
- SWT.NONE);
+ WarningListView warningListView = new WarningListView(warningForm, SWT.NONE);
addView(warningListView);
// WARNING_VIEW_DETAIL_INDEX = 5;
- WarningDetailView warningDetailView = new WarningDetailView(
- warningForm, SWT.NONE);
+ WarningDetailView warningDetailView = new WarningDetailView(warningForm, SWT.NONE);
addView(warningDetailView);
warningForm.setWeights(new int[] { 70, 30 });
upperForm.setSashWidth(AnalyzerConstants.SASH_WIDTH);
warningForm.setSashWidth(AnalyzerConstants.SASH_WIDTH);
- DataManagerRegistry.registerPageDataManager(FunctionUsageProfiler
- .getInstance());
- DataManagerRegistry.registerPageDataManager(summaryDataManager);
+ DataManagerRegistry.registerPageDataManager(FunctionUsageProfiler.getInstance());
+ DataManagerRegistry.registerPageDataManager(SummaryDataManager.getInstance());
}
@Override
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();
+
+ FunctionUsageProfiler.getInstance().clear();
+ SummaryDataManager.getInstance().clear();
}
}
public class FailedApiDataMaker {
private static final String query_withTime = "where %s >= %s and %s <= %s order by %s";
-
- private ArrayList<List<Object>> failedApiDataList;
-
+
private DBInserter failedAPI_DBInserter = null;
-
+
public FailedApiDataMaker(DBInserter inserter) {
- failedApiDataList = new ArrayList<List<Object>>();
failedAPI_DBInserter = inserter;
}
-
+
public void makeData(List<LogData> inputs) {
+ List<List<Object>> failedApiDataList = new ArrayList<List<Object>>();
+
int size = inputs.size();
for (int i = 0; i < size; i++) {
LogData input = (LogData) inputs.get(i);
ProbeCommonData pData = (ProbeCommonData) input;
-
+
if (failChecker(pData)) {
ArrayList<Object> dbFailedData = new ArrayList<Object>();
-
+
dbFailedData.add(Long.valueOf(pData.getSeq()));
dbFailedData.add(Integer.valueOf(pData.getApiId()));
dbFailedData.add(Integer.valueOf(pData.getPid()));
dbFailedData.add(Long.valueOf(pData.getCallerPcAddr()));
dbFailedData.add(String.valueOf(pData.getLibName()));
dbFailedData.add(Integer.valueOf(pData.getMsgID()));
-
+
failedApiDataList.add(dbFailedData);
}
}
-
+
if (failedApiDataList.size() > 0) {
- @SuppressWarnings("unchecked")
- List<List<Object>> fList = (List<List<Object>>) failedApiDataList.clone();
- failedApiDataList.clear();
-
- failedAPI_DBInserter.pushData(fList);
+ failedAPI_DBInserter.pushData(failedApiDataList);
}
}
-
+
public void makeData(LogData input) {
ProbeCommonData pData = (ProbeCommonData) input;
-
+
if (failChecker(pData)) {
- ArrayList<Object> dbFailedData = new ArrayList<Object>();
-
+ List<List<Object>> failedApiDataList = new ArrayList<List<Object>>();
+ List<Object> dbFailedData = new ArrayList<Object>();
+
dbFailedData.add(Long.valueOf(pData.getSeq()));
dbFailedData.add(Integer.valueOf(pData.getApiId()));
dbFailedData.add(Integer.valueOf(pData.getPid()));
dbFailedData.add(Long.valueOf(pData.getCallerPcAddr()));
dbFailedData.add(String.valueOf(pData.getLibName()));
dbFailedData.add(Integer.valueOf(pData.getMsgID()));
-
+
failedApiDataList.add(dbFailedData);
-
- @SuppressWarnings("unchecked")
- List<List<Object>> mList = (List<List<Object>>) failedApiDataList.clone();
- failedApiDataList.clear();
-
- failedAPI_DBInserter.pushData(mList);
+
+ failedAPI_DBInserter.pushData(failedApiDataList);
}
}
-
+
private boolean failChecker(ProbeCommonData log) {
if (log.isInternal()) {
return false;
return true;
}
}
-
+
public void clear() {
- failedApiDataList.clear();
+ // do nothing
}
-
+
public List<List<Object>> getFailedApiDataFromDB() {
DBTable table = SummaryDataManager.getInstance().getFailedApiDataDBTable();
List<String> columns = new ArrayList<String>();
columns.add(FailedApiDataDBTable.CALLER_PC_ADDRESS);
columns.add(FailedApiDataDBTable.CALLER_LIBRARY_NAME);
columns.add(FailedApiDataDBTable.MESSAGE_ID);
-
+
return table.selectData(columns, null, new IResultSet() {
@Override
public List<Object> extractDataFromResultSet(ResultSet rs) {
Logger.exception(e);
return null;
}
-
+
return row;
}
});
}
-
+
public List<List<Object>> getFailedApiDataFromDBForRange(Long startTime, Long endTime) {
String where = String.format(query_withTime, FailedApiDataDBTable.START_TIME,
- startTime.toString(), FailedApiDataDBTable.START_TIME,
- endTime.toString(), FailedApiDataDBTable.START_TIME);
+ startTime.toString(), FailedApiDataDBTable.START_TIME, endTime.toString(),
+ FailedApiDataDBTable.START_TIME);
DBTable table = SummaryDataManager.getInstance().getFailedApiDataDBTable();
List<String> columns = new ArrayList<String>();
columns.add(FailedApiDataDBTable.SEQUENCE_NUMBER);
columns.add(FailedApiDataDBTable.CALLER_PC_ADDRESS);
columns.add(FailedApiDataDBTable.CALLER_LIBRARY_NAME);
columns.add(FailedApiDataDBTable.MESSAGE_ID);
-
+
return table.selectData(columns, where, new IResultSet() {
@Override
public List<Object> extractDataFromResultSet(ResultSet rs) {
Logger.exception(e);
return null;
}
-
+
return row;
}
});
private ArrayList<List<Object>> memoryAllocDataList;
private ArrayList<List<Object>> freeDataList;
- private ArrayList<List<Object>> leakDataList;
private List<List<Object>> rangeDataList;
private NewLeakDetector leakDetector = AnalyzerManager.getNewLeakDetector();
-
+
private DBInserter allocDBInserter = null;
private DBInserter freeDBInserter = null;
public LeakDataMaker(DBInserter alloc_inserter, DBInserter free_inserter) {
memoryAllocDataList = new ArrayList<List<Object>>();
freeDataList = new ArrayList<List<Object>>();
- leakDataList = new ArrayList<List<Object>>();
rangeDataList = new ArrayList<List<Object>>();
-
+
allocDBInserter = alloc_inserter;
freeDBInserter = free_inserter;
}
int size = inputs.size();
for (int i = 0; i < size; i++) {
LogData input = (LogData) inputs.get(i);
- if (input == null) continue;
- if (isHeapMemoryOverflow()) break;
+ if (input == null)
+ continue;
+ if (isHeapMemoryOverflow())
+ break;
switch (leakDetector.runLeakDetect(input)) {
case LogCenterConstants.MEMORY_API_ALLOC: // alloc, realloc
makeAllocData(input);
public void makeData() {
Map<Integer, CurrentLeakData> leaks = leakDetector.getLeakHash();
+ List<List<Object>> leakDataList = new ArrayList<List<Object>>();
+
for (Integer key : leaks.keySet()) {
- makeLeakData(leaks.get(key));
+ CurrentLeakData input = leaks.get(key);
+ if (input == null) {
+ continue;
+ }
+
+ List<Object> dbLeakData = new ArrayList<Object>();
+ dbLeakData.add(Long.valueOf(input.getSequenceNumber()));
+ dbLeakData.add(Long.valueOf(input.getAllocatedValue()));
+ dbLeakData.add(Integer.valueOf(input.getPid()));
+
+ leakDataList.add(dbLeakData);
}
if (leakDataList.size() > 0) {
- @SuppressWarnings("unchecked")
- List<List<Object>> lList = (List<List<Object>>) leakDataList.clone();
- leakDataList.clear();
-
- SummaryDataManager.getInstance().getLeakDataDBTable().insertData(lList);
+ SummaryDataManager.getInstance().getLeakDataDBTable().insertData(leakDataList);
}
}
freeDataList.add(dbFreeData);
}
- public void makeLeakData(CurrentLeakData input) {
- ArrayList<Object> dbLeakData = new ArrayList<Object>();
-
- if (input == null)
- return;
- dbLeakData.add(Long.valueOf(input.getSequenceNumber()));
- dbLeakData.add(Long.valueOf(input.getAllocatedValue()));
- dbLeakData.add(Integer.valueOf(input.getPid()));
-
- leakDataList.add(dbLeakData);
- }
-
public void clear() {
memoryAllocDataList.clear();
freeDataList.clear();
private static FunctionUsageProfiler instance = null;
private boolean isSetSamplePeriod = false;
-
+
private ProfilingDataDBTable profilingDataTable = null;
private ProfilingChildDataDBTable profilingChildDataTable = null;
private FunctionSampleDBTable functionSampleTable = null;
-
+
private HashMap<Integer, ProfileDataMaker> profileDataMakerMap = null;
-
+
private long lastSampleSeq = -1;
private Object sampleSeqLock = new Object();
-
+
public void setLastSampleSeq(long seq) {
- synchronized(sampleSeqLock) {
+ synchronized (sampleSeqLock) {
lastSampleSeq = seq;
}
}
-
+
public long getLastSampleSeq() {
- synchronized(sampleSeqLock) {
+ synchronized (sampleSeqLock) {
return lastSampleSeq;
}
}
profilingChildDataTable = new ProfilingChildDataDBTable();
functionSampleTable = new FunctionSampleDBTable();
}
-
+
public ProfilingDataDBTable getProfilingDataTable() {
return profilingDataTable;
}
-
+
public ProfilingChildDataDBTable getProfilingChildDataTable() {
return profilingChildDataTable;
}
-
+
public FunctionSampleDBTable getFunctionSampleTable() {
return functionSampleTable;
- }
-
+ }
+
/**
- * key: symbol(child) or file path (parent) - value : ID of
- * profiling data. all parent and child data is in
+ * key: symbol(child) or file path (parent) - value : ID of profiling data. all parent and child
+ * data is in
*/
public List<Integer> getPidsOfProfileDataMakerMap() {
public ProfileDataMaker getProfileDataMakerByPid(int pid) {
ProfileDataMaker profileDataMaker = getProfileDataMakerMap().get(pid);
if (null == profileDataMaker) {
- profileDataMaker = new ProfileDataMaker(
- AnalyzerManager.getCallstackManager());
+ profileDataMaker = new ProfileDataMaker(AnalyzerManager.getCallstackManager());
profileDataMaker.setPid(pid);
getProfileDataMakerMap().put(pid, profileDataMaker);
}
}
public void clear() {
+ lastSampleSeq = -1;
isSetSamplePeriod = false;
if (profileDataMakerMap != null) {
- profileDataMakerMap.clear();
+ profileDataMakerMap.clear();
}
}
-
+
public void saveProfilingData() {
List<Integer> pids = getPidsOfProfileDataMakerMap();
int size = pids.size();
for (int i = 0; i < size; i++) {
ProfileDataMaker profiler = getProfileDataMakerByPid(pids.get(i));
- Map<Integer, ProfilingData> profilingDataMap = profiler
- .getProfilingDataMap();
+ Map<Integer, ProfilingData> profilingDataMap = profiler.getProfilingDataMap();
List<ProfilingData> pDataList = new ArrayList<ProfilingData>();
pDataList.addAll(profilingDataMap.values());
for (int j = 0; j < count; j++) {
List<Object> insertRowData = new ArrayList<Object>();
ProfilingData pData = pDataList.get(j);
-
- try {
+
+ try {
insertRowData.add(new Integer(pData.getProfilingDataID()));
String key = pData.getKey();
byte type;
.getBinaryInfo(pData.getName());
insertRowData.add(new Integer(binInfo.getID()));
} else { // function
- insertRowData.add(new Integer(pData.getFunctionId()));
+ insertRowData.add(new Integer(pData.getFunctionId()));
insertRowData.add(new Integer(-1)); // -1 for null library path
}
insertRowData.add(new Integer(pids.get(i)));
insertRowData.add(new Integer(pData.getInCount()));
insertRowData.add(new Integer(pData.getCallCount()));
insertRowData.add(new Long(pData.getElapsedTime()));
- insertRowData.add(new Long(pData.getExclusiveElapsedTime()));
+ insertRowData.add(new Long(pData.getExclusiveElapsedTime()));
} catch (ArrayIndexOutOfBoundsException e) {
Logger.exception(e);
- }
+ }
insertData.add(insertRowData);
}
if (insertData.size() > 0) {
int size = pids.size();
for (int i = 0; i < size; i++) {
ProfileDataMaker profiler = getProfileDataMakerByPid(pids.get(i));
- Map<String, ProfilingChildData> profilingDataMap = profiler
- .getChildListMap();
+ Map<String, ProfilingChildData> profilingDataMap = profiler.getChildListMap();
List<ProfilingChildData> pDataList = new ArrayList<ProfilingChildData>();
pDataList.addAll(profilingDataMap.values());
ProfilingChildData data = pDataList.get(j);
List<Integer> childList = data.getChildren();
try {
- List<Object> insertRowData = new ArrayList<Object>();
+ List<Object> insertRowData = new ArrayList<Object>();
insertRowData.add(Integer.valueOf(data.getProfilingDataID()));
insertRowData.add(new Integer(data.getPid()));
insertRowData.add(childList);
@Override
protected void makeData(LogPackage pack) {
TargetData target = SettingDataManager.getInstance().getConnectedTarget();
-
+
// TODO: will get sample_time from Project.java
if (!isSetSamplePeriod) {
- SAMPLE_TIME = target.getSelectedFeatureValue(
- SettingConstants.FEATURE_NAME_INDEX_FUNCTION_PROFILING_SAMPLING_RATE);
+ SAMPLE_TIME = target
+ .getSelectedFeatureValue(SettingConstants.FEATURE_NAME_INDEX_FUNCTION_PROFILING_SAMPLING_RATE);
if (SAMPLE_TIME < 0) {
- SAMPLE_TIME = SettingDataManager.getInstance().getFeatureData(
- SettingConstants.FEATURE_NAME_INDEX_FUNCTION_PROFILING_SAMPLING_RATE).getDefaultValue();
+ SAMPLE_TIME = SettingDataManager
+ .getInstance()
+ .getFeatureData(
+ SettingConstants.FEATURE_NAME_INDEX_FUNCTION_PROFILING_SAMPLING_RATE)
+ .getDefaultValue();
}
}
if (target.isSelectedFeature(SettingConstants.FEATURE_NAME_INDEX_FUNCTION_SAMPLING)) {
-
+
Logs logs = pack.getLogs(DataChannelConstants.MSG_DATA_SAMPLE);
if (null != logs && logs.getRawLogs().size() != 0) {
- List<List<Object>> insertData = new ArrayList<List<Object>>();
+ List<List<Object>> insertData = new ArrayList<List<Object>>();
List<LogData> sample = logs.getLogs();
int size = sample.size();
for (int i = 0; i < size; i++) {
List<Object> insertRowData = new ArrayList<Object>();
ProfileData sampleLog = (ProfileData) sample.get(i);
- getInstance().getProfileDataMakerByPid(
- sample.get(i).getPid())
+ getInstance().getProfileDataMakerByPid(sample.get(i).getPid())
.makeFunctionUsageProfileData(sampleLog);
// set LastSampleSeq
- NavigableMap<Long, Long> seqByTimeMap =
- AnalyzerManager.getCallstackManager()
+ NavigableMap<Long, Long> seqByTimeMap = AnalyzerManager.getCallstackManager()
.getSeqTimeByTidMap(sampleLog.getTid());
- // find the time of callstackdata which was made
+ // find the time of callstackdata which was made
// right before the current sample time
- // callstackdatas made before that time is needless
- Long lastTime = seqByTimeMap
- .floorKey(sampleLog.getTime());
+ // callstackdatas made before that time is needless
+ Long lastTime = seqByTimeMap.floorKey(sampleLog.getTime());
if (lastTime != null) {
Long lastSeq = seqByTimeMap.get(lastTime);
setLastSampleSeq(lastSeq);
baseForm.setWeights(new int[] { 100 - wrate, wrate });
rightForm.setWeights(new int[] { hrate, 100 - hrate });
}
+
+ @Override
+ public void clear() {
+ super.clear();
+
+ ThreadDataManager.getInstance().clear();
+ }
}
import org.tizen.dynamicanalyzer.ui.common.UICommonConstants;
import org.tizen.dynamicanalyzer.ui.range.RangeDataManager;
import org.tizen.dynamicanalyzer.ui.thread.ThreadPage;
-import org.tizen.dynamicanalyzer.ui.thread.data.ThreadDataManager;
import org.tizen.dynamicanalyzer.ui.thread.type.ThreadPageThreadData;
import org.tizen.dynamicanalyzer.ui.timeline.common.TimelineConstants;
import org.tizen.dynamicanalyzer.ui.timeline.logparser.LifecycleLogParser;
@Override
public void clear() {
- ThreadDataManager.getInstance().clear();
syncChartBoard.contentsClear();
syncChartBoard.clear();
threadChartBoard.contentsClear();
}
public void clear() {
+ loadManager.clear();
tManager.clear();
sManager.clear();
}
}
ThreadDataManager.getInstance().insertThreadEventData(insertThreadEventList, true);
}
+
+ public void clear() {
+ // do nothing
+ }
}
public TimelinePage(Composite parent, int style) {
super(parent, style);
setTitle(AnalyzerLabels.COOLBAR_AREA_TIMELINE);
- this.setData(DAPageComposite.KEY_TOOLTIP,
- ShortCutManager.COOLBAR_AREA_TIMELINE_TOOLTIP);
+ this.setData(DAPageComposite.KEY_TOOLTIP, ShortCutManager.COOLBAR_AREA_TIMELINE_TOOLTIP);
this.setLayout(new FillLayout());
leftForm = new SashForm(this, SWT.HORIZONTAL);
rightForm = new SashForm(leftForm, SWT.VERTICAL);
// index 1 : INFO_INDEX
- ScreenshotTabComposite tabView = new ScreenshotTabComposite(rightForm,
- SWT.NONE, TimelinePage.pageID);
+ ScreenshotTabComposite tabView = new ScreenshotTabComposite(rightForm, SWT.NONE,
+ TimelinePage.pageID);
tabView.setObservingViews(ScreenshotTabComposite.screenshotViewID,
new String[] { TimelinePage.timelineViewID });
tabView.setObservingViews(ScreenshotTabComposite.callstackViewID,
leftForm.setSashWidth(AnalyzerConstants.SASH_WIDTH);
rightForm.setSashWidth(AnalyzerConstants.SASH_WIDTH);
-
- TimelineChartManager.getInstance().clear();
+
DataManagerRegistry.registerPageDataManager(TimelineChartManager.getInstance());
DataManagerRegistry.registerPageDataManager(ReplayDataManager.getInstance());
- DataManagerRegistry.registerPageDataManager(CallTraceDataManager.getInstance());
+ DataManagerRegistry.registerPageDataManager(CallTraceDataManager.getInstance());
}
@Override
leftForm.setWeights(new int[] { 100 - wrate, wrate });
rightForm.setWeights(new int[] { hrate, 100 - hrate });
}
+
+ @Override
+ public void clear() {
+ super.clear();
+
+ // clear data managers
+ TimelineChartManager.getInstance().clear();
+ ReplayDataManager.getInstance().clear();
+ CallTraceDataManager.getInstance().clear();
+ }
}
public void clear() {
chartBoard.contentsClear();
chartBoard.clear();
- timelineChartManager.clear();
- // SnapshotData.getInstance().clear();
initializeCharts();
}
}
public void clear() {
- if(null != instance)
- {
- instance = null;
- }
- replayDBManager = null;
rid = 0;
}
int dataRowSize = inputs.size();
for (int i = 0; i < dataRowSize; i++) {
ReplayData replayData = (ReplayData) inputs.get(i);
- List<RecordEventObject> events = replayData
- .getRecordEvent();
+ List<RecordEventObject> events = replayData.getRecordEvent();
for (int ii = 0; ii < replayData.getObjectCount(); ii++) {
RecordEventObject reo = events.get(ii);
List<Object> insertObject = new ArrayList<Object>();
public class UIPage extends DAPageComposite {
public static final String pageID = UIPage.class.getName();
- public static final String controlListViewID = UIControlListView.class
- .getName();
- public static final String sceneListViewID = UISceneListView.class
- .getName();
- public static final String profilingViewID = UIFunctionProfilingView.class
- .getName();
+ public static final String controlListViewID = UIControlListView.class.getName();
+ public static final String sceneListViewID = UISceneListView.class.getName();
+ public static final String profilingViewID = UIFunctionProfilingView.class.getName();
SashForm baseForm;
SashForm upperForm;
public UIPage(Composite parent, int style) {
super(parent, style);
setTitle(AnalyzerLabels.COOLBAR_AREA_UI);
- this.setData(DAPageComposite.KEY_TOOLTIP,
- ShortCutManager.COOLBAR_AREA_UI_TOOLTIP);
+ this.setData(DAPageComposite.KEY_TOOLTIP, ShortCutManager.COOLBAR_AREA_UI_TOOLTIP);
this.setLayout(new FillLayout());
baseForm = new SashForm(this, SWT.VERTICAL);
baseForm.setLayout(new FillLayout());
upperForm = new SashForm(baseForm, SWT.HORIZONTAL);
- UIControlListView topLeftFirst = new UIControlListView(upperForm,
- SWT.NONE);
+ UIControlListView topLeftFirst = new UIControlListView(upperForm, SWT.NONE);
addView(topLeftFirst);
- UISceneListView topLeftSencond = new UISceneListView(upperForm,
- SWT.NONE);
+ UISceneListView topLeftSencond = new UISceneListView(upperForm, SWT.NONE);
addView(topLeftSencond);
- ScreenshotTabComposite tabView = new ScreenshotTabComposite(upperForm,
- SWT.NONE, UIPage.pageID);
- tabView.setObservingViews(
- ScreenshotTabComposite.screenshotViewID,
- new String[] { UIPage.sceneListViewID, UIPage.controlListViewID });
- tabView.setObservingViews(
- ScreenshotTabComposite.callstackViewID,
- new String[] { UIPage.sceneListViewID, UIPage.controlListViewID });
+ ScreenshotTabComposite tabView = new ScreenshotTabComposite(upperForm, SWT.NONE,
+ UIPage.pageID);
+ tabView.setObservingViews(ScreenshotTabComposite.screenshotViewID, new String[] {
+ UIPage.sceneListViewID, UIPage.controlListViewID });
+ tabView.setObservingViews(ScreenshotTabComposite.callstackViewID, new String[] {
+ UIPage.sceneListViewID, UIPage.controlListViewID });
addView(tabView);
upperForm.setWeights(new int[] { 37, 40, 23 });
bottomForm = new SashForm(baseForm, SWT.HORIZONTAL);
- UIFunctionProfilingView bottomLeftFirst = new UIFunctionProfilingView(
- bottomForm, SWT.NONE);
+ UIFunctionProfilingView bottomLeftFirst = new UIFunctionProfilingView(bottomForm, SWT.NONE);
addView(bottomLeftFirst);
bottomForm.setWeights(new int[] { 100 });
upperForm.setSashWidth(AnalyzerConstants.SASH_WIDTH);
bottomForm.setSashWidth(AnalyzerConstants.SASH_WIDTH);
- DataManagerRegistry
- .registerPageDataManager(UIDataManager.getInstance());
+ DataManagerRegistry.registerPageDataManager(UIDataManager.getInstance());
}
@Override
baseForm.setWeights(new int[] { hrate, 100 - hrate });
}
+ @Override
+ public void clear() {
+ super.clear();
+ UIDataManager.getInstance().clear();
+ }
}
\ No newline at end of file
@Override
public void clear() {
treeComp.clear();
- UIDataManager.getInstance().clear();
}
@Override