private static int imageListSize = 0;
private static LeakDetector leakDetector = null;
private static FailedChecker failedChecker = null;
+ private static FailedChecker calledChecker = null;
+
private static FunctionUsageProfiler functionUserProfiler = null;
private static Thread stopLogProcessThread = null;
private static Thread startStopThread = null;
leakDetector = null;
failedChecker = null;
+ calledChecker = null;
functionUserProfiler = null;
StopLogProcessThread.count = 0;
stopLogProcessThread = null;
}
return failedChecker;
}
+
+ public static FailedChecker getCalledFunctionChecker() {
+ if (null == calledChecker) {
+ calledChecker = new FailedChecker();
+ }
+ return calledChecker;
+ }
+
public static FunctionUsageProfiler getFunctionUserProfiler() {
if (null == functionUserProfiler) {
private List<FileChartItemData> children = null;
private List<FileChartData> data = null;
private List<FailedData> failedData = null;
+ private List<FailedData> calledFunctionData = null;
private boolean closed = false;
private String parentKey = null;
return null;
}
+ public List<FailedData> getCalledFunctionData() {
+ if (null == calledFunctionData) {
+ calledFunctionData = new ArrayList<FailedData>();
+ }
+ return calledFunctionData;
+ }
+
public List<FailedData> getFailedData() {
if (null == failedData) {
failedData = new ArrayList<FailedData>();
return output;
}
+ public List<String> getCalledFunctionRelations() {
+ List<String> output = new ArrayList<String>();
+ int size = getCalledFunctionData().size();
+ for (int i = 0; i < size; i++) {
+ FailedData ffd = calledFunctionData.get(i);
+ String seq = ffd.getLogData(LogCenterConstants.SEQUENCE_NUMBER_INDEX);
+ output.add(seq);
+ }
+ return output;
+ }
+
public boolean isAllChildrenClosed() {
if (!hasChild()) {
return false;
failedRect.width, failedRect.height, true);
}
}
+
+ List<FailedData> fileCalledFunctionList = data.getCalledFunctionData();
+ size = fileCalledFunctionList.size();
+ startTime = start;
+ x = rect.x + FileChartManager.FILE_CHART_START_MARGIN;
+ y = (rect.y + 7);
+ for (int i = 0; i < size; i++) {
+ int fx = x;
+ int fy = y;
+ int fWidth = 1;
+ int height = rect.height - 14;
+
+ FailedData ffd = fileCalledFunctionList.get(i);
+ long time = Long.parseLong(ffd.getLogData(LogCenterConstants.TIME_INDEX));
+
+ if (startTime < time && time < end) {
+ fx += AnalyzerUtil.getWidth(time - startTime);
+
+ System.out.print("fx["+fx+"] fy ["+fy+"] cWidth["+fWidth+"] height ["+height+"]\n");
+
+ Rectangle failedRect = new Rectangle(fx, fy, fWidth, height);
+ gc.setForeground(ColorResources.ITEM_BLUE_BRIGHT);
+ gc.setBackground(ColorResources.ITEM_BLUE_DARK);
+ gc.fillGradientRectangle(failedRect.x, failedRect.y,failedRect.width, failedRect.height, true);
+ }
+ }
+
}
private int getToggleIndent(GridItem item) {
// read / write
} else if (fdApiType.equals(LogCenterConstants.FD_API_TYPE_READ)
|| fdApiType.equals(LogCenterConstants.FD_API_TYPE_WRITE)) {
+
+
+ // Print Called Function On File Chart Except( Open, ᅟClose, Error )
+ FailedData ffd = new FailedData(input);
+ FileChartItemData fcid = getFDRegister().get(fd);
+ if (null == fcid) {
+ System.out.print("ERROR - parentFailed 1\n");
+ ffd = null;
+ continue;
+ }
+ path = fcid.getParentKey();
+ if (path.isEmpty()) {
+ System.out.print("ERROR - parentFailed 2\n");
+ System.out.println();
+ }
+ fcid.getCalledFunctionData().add(ffd);
+
+ FileChartItemData parentCalled = getFileRegister().get(path);
+ if (null == parentCalled) {
+ System.out.print("ERROR - parentFailed 3\n");
+ parentCalled = createNewFileData(path);
+ }
+ parentCalled.getCalledFunctionData().add(ffd);
+ AnalyzerManager.getCalledFunctionChecker().getFailedList().add(ffd);
+
+
long time = Long.parseLong(input
.get(LogCenterConstants.TIME_INDEX));
FileChartItemData child = getFDRegister().get(fd);
System.out.println("why"); //$NON-NLS-1$
e.printStackTrace();
}
- } else if (fdApiType.equals(LogCenterConstants.FD_API_TYPE_OTHERS)) {
- // FIXME :
- // System.out.println("file util api later added....");
+ } else{
+ // Print Called Function On File Chart Except( Open, ᅟClose, Error )
+ FailedData ffd = new FailedData(input);
+ FileChartItemData fcid = getFDRegister().get(fd);
+ if (null == fcid) {
+ System.out.print("ERROR - parentFailed 1\n");
+ ffd = null;
+ continue;
+ }
+ path = fcid.getParentKey();
+ if (path.isEmpty()) {
+ System.out.print("ERROR - parentFailed 2\n");
+ System.out.println();
+ }
+ fcid.getCalledFunctionData().add(ffd);
+
+ FileChartItemData parentCalled = getFileRegister().get(path);
+ if (null == parentCalled) {
+ System.out.print("ERROR - parentFailed 3\n");
+ parentCalled = createNewFileData(path);
+ }
+ parentCalled.getCalledFunctionData().add(ffd);
+ AnalyzerManager.getCalledFunctionChecker().getFailedList().add(ffd);
+
}
}