Skip to content

Commit

Permalink
Add progress on module loading
Browse files Browse the repository at this point in the history
  • Loading branch information
xoofx committed Nov 18, 2024
1 parent 0c4f181 commit 118461d
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/Ultra.Core/EtwConverterToFirefox.cs
Original file line number Diff line number Diff line change
Expand Up @@ -214,15 +214,16 @@ public FirefoxProfiler.Profile Convert(string traceFilePath, List<int> processId
options.LogProgress?.Invoke($"Loading Modules for process {process.Name}");

var allModules = process.LoadedModules.ToList();
foreach (var module in allModules)
for (var i = 0; i < allModules.Count; i++)
{
var module = allModules[i];
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)}");

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

var lib = new FirefoxProfiler.Lib
{
Name = module.Name,
Expand Down

0 comments on commit 118461d

Please sign in to comment.