public void Patch(PerfMap perfMap)
 {
     foreach (var item in Items)
     {
         item.Patch(perfMap);
     }
 }
Beispiel #2
0
        static void Main(string[] args)
        {
            if (args.Length < 2)
            {
                Console.WriteLine("Please, provide paths to perfmap and backtraces files");
                return;
            }
            var perfMapFileName   = args[0];
            var backtraceFileName = args[1];
            var perfMap           = PerfMap.Parse(File.ReadAllLines(perfMapFileName));
            var backtrace         = Backtrace.Parse(File.ReadAllLines(backtraceFileName));

            backtrace.Patch(perfMap);
            backtrace.Print();
        }
 public void Patch(PerfMap perfMap)
 {
     if (Lines.Length == 1 && Lines[0].Contains("?? ()"))
     {
         var sp = Lines[0].Split(new[] { ' ' }, StringSplitOptions.RemoveEmptyEntries);
         if (sp.Length >= 4)
         {
             var address = sp[1];
             var name    = perfMap.Resolve(address);
             if (name != null)
             {
                 Lines[0] = Lines[0].Replace("?? ()", name);
             }
         }
     }
 }