You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add managed entry points for raising Contention events (#87087)
* Add managed entry points for raising Contention events
- Added the events similarly to how the PortableThreadPool events are currently set up. They may need further tweaking to make them work from NativeAOT.
- The events are not raised anywhere from the managed side yet, it's expected that they will eventually be raised by a new Lock type and at least by NativeAOT's Lock
Copy file name to clipboardExpand all lines: src/coreclr/System.Private.CoreLib/src/System/Diagnostics/Eventing/NativeRuntimeEventSource.Threading.NativeSinks.CoreCLR.cs
+31-13Lines changed: 31 additions & 13 deletions
Original file line number
Diff line number
Diff line change
@@ -1,8 +1,6 @@
1
1
// Licensed to the .NET Foundation under one or more agreements.
2
2
// The .NET Foundation licenses this file to you under the MIT license.
Copy file name to clipboardExpand all lines: src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/NativeRuntimeEventSource.Threading.NativeSinks.cs
+52-12Lines changed: 52 additions & 12 deletions
Original file line number
Diff line number
Diff line change
@@ -1,31 +1,29 @@
1
1
// Licensed to the .NET Foundation under one or more agreements.
2
2
// The .NET Foundation licenses this file to you under the MIT license.
3
3
4
+
usingSystem.Diagnostics.CodeAnalysis;
4
5
usingSystem.Threading;
5
6
usingSystem.Runtime.CompilerServices;
6
-
usingSystem.Diagnostics.CodeAnalysis;
7
7
8
8
namespaceSystem.Diagnostics.Tracing
9
9
{
10
10
// This is part of the NativeRuntimeEventsource, which is the managed version of the Microsoft-Windows-DotNETRuntime provider.
11
-
// It contains the handwritten implementation of the ThreadPool events.
11
+
// It contains the handwritten implementation of threading events.
12
12
// The events here do not call into the typical WriteEvent* APIs unlike most EventSources because that results in the
13
13
// events to be forwarded to EventListeners twice, once directly from the managed WriteEvent API, and another time
14
14
// from the mechanism in NativeRuntimeEventSource.ProcessEvents that forwards native runtime events to EventListeners.
15
15
// To prevent this, these events call directly into QCalls provided by the runtime (refer to NativeRuntimeEventSource.cs) which call
16
16
// FireEtw* methods auto-generated from ClrEtwAll.man. This ensures that corresponding event sinks are being used
17
17
// for the native platform.
18
-
// For implementation of these events not supporting native sinks, refer to NativeRuntimeEventSource.PortableThreadPool.cs.
18
+
// For implementation of these events not supporting native sinks, refer to NativeRuntimeEventSource.Threading.cs.
19
19
[SuppressMessage("Performance","CA1822:Mark members as static",Justification="NativeRuntimeEventSource is a special case where event methods don't use WriteEvent/WriteEventCore but still need to be instance methods.")]
0 commit comments