private void CollapseCalls(Call call) { List <Call> children = call.Children; call.Children = new List <Call>(); Dictionary <uint, Call> ht = new Dictionary <uint, Call>(); foreach (Call child in children) { if (ht.ContainsKey(child.Function)) { CollapseCallsHelper(ht[child.Function], child); } else { call.AddChild(child); ht[child.Function] = child; } } foreach (Call child in call.Children) { CollapseCalls(child); } }
private void CollapseCallsHelper(Call call1, Call call2) { call1.Duration += call2.Duration; call1.Invocations += call2.Invocations; foreach (Call child in call2.Children) { call1.AddChild(child); } }
private void CollapseCalls(Call call) { List<Call> children = call.Children; call.Children = new List<Call>(); Dictionary<uint,Call> ht = new Dictionary<uint,Call>(); foreach (Call child in children) { if(ht.ContainsKey(child.Function)) { CollapseCallsHelper(ht[child.Function], child); } else { call.AddChild(child); ht[child.Function] = child; } } foreach (Call child in call.Children) CollapseCalls(child); }
private void CollapseCallsHelper(Call call1, Call call2) { call1.Duration += call2.Duration; call1.Invocations += call2.Invocations; foreach (Call child in call2.Children) call1.AddChild(child); }