Skip to content

Commit

Permalink
Use distinct EventSource names for compiler and workspace layer events (
Browse files Browse the repository at this point in the history
  • Loading branch information
RikkiGibson authored Oct 24, 2024
1 parent ea13488 commit a1346ef
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,8 @@

namespace Microsoft.CodeAnalysis
{
[EventSource(Name = "Microsoft-CodeAnalysis-General")]
internal sealed class CodeAnalysisEventSource : EventSource
internal sealed partial class CodeAnalysisEventSource : EventSource
{
public static readonly CodeAnalysisEventSource Log = new CodeAnalysisEventSource();

public static class Keywords
{
public const EventKeywords Performance = (EventKeywords)1;
Expand Down
15 changes: 15 additions & 0 deletions src/Compilers/Core/Portable/CodeAnalysisEventSource.Compiler.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.

using System;
using System.Diagnostics.Tracing;

namespace Microsoft.CodeAnalysis
{
[EventSource(Name = "Microsoft-CodeAnalysis-General")]
internal sealed partial class CodeAnalysisEventSource
{
public static readonly CodeAnalysisEventSource Log = new CodeAnalysisEventSource();
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.

using System;
using System.Diagnostics.Tracing;

namespace Microsoft.CodeAnalysis
{
[EventSource(Name = "Microsoft-CodeAnalysis-Workspaces")]
internal sealed partial class CodeAnalysisEventSource
{
public static readonly CodeAnalysisEventSource Log = new CodeAnalysisEventSource();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
<Compile Include="..\..\..\Compilers\Core\Portable\DiagnosticAnalyzer\DefaultAnalyzerAssemblyLoader.cs" Link="Diagnostics\CompilerShared\DefaultAnalyzerAssemblyLoader.cs" />
<Compile Include="..\..\..\Compilers\Core\Portable\DiagnosticAnalyzer\ShadowCopyAnalyzerAssemblyLoader.cs" Link="Diagnostics\CompilerShared\ShadowCopyAnalyzerAssemblyLoader.cs" />
<Compile Include="..\..\..\Compilers\Core\Portable\DiagnosticAnalyzer\IAnalyzerAssemblyResolver.cs" Link="Diagnostics\CompilerShared\IAnalyzerAssemblyResolver.cs" />
<Compile Include="..\..\..\Compilers\Core\Portable\CodeAnalysisEventSource.cs" Link="Diagnostics\CompilerShared\CodeAnalysisEventSource.cs" />
<Compile Include="..\..\..\Compilers\Core\Portable\CodeAnalysisEventSource.Common.cs" Link="Diagnostics\CompilerShared\CodeAnalysisEventSource.Common.cs" />
<Compile Include="..\..\..\Compilers\Core\Portable\Text\SourceHashAlgorithms.cs" Link="Text\SourceHashAlgorithms.cs" />
<Compile Include="..\..\..\Compilers\Core\Portable\AssemblyUtilitiesCore.cs" Link="AssemblyUtilitiesCore.cs" />
</ItemGroup>
Expand Down

0 comments on commit a1346ef

Please sign in to comment.