private void PopulateSymbolMapperAndGuids(ZipArchive archive) { Contract.Requires(archive != null, nameof(archive)); foreach (var entry in archive.Entries) { if (MapFilePatterns.IsMatch(entry.FullName)) { Mapper mapper = new Mapper(); this.fileSymbolMappers[LinuxPerfScriptEventParser.GetFileNameWithoutExtension(entry.FullName)] = mapper; using (Stream stream = entry.Open()) { this.parser.ParseSymbolFile(stream, mapper); } mapper.DoneMapping(); } else if (PerfInfoPattern.IsMatch(LinuxPerfScriptEventParser.GetFileName(entry.FullName))) { Dictionary <string, string> guids = new Dictionary <string, string>(); this.processDllGuids[LinuxPerfScriptEventParser.GetFileName(entry.FullName)] = guids; using (Stream stream = entry.Open()) { this.parser.ParsePerfInfoFile(stream, guids); } } } }
private void PopulateSymbolMapperAndGuids(ZipArchive archive) { Contract.Requires(archive != null, nameof(archive)); foreach (var entry in archive.Entries) { if (MapFilePatterns.IsMatch(entry.FullName)) { Mapper mapper = new Mapper(); // Register the mapper both with and without the .ni extension. // Old versions of the runtime contain native images with the .ni extension. fileSymbolMappers[LinuxPerfScriptEventParser.GetFileNameWithoutExtension(entry.FullName, false)] = mapper; fileSymbolMappers[LinuxPerfScriptEventParser.GetFileNameWithoutExtension(entry.FullName, true)] = mapper; using (Stream stream = entry.Open()) { parser.ParseSymbolFile(stream, mapper); } mapper.DoneMapping(); } else if (PerfInfoPattern.IsMatch(LinuxPerfScriptEventParser.GetFileName(entry.FullName))) { Dictionary <string, string> guids = new Dictionary <string, string>(); processDllGuids[LinuxPerfScriptEventParser.GetFileName(entry.FullName)] = guids; using (Stream stream = entry.Open()) { parser.ParsePerfInfoFile(stream, guids); } } } }