private void processPaths(CallStack stack) { int topId = stack.GetId(stack.Length - 1); CallPaths path = null; if (!runTime.Paths.ContainsKey(topId)) { path = new CallPaths(topId); runTime.Paths.Add(topId, path); } else { path = runTime.Paths[topId]; path.Incl++; } for (int i = stack.Length - 2; i >= 0; i--) { path = path.AddChild(stack.GetId(i)); } path.StackEnd(); // load script section Function endFunc = runTime.Functions[stack.GetId(0)]; runTime.SourceSections.ProcessHit(endFunc.Module, endFunc.Name, stack.GetLine(0)); }
public CallPaths AddChild(int id) { CallPaths child = null; if (!Children.ContainsKey(id)) { child = new CallPaths(id); Children.Add(id, child); } else { child = Children[id]; child.Incl += 1; } return(child); }
private void appendChildren(TreeModel model, CallPaths path) { mainForm.SetStatus("Preparing function details:"); mainForm.SetBar(0); int count = runTime.Paths.Count; int curr = 0; foreach (KeyValuePair <int, CallPaths> pair in path.Children) { Function func = runTime.Functions[pair.Key]; TreeModel child = model.AddChild(func.Module + "@" + func.Name, 100 * (float)(pair.Value.Incl) / ((float)(runTime.TotalCalls)), 100 * (float)(pair.Value.Excl) / ((float)(runTime.TotalCalls))); appendChildren(child, pair.Value); mainForm.SetBar(++curr, count); } }
private void appendChildren(TreeModel model, CallPaths path) { mainForm.SetStatus("Preparing function details:"); mainForm.SetBar(0); int count = runTime.Paths.Count; int curr = 0; foreach (KeyValuePair<int, CallPaths> pair in path.Children) { Function func = runTime.Functions[pair.Key]; TreeModel child=model.AddChild(func.Module + "@" + func.Name, 100 * (float)(pair.Value.Incl) / ((float)(runTime.TotalCalls)), 100 * (float)(pair.Value.Excl) / ((float)(runTime.TotalCalls))); appendChildren(child, pair.Value); mainForm.SetBar(++curr, count); } }
public CallPaths AddChild(int id) { CallPaths child = null; if (!Children.ContainsKey(id)) { child = new CallPaths(id); Children.Add(id, child); } else { child = Children[id]; child.Incl += 1; } return child; }
private void processPaths(CallStack stack) { int topId = stack.GetId(stack.Length - 1); CallPaths path = null; if (!runTime.Paths.ContainsKey(topId)) { path = new CallPaths(topId); runTime.Paths.Add(topId, path); } else { path = runTime.Paths[topId]; path.Incl++; } for (int i = stack.Length - 2; i >= 0; i--) path = path.AddChild(stack.GetId(i)); path.StackEnd(); // load script section Function endFunc = runTime.Functions[stack.GetId(0)]; runTime.SourceSections.ProcessHit(endFunc.Module, endFunc.Name, stack.GetLine(0)); }