/** * When stopwatch is stopped, the the split is added to current tree node and this tree node is * popped from call stack. As a result, parent tree node becomes current tree node. * * @return Current (child) tree node */ public CallTreeNode onStopwatchStop(Split split) { CallTreeNode currentNode = callStack.removeLast(); currentNode.addSplit(split); if (callStack.isEmpty()) { onRootStopwatchStop(currentNode, split); } return currentNode; }