Esempio n. 1
0
        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));
        }
Esempio n. 2
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);
            }
Esempio n. 3
0
        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);
            }
        }
Esempio n. 4
0
 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);
     }
 }
Esempio n. 5
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;
            }
Esempio n. 6
0
        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));
        }