Skip to content

Commit

Permalink
Try to fix Dictionary duplicate key (#4)
Browse files Browse the repository at this point in the history
  • Loading branch information
xoofx committed Nov 18, 2024
1 parent 097b036 commit 0c4f181
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/Ultra.Core/EtwConverterToFirefox.cs
Original file line number Diff line number Diff line change
Expand Up @@ -216,8 +216,13 @@ public FirefoxProfiler.Profile Convert(string traceFilePath, List<int> processId
var allModules = process.LoadedModules.ToList();
foreach (var module in allModules)
{
if (_mapModuleFileIndexToFirefox.ContainsKey(module.ModuleFile.ModuleFileIndex))
{
continue; // Skip in case
}

options.LogStepProgress?.Invoke($"Loading Symbols for Module `{module.Name}`, ImageSize: {ByteSize.FromBytes(module.ModuleFile.ImageSize)}");

var lib = new FirefoxProfiler.Lib
{
Name = module.Name,
Expand Down Expand Up @@ -360,7 +365,7 @@ public FirefoxProfiler.Profile Convert(string traceFilePath, List<int> processId
MethodILSize = methodJittingStarted.MethodILSize
};

jitCompilePendingMethodId.Add(methodJittingStarted.MethodID, (jitCompile, evt.TimeStampRelativeMSec));
jitCompilePendingMethodId[methodJittingStarted.MethodID] = (jitCompile, evt.TimeStampRelativeMSec);
}
else if (evt is MethodLoadUnloadTraceDataBase methodLoadUnloadVerbose)
{
Expand Down

0 comments on commit 0c4f181

Please sign in to comment.