public void Parse(DProject project) { string file = TraceLogFile(project); if (file == null) { profilerPadWidget.AddTracedFunction(0, 0, 0, 0, new DVariable { Name = "trace.log not found.." }); return; } lastProfiledProject = project; profilerPadWidget.ClearTracedFunctions(); var ctxt = ResolutionContext.Create(Resolver.DResolverWrapper.CreateCacheList(lastProfiledProject), null, null); StreamReader reader = File.OpenText(file); string line; while ((line = reader.ReadLine()) != null) { var m = traceFuncRegex.Match(line); if (m.Success) { var symName = m.Groups[5].Value; if (symName.StartsWith("=")) { continue; } bool mightBeLegalUnresolvableSymbol; var dn = ExamTraceSymbol(symName, ctxt, out mightBeLegalUnresolvableSymbol); if (dn != null || mightBeLegalUnresolvableSymbol) { profilerPadWidget.AddTracedFunction(long.Parse(m.Groups[1].Value), long.Parse(m.Groups[2].Value), long.Parse(m.Groups[3].Value), long.Parse(m.Groups[4].Value), dn ?? new DVariable { Name = symName }); } } } }
public void Clear() { profilerPadWidget.ClearTracedFunctions(); }