LeakDetector leakDectector = AnalyzerManager.getLeakDectector();
try {
- DBTableInfo leakTableInfo = DBTableManager.getLeakData();
+ DBTableInfo leakTableInfo = DBTableManager.getInstance()
+ .getTableInfo(DBTableManager.TABLE_INDEX_LEAK_DATA);
+ // DBTableInfo leakTableInfo = DBTableManager.getLeakData();
String insertQuery = leakTableInfo.insertQuery();
// String insertQuery = "insert into LeakData values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?);"; //$NON-NLS-1$
- int size = DBTableManager.getLeakData().getColumnNames().length;
+ // int size = DBTableManager.getLeakData().getColumnNames().length;
+ int size = leakTableInfo.getColumnNames().length;
PreparedStatement prep = conn.prepareStatement(insertQuery);
List<LeakData> leakList = leakDectector.getLeakDataList();
FailedChecker failedChecker = AnalyzerManager.getFailedChecker();
try {
- String[] columns = DBTableManager.commonColumns;
List<FailedData> failedList = failedChecker.getFailedList();
- DBTableInfo failedTableInfo = DBTableManager.getFailedData();
+ DBTableInfo failedTableInfo = DBTableManager.getInstance()
+ .getTableInfo(DBTableManager.TABLE_INDEX_FAILED_DATA);
String insertQuery = failedTableInfo.insertQuery();
PreparedStatement prep = conn.prepareStatement(insertQuery);
+ String[] columns = DBTableManager.commonColumns;
int size = columns.length;
int count = failedList.size();
}
try {
- DBTableInfo unitData = DBTableManager.getCallStackUnits();
- String insertQuery = unitData.insertQuery();
+ DBTableInfo unitTableInfo = DBTableManager.getInstance()
+ .getTableInfo(DBTableManager.TABLE_INDEX_CALLSTACK_UNITS);
+ String insertQuery = unitTableInfo.insertQuery();
PreparedStatement prep = conn.prepareStatement(insertQuery);
HashMap<Long, CallStackUnit> callstackMap = LogSpliter
}
try {
- DBTableInfo callstackData = DBTableManager.getCallStackData();
+ DBTableInfo callstackData = DBTableManager.getInstance()
+ .getTableInfo(DBTableManager.TABLE_INDEX_CALLSTACK_DATA);
String insertQuery = callstackData.insertQuery();
PreparedStatement prep = conn.prepareStatement(insertQuery);
Collection<CallStackData> col = LogSpliter
}
try {
- DBTableInfo appInfoData = DBTableManager.getAppInfo();
+ DBTableInfo appInfoData = DBTableManager.getInstance()
+ .getTableInfo(DBTableManager.TABLE_INDEX_APP_INFO);
String insertQuery = appInfoData.insertQuery();
- // String insertQuery = "insert into AppInfo values (?);"; //$NON-NLS-1$
PreparedStatement prep = conn.prepareStatement(insertQuery);
List<String> info = AnalyzerManager.getProject().getAppInfo();
int size = info.size();
}
try {
+ DBTableManager dbManager = DBTableManager.getInstance();
Statement stat = conn.createStatement();
- stat.executeUpdate(DBTableManager.getApiCountInfo().createQuery());
- stat.executeUpdate(DBTableManager.getAppInfo().createQuery());
- stat.executeUpdate(DBTableManager.getCallStackUnits().createQuery());
- stat.executeUpdate(DBTableManager.getCallStackData().createQuery());
- stat.executeUpdate(DBTableManager.getFailedData().createQuery());
- stat.executeUpdate(DBTableManager.getLeakData().createQuery());
- stat.executeUpdate(DBTableManager.getProfilingData().createQuery());
- stat.executeUpdate(DBTableManager.getProfilingChildData()
+ stat.executeUpdate(dbManager.getTableInfo(
+ DBTableManager.TABLE_INDEX_APP_INFO).createQuery());
+ stat.executeUpdate(dbManager.getTableInfo(
+ DBTableManager.TABLE_INDEX_CALLSTACK_UNITS).createQuery());
+ stat.executeUpdate(dbManager.getTableInfo(
+ DBTableManager.TABLE_INDEX_CALLSTACK_DATA).createQuery());
+ stat.executeUpdate(dbManager.getTableInfo(
+ DBTableManager.TABLE_INDEX_FAILED_DATA).createQuery());
+ stat.executeUpdate(dbManager.getTableInfo(
+ DBTableManager.TABLE_INDEX_LEAK_DATA).createQuery());
+ stat.executeUpdate(dbManager.getTableInfo(
+ DBTableManager.TABLE_INDEX_PROFILING_DATA).createQuery());
+ stat.executeUpdate(dbManager.getTableInfo(
+ DBTableManager.TABLE_INDEX_PROFILING_CHILD_DATA)
.createQuery());
+
+ // stat.executeUpdate(DBTableManager.getAppInfo().createQuery());
+ // stat.executeUpdate(DBTableManager.getCallStackUnits().createQuery());
+ // stat.executeUpdate(DBTableManager.getCallStackData().createQuery());
+ // stat.executeUpdate(DBTableManager.getFailedData().createQuery());
+ // stat.executeUpdate(DBTableManager.getLeakData().createQuery());
+ // stat.executeUpdate(DBTableManager.getProfilingData().createQuery());
+ // stat.executeUpdate(DBTableManager.getProfilingChildData()
+ // .createQuery());
conn.close();
} catch (Exception e) {
e.printStackTrace();
pDataList.addAll(profilingDataMap.values());
try {
- DBTableInfo profilingData = DBTableManager.getProfilingData();
+ DBTableInfo profilingData = DBTableManager.getInstance()
+ .getTableInfo(DBTableManager.TABLE_INDEX_PROFILING_DATA);
String insertQuery = profilingData.insertQuery();
PreparedStatement prep = conn.prepareStatement(insertQuery);
pDataList.addAll(profilingDataMap.values());
try {
- DBTableInfo profilingChildData = DBTableManager
- .getProfilingChildData();
+ DBTableInfo profilingChildData = DBTableManager.getInstance()
+ .getTableInfo(
+ DBTableManager.TABLE_INDEX_PROFILING_CHILD_DATA);
String insertQuery = profilingChildData.insertQuery();
PreparedStatement prep = conn.prepareStatement(insertQuery);
import org.tizen.dynamicanalyzer.model.ProfilingChildData;\r
import org.tizen.dynamicanalyzer.model.Project;\r
import org.tizen.dynamicanalyzer.nl.AnalyzerLabels;\r
+import org.tizen.dynamicanalyzer.tableInfo.DBTableInfo;\r
import org.tizen.dynamicanalyzer.tableInfo.DBTableManager;\r
import org.tizen.dynamicanalyzer.ui.views.CoolbarArea;\r
import org.tizen.dynamicanalyzer.utils.FailedChecker;\r
return;\r
}\r
\r
-// HashMap<Long, String> apiHash = LogSpliter.getCallStackApiByAddrMap();\r
- HashMap<Long, CallStackUnit> apiHash = LogSpliter.getCallStackApiByAddrMap();\r
+ // HashMap<Long, String> apiHash =\r
+ // LogSpliter.getCallStackApiByAddrMap();\r
+ HashMap<Long, CallStackUnit> apiHash = LogSpliter\r
+ .getCallStackApiByAddrMap();\r
try {\r
while (rs.next()) {\r
long addr = rs.getLong("addr"); //$NON-NLS-1$\r
String api = rs.getString("api"); //$NON-NLS-1$\r
CallStackUnit csa = new CallStackUnit(addr, api);\r
-// apiHash.put(addr, api);\r
+ // apiHash.put(addr, api);\r
apiHash.put(addr, csa);\r
}\r
rs.close();\r
}\r
\r
private void loadProfilingData() {\r
- String tableName = DBTableManager.getProfilingData().getTableName();\r
+ DBTableInfo profilingData = DBTableManager.getInstance().getTableInfo(\r
+ DBTableManager.TABLE_INDEX_PROFILING_DATA);\r
+ String tableName = profilingData.getTableName();\r
ResultSet rs = SqlManager.selectAllFromTable(tableName);\r
FunctionUsageProfiler profiler = AnalyzerManager\r
.getFunctionUserProfiler();\r
return;\r
}\r
\r
- int size = DBTableManager.getProfilingData().getColumnNames().length;\r
+ int size = profilingData.getColumnNames().length;\r
\r
try {\r
while (rs.next()) {\r
}\r
\r
private void loadProfilingChildData() {\r
- String tableName = DBTableManager.getProfilingChildData()\r
- .getTableName();\r
+ DBTableInfo profilingChildData = DBTableManager.getInstance()\r
+ .getTableInfo(DBTableManager.TABLE_INDEX_PROFILING_CHILD_DATA);\r
+ String tableName = profilingChildData.getTableName();\r
ResultSet rs = SqlManager.selectAllFromTable(tableName);\r
FunctionUsageProfiler profiler = AnalyzerManager\r
.getFunctionUserProfiler();\r
return;\r
}\r
\r
- int size = DBTableManager.getProfilingChildData().getColumnNames().length;\r
+ int size = profilingChildData.getColumnNames().length;\r
\r
try {\r
while (rs.next()) {\r
e.printStackTrace();\r
}\r
}\r
-\r
}\r
import org.tizen.dynamicanalyzer.utils.FunctionUsageProfiler;
public class FunctionUsageProfilingData {
- public static final int DATA_FIELD_SIZE = 8;
+ public static final int DATA_FIELD_SIZE = 9;
public static final int SEQUENCE_INDEX = 0;
public static final int NAME_INDEX = 1;
public static final int EXCOUNT_INDEX = 2;
public static final int PARENT_INDEX = 5;
public static final int KEY_INDEX = 6;
public static final int EXE_TIME_INDEX = 7;
+ public static final int INCL_EXE_TIME_INDEX = 8;
private static int internalSeq = 0;
private int seq = -1;
private String key = null;
private ProfilingChildData children = null;
private int exeTime = 0;
+ private int inExeTime = 0;
public FunctionUsageProfilingData(CallStackUnit inputData, boolean isParent) {
if (isParent) {
if (!input.get(EXE_TIME_INDEX).isEmpty()) {
exeTime = Integer.parseInt(input.get(EXE_TIME_INDEX));
}
+ if (!input.get(INCL_EXE_TIME_INDEX).isEmpty()) {
+ inExeTime = Integer.parseInt(input.get(INCL_EXE_TIME_INDEX));
+ }
}
/** using save trace **/
output.set(PARENT_INDEX, parent);
output.set(KEY_INDEX, key);
output.set(EXE_TIME_INDEX, Integer.toString(exeTime));
+ output.set(INCL_EXE_TIME_INDEX, Integer.toString(inExeTime));
return output;
}
return time;
}
+ public void addInclusiveExeTime(int time) {
+ inExeTime += time;
+ }
+
+ public int getInclusiveExeTime() {
+ return inExeTime;
+ }
+
public boolean isParent() {
if (getChildData().getChildren().isEmpty()) {
return false;
public static String FUNCTION_USER_PROFILING_VIEW_INCLUSIVE_CPU_RATE;
public static String FUNCTION_USER_PROFILING_VIEW_INCLUSIVE_CPU_TIME;
public static String FUNCTION_USER_PROFILING_VIEW_NAME;
- public static String FUNCTION_USER_PROFILING_VIEW_ELASPED_TIME;;
+ public static String FUNCTION_USER_PROFILING_VIEW_ELASPED_TIME;
+ public static String FUNCTION_USER_PROFILING_VIEW_INCLUSIVE_ELASPED_TIME;
public static String FUNCTION_USER_PROFILING_VIEW_TITLE;
public static String WARNING_CASE_BRIEF_DUPLICATE;
FUNCTION_USER_PROFILING_VIEW_INCLUSIVE_CPU_TIME=Incl. Cpu Time
FUNCTION_USER_PROFILING_VIEW_NAME=Name
FUNCTION_USER_PROFILING_VIEW_ELASPED_TIME=Elapsed Time
+FUNCTION_USER_PROFILING_VIEW_INCLUSIVE_ELASPED_TIME=Incl. Elapsed Time
FUNCTION_USER_PROFILING_VIEW_TITLE=Function Usage Profiling
WARNING_CASE_BRIEF_DUPLICATE=Duplicate open (re-open without closed)
package org.tizen.dynamicanalyzer.tableInfo;
+import java.util.ArrayList;
+import java.util.List;
+
public class DBTableManager {
- public static final String TABLE_NAME_API_COUNT_INFO = "ApiCountInfo";
- public static final String TABLE_NAME_APP_INFO = "AppInfo";
- public static final String TABLE_NAME_CALLSTACK_UNITS = "CallstackUnits";
- public static final String TABLE_NAME_CALLSTACK_DATA = "CallstackData";
- public static final String TABLE_NAME_FAILED_DATA = "FailedData";
- public static final String TABLE_NAME_LEAK_DATA = "LeakData";
- public static final String TABLE_NAME_PROFILING_DATA = "ProfilingData";
- public static final String TABLE_NAME_PROFILING_CHILD_DATA = "ProfilingChildData";
-
- private static DBTableInfo apiCountInfo = null;
- private static DBTableInfo appInfo = null;
- private static DBTableInfo callstackUnits = null;
- private static DBTableInfo callstackData = null;
- private static DBTableInfo failedData = null;
- private static DBTableInfo leakData = null;
- private static DBTableInfo profilingData = null;
- private static DBTableInfo profilingChildData = null;
+ public static DBTableManager instance = null;
+
+ private final String TABLE_NAME_APP_INFO = "AppInfo";
+ private final String TABLE_NAME_CALLSTACK_UNITS = "CallstackUnits";
+ private final String TABLE_NAME_CALLSTACK_DATA = "CallstackData";
+ private final String TABLE_NAME_FAILED_DATA = "FailedData";
+ private final String TABLE_NAME_LEAK_DATA = "LeakData";
+ private final String TABLE_NAME_PROFILING_DATA = "ProfilingData";
+ private final String TABLE_NAME_PROFILING_CHILD_DATA = "ProfilingChildData";
+
+ private static List<DBTableInfo> tableInfos;
+
+ public static final int TABLE_INDEX_APP_INFO = 0;
+ public static final int TABLE_INDEX_CALLSTACK_UNITS = 1;
+ public static final int TABLE_INDEX_CALLSTACK_DATA = 2;
+ public static final int TABLE_INDEX_FAILED_DATA = 3;
+ public static final int TABLE_INDEX_LEAK_DATA = 4;
+ public static final int TABLE_INDEX_PROFILING_DATA = 5;
+ public static final int TABLE_INDEX_PROFILING_CHILD_DATA = 6;
+
+ public static int TABLE_COUNT = 7;
public static final String[] commonColumns = { "Rid", "Id", "SeqNumber",
"APINmae", "Time", "Pid", "Tid", "InputParm", "Return", "PCAddr",
"TEXT", "TEXT", "TEXT", "TEXT", "TEXT", "TEXT", "TEXT", "TEXT",
"TEXT" };
- public static DBTableInfo getApiCountInfo() {
- if (null == apiCountInfo) {
- String[] names = { "cid", "name", "count" };
- String[] options = { "", "primary key not null", "" };
- String[] types = { "INTEGER", "TEXT", "INTEGER" };
- apiCountInfo = new DBTableInfo(TABLE_NAME_API_COUNT_INFO, names,
- options, types);
+ public static DBTableManager getInstance() {
+ if (null == instance) {
+ instance = new DBTableManager();
+ instance.init();
}
- return apiCountInfo;
+ return instance;
}
- public static DBTableInfo getAppInfo() {
- if (null == appInfo) {
+ public List<DBTableInfo> getTableInfos() {
+ if (null == tableInfos) {
+ tableInfos = new ArrayList<DBTableInfo>();
+ for (int i = 0; i < TABLE_COUNT; i++) {
+ tableInfos.add(null);
+ }
+ }
+ return tableInfos;
+ }
+
+ private void init() {
+ // init tableInfo;
+ getTableInfos();
+
+ // "app info" table info block
+ {
String[] names = { "info" };
String[] options = { "" };
String[] types = { "TEXT" };
- appInfo = new DBTableInfo(TABLE_NAME_APP_INFO, names, options, types);
+ DBTableInfo appInfoTableInfo = new DBTableInfo(TABLE_NAME_APP_INFO,
+ names, options, types);
+ tableInfos.set(TABLE_INDEX_APP_INFO, appInfoTableInfo);
}
- return appInfo;
- }
- public static DBTableInfo getCallStackUnits() {
- if (null == callstackUnits) {
+ // "callstack units" table info block
+ {
String[] names = { "addr", "api" };
String[] options = { "primary key not null", "" };
String[] types = { "INTEGER", "TEXT" };
- callstackUnits = new DBTableInfo(TABLE_NAME_CALLSTACK_UNITS, names,
- options, types);
+ DBTableInfo callstackUnitsTableInfo = new DBTableInfo(
+ TABLE_NAME_CALLSTACK_UNITS, names, options, types);
+ tableInfos
+ .set(TABLE_INDEX_CALLSTACK_UNITS, callstackUnitsTableInfo);
}
- return callstackUnits;
- }
- public static DBTableInfo getCallStackData() {
- if (null == callstackData) {
+ // "callstack data" table info block
+ {
String[] names = { "seq", "callstack" };
String[] options = { "not null", "" };
String[] types = { "INTEGER", "TEXT" };
- callstackData = new DBTableInfo(TABLE_NAME_CALLSTACK_DATA, names,
- options, types);
+ DBTableInfo callstackDataTableInfo = new DBTableInfo(
+ TABLE_NAME_CALLSTACK_DATA, names, options, types);
+ tableInfos.set(TABLE_INDEX_CALLSTACK_DATA, callstackDataTableInfo);
}
- return callstackData;
- }
- public static DBTableInfo getFailedData() {
- if (null == failedData) {
+ // "failed data" table info block
+ {
String[] names = commonColumns;
String[] options = commonOptions;
String[] types = commonTypes;
- failedData = new DBTableInfo(TABLE_NAME_FAILED_DATA, names, options,
- types);
+ DBTableInfo failedDataTableInfo = new DBTableInfo(
+ TABLE_NAME_FAILED_DATA, names, options, types);
+ tableInfos.set(TABLE_INDEX_FAILED_DATA, failedDataTableInfo);
}
- return failedData;
- }
- public static DBTableInfo getLeakData() {
- if (null == leakData) {
+ // "leak data" table info block
+ {
String[] names = commonColumns;
String[] options = commonOptions;
String[] types = commonTypes;
- leakData = new DBTableInfo(TABLE_NAME_LEAK_DATA, names, options,
- types);
+ DBTableInfo leakDataTableInfo = new DBTableInfo(
+ TABLE_NAME_LEAK_DATA, names, options, types);
+ tableInfos.set(TABLE_INDEX_LEAK_DATA, leakDataTableInfo);
}
- return leakData;
- }
- public static DBTableInfo getProfilingData() {
- if (null == profilingData) {
+ // "profiling data" table info block
+ {
String[] names = { "seq", "name", "exCount", "inCount",
"callCount", "parent", "key", "exeTime" };
String[] options = { "not null", "", "", "", "", "", "", "" };
String[] types = { "TEXT", "TEXT", "TEXT", "TEXT", "TEXT", "TEXT",
"TEXT", "TEXT" };
- profilingData = new DBTableInfo(TABLE_NAME_PROFILING_DATA, names,
- options, types);
+ DBTableInfo profilingDataTableInfo = new DBTableInfo(
+ TABLE_NAME_PROFILING_DATA, names, options, types);
+ tableInfos.set(TABLE_INDEX_PROFILING_DATA, profilingDataTableInfo);
}
- return profilingData;
- }
- public static DBTableInfo getProfilingChildData() {
- if (null == profilingChildData) {
+ // "profiling child data" table info block
+ {
String[] names = { "seq", "childList" };
String[] options = { "not null", "" };
String[] types = { "TEXT", "TEXT" };
- profilingChildData = new DBTableInfo(TABLE_NAME_PROFILING_CHILD_DATA,
- names, options, types);
+ DBTableInfo profilingChildTableInfo = new DBTableInfo(
+ TABLE_NAME_PROFILING_CHILD_DATA, names, options, types);
+ tableInfos.set(TABLE_INDEX_PROFILING_CHILD_DATA,
+ profilingChildTableInfo);
}
- return profilingChildData;
}
+
+ public DBTableInfo getTableInfo(int tableInfoIndex) {
+ return getTableInfos().get(tableInfoIndex);
+ }
+
}
SummaryLables.FUNCTION_USER_PROFILING_VIEW_INCLUSIVE_CPU_TIME,
SummaryLables.FUNCTION_USER_PROFILING_VIEW_INCLUSIVE_CPU_RATE,
SummaryLables.FUNCTION_USER_PROFILING_VIEW_CALL_COUNT,
- SummaryLables.FUNCTION_USER_PROFILING_VIEW_ELASPED_TIME };
- private int[] columnSizes = { 200, 90, 90, 90, 90, 90, 90 };
- private boolean[] columnVisibility = { true, true, true, true, true, true, true };
+ SummaryLables.FUNCTION_USER_PROFILING_VIEW_ELASPED_TIME,
+ SummaryLables.FUNCTION_USER_PROFILING_VIEW_INCLUSIVE_ELASPED_TIME };
+ private int[] columnSizes = { 200, 90, 90, 90, 90, 90, 90, 90 };
+ private boolean[] columnVisibility = { true, true, true, true, true, true,
+ true, true };
public FunctionUsageProfilingView(Composite parent, int style) {
super(parent, style);
AnalyzerConstants.SORT_TYPE_NUM,
AnalyzerConstants.SORT_TYPE_NUM,
AnalyzerConstants.SORT_TYPE_NUM,
+ AnalyzerConstants.SORT_TYPE_NUM,
AnalyzerConstants.SORT_TYPE_NUM };
setSortTypes(sortTypes);
setSelValueIndex(0);
.set(FunctionUsageProfilingData.KEY_INDEX, fuData.getKey());
inputData.set(FunctionUsageProfilingData.EXE_TIME_INDEX,
Integer.toString(fuData.getExeTime()));
+ inputData.set(FunctionUsageProfilingData.INCL_EXE_TIME_INDEX,
+ Integer.toString(fuData.getExeTime()));
tableData.getData().addAll(inputData);
}
treeItem.setData(tableData);
tableData.setObject(fuData.getName());
- String exTime = "0", exRate = "0.00", inTime = "0", inRate = "0.00", callCount = "0", exeTime = "0"; //$NON-NLS-1$
+ String exTime = "0", exRate = "0.00", inTime = "0", inRate = "0.00", callCount = "0", exeTime = "0", inExeTime = "0"; //$NON-NLS-1$
try {
exTime = profiler.getCpuTime(fuData, true);
exeTime = Integer.toString(fuData.getExeTime());
exeTime = Formatter.toTimeFormat(exeTime);
}
+
+ if (0 == fuData.getInclusiveExeTime()) {
+ inExeTime = "-"; //$NON-NLS-1$
+ } else {
+ inExeTime = Integer.toString(fuData.getInclusiveExeTime());
+ inExeTime = Formatter.toTimeFormat(inExeTime);
+ }
} catch (NumberFormatException e) {
// FIXME
e.printStackTrace();
treeItem.setText(4, inRate + " " + AnalyzerConstants.PERCENT); //$NON-NLS-1$
treeItem.setText(5, callCount);
treeItem.setText(6, exeTime);
+ treeItem.setText(7, inExeTime);
}
}
import org.tizen.dynamicanalyzer.nl.SummaryLables;
public class FunctionUsageProfiler {
+
+ class CallstackTree {
+ FunctionUsageProfilingData me;
+ CallstackTree parent;
+ List<CallstackTree> children = null;
+
+ public CallstackTree(FunctionUsageProfilingData me, CallstackTree parent) {
+ this.me = me;
+ this.parent = parent;
+ children = new ArrayList<FunctionUsageProfiler.CallstackTree>();
+ }
+
+ public void addChild(CallstackTree child) {
+ children.add(child);
+ }
+
+ public int getInclusiveExeTime() {
+ int cTime = 0;
+ for (int i = 0; i < children.size(); i++) {
+ cTime += children.get(i).getThis().getExeTime();
+ }
+ return (me.getExeTime() - cTime);
+ }
+
+ public FunctionUsageProfilingData getThis() {
+ return me;
+ }
+
+ public CallstackTree getParent() {
+ return parent;
+ }
+ }
+
// 0.01 second = 10 ms
public static final long SAMPLE_TIME = 10;
public static final String APPLICATION = SummaryLables.FUNCTION_USAGE_PROFILER_APPLICATION;
public static final String UNKNOWN = InformationViewLables.CALLSTACK_TABLE_UNKNOWN;
private int totalSampleCount = 0;
+ private CallstackTree current = null;
/**
* key: seq - value : function usage profiling data hash map all function
}
child.addCallCount();
child.addExeTime(exeTime);
+
+ // calculate internal time
+ if (type == LogCenterConstants.USER_FUNCTION_EVENT_TYPE_EXIT) {
+ if (null == current) {
+ // bug
+ } else {
+ child.addInclusiveExeTime(current.getInclusiveExeTime());
+ current = current.getParent();
+ }
+ } else {
+ if (null == current) {
+ CallstackTree ct = new CallstackTree(child, null);
+ current = ct;
+ } else {
+ CallstackTree ct = new CallstackTree(child, current);
+ current.addChild(ct);
+ current = ct;
+ }
+ }
}
}