Skip to content

Commit 8caa4df

Browse files
committed
Refactor the code to split Etw specificities from EventPipe
1 parent b3eb108 commit 8caa4df

9 files changed

+468
-371
lines changed

src/Ultra.Core/EtwConverterToFirefox.cs src/Ultra.Core/ConverterToFirefox.cs

+5-5
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ namespace Ultra.Core;
1717
/// <summary>
1818
/// Converts an ETW trace file to a Firefox profile.
1919
/// </summary>
20-
public sealed class EtwConverterToFirefox : IDisposable
20+
public sealed class ConverterToFirefox : IDisposable
2121
{
2222
private readonly Dictionary<ModuleFileIndex, int> _mapModuleFileIndexToFirefox;
2323
private readonly HashSet<ModuleFileIndex> _setManagedModules;
@@ -32,7 +32,7 @@ public sealed class EtwConverterToFirefox : IDisposable
3232
private ModuleFileIndex _clrJitModuleIndex = ModuleFileIndex.Invalid;
3333
private ModuleFileIndex _coreClrModuleIndex = ModuleFileIndex.Invalid;
3434
private int _profileThreadIndex;
35-
private readonly EtwUltraProfilerOptions _options;
35+
private readonly UltraProfilerOptions _options;
3636
private readonly FirefoxProfiler.Profile _profile;
3737

3838
/// <summary>
@@ -70,7 +70,7 @@ public sealed class EtwConverterToFirefox : IDisposable
7070
/// </summary>
7171
public const int CategoryClr = 6;
7272

73-
private EtwConverterToFirefox(string traceFilePath, EtwUltraProfilerOptions options)
73+
private ConverterToFirefox(string traceFilePath, UltraProfilerOptions options)
7474
{
7575
_etl = new ETWTraceEventSource(traceFilePath);
7676
_traceLog = TraceLog.OpenOrConvert(traceFilePath);
@@ -110,9 +110,9 @@ public void Dispose()
110110
/// <param name="options">The options used for converting.</param>
111111
/// <param name="processIds">The list of process ids to extract from the ETL file.</param>
112112
/// <returns>The converted Firefox profile.</returns>
113-
public static FirefoxProfiler.Profile Convert(string traceFilePath, EtwUltraProfilerOptions options, List<int> processIds)
113+
public static FirefoxProfiler.Profile Convert(string traceFilePath, UltraProfilerOptions options, List<int> processIds)
114114
{
115-
using var converter = new EtwConverterToFirefox(traceFilePath, options);
115+
using var converter = new ConverterToFirefox(traceFilePath, options);
116116
return converter.Convert(processIds);
117117
}
118118

src/Ultra.Core/EtwUltraProfilerWindows.cs

-301
This file was deleted.

0 commit comments

Comments
 (0)