<Compile Include="$(BclSourcesRoot)\System\Diagnostics\Debugger.cs" />
<Compile Include="$(BclSourcesRoot)\System\Diagnostics\EditAndContinueHelper.cs" />
<Compile Include="$(BclSourcesRoot)\System\Diagnostics\Eventing\EventPipe.CoreCLR.cs" />
- <Compile Include="$(BclSourcesRoot)\System\Diagnostics\Eventing\NativeRuntimeEventSource.PortableThreadPool.CoreCLR.cs" />
+ <Compile Include="$(BclSourcesRoot)\System\Diagnostics\Eventing\NativeRuntimeEventSource.PortableThreadPool.NativeSinks.CoreCLR.cs" Condition="'$(FeaturePortableThreadPool)' == 'true'" />
<Compile Include="$(BclSourcesRoot)\System\Diagnostics\ICustomDebuggerNotification.cs" />
<Compile Include="$(BclSourcesRoot)\System\Diagnostics\StackFrame.CoreCLR.cs" />
<Compile Include="$(BclSourcesRoot)\System\Diagnostics\StackFrameHelper.cs" />
+++ /dev/null
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-
-using System.Threading;
-using System.Diagnostics.Tracing;
-using System.Runtime.CompilerServices;
-using System.Runtime.InteropServices;
-using Internal.Runtime.CompilerServices;
-
-namespace System.Diagnostics.Tracing
-{
- // This is part of the NativeRuntimeEventsource, which is the managed version of the Microsoft-Windows-DotNETRuntime provider.
- // It contains the handwritten implementation of the ThreadPool events.
- // The events here do not call into the typical WriteEvent* APIs unlike most EventSources because that results in the
- // events to be forwarded to EventListeners twice, once directly from the managed WriteEvent API, and another time
- // from the mechanism in NativeRuntimeEventSource.ProcessEvents that forwards native runtime events to EventListeners.
- // To prevent this, these events call directly into QCalls provided by the runtime (refer to NativeRuntimeEventSource.cs) which call
- // FireEtw* methods auto-generated from ClrEtwAll.man. This ensures that corresponding event sinks are being used
- // for the native platform. Refer to src/coreclr/vm/nativeruntimesource.cpp.
- // For Mono|CoreRT implementation of these events, refer to NativeRuntimeEventSource.PortableThreadPool.cs.
- internal sealed partial class NativeRuntimeEventSource : EventSource
- {
- // This value does not seem to be used, leaving it as zero for now. It may be useful for a scenario that may involve
- // multiple instances of the runtime within the same process, but then it seems unlikely that both instances' thread
- // pools would be in moderate use.
- private const ushort DefaultClrInstanceId = 0;
-
- private static class Messages
- {
- public const string WorkerThread = "ActiveWorkerThreadCount={0};\nRetiredWorkerThreadCount={1};\nClrInstanceID={2}";
- public const string WorkerThreadAdjustmentSample = "Throughput={0};\nClrInstanceID={1}";
- public const string WorkerThreadAdjustmentAdjustment = "AverageThroughput={0};\nNewWorkerThreadCount={1};\nReason={2};\nClrInstanceID={3}";
- public const string WorkerThreadAdjustmentStats = "Duration={0};\nThroughput={1};\nThreadWave={2};\nThroughputWave={3};\nThroughputErrorEstimate={4};\nAverageThroughputErrorEstimate={5};\nThroughputRatio={6};\nConfidence={7};\nNewControlSetting={8};\nNewThreadWaveMagnitude={9};\nClrInstanceID={10}";
- public const string IOEnqueue = "NativeOverlapped={0};\nOverlapped={1};\nMultiDequeues={2};\nClrInstanceID={3}";
- public const string IO = "NativeOverlapped={0};\nOverlapped={1};\nClrInstanceID={2}";
- public const string WorkingThreadCount = "Count={0};\nClrInstanceID={1}";
- }
-
- // The task definitions for the ETW manifest
- public static class Tasks // this name and visibility is important for EventSource
- {
- public const EventTask ThreadPoolWorkerThread = (EventTask)16;
- public const EventTask ThreadPoolWorkerThreadAdjustment = (EventTask)18;
- public const EventTask ThreadPool = (EventTask)23;
- public const EventTask ThreadPoolWorkingThreadCount = (EventTask)22;
- }
-
- public static class Opcodes // this name and visibility is important for EventSource
- {
- public const EventOpcode IOEnqueue = (EventOpcode)13;
- public const EventOpcode IODequeue = (EventOpcode)14;
- public const EventOpcode Wait = (EventOpcode)90;
- public const EventOpcode Sample = (EventOpcode)100;
- public const EventOpcode Adjustment = (EventOpcode)101;
- public const EventOpcode Stats = (EventOpcode)102;
- }
-
- public enum ThreadAdjustmentReasonMap : uint
- {
- Warmup,
- Initializing,
- RandomMove,
- ClimbingMove,
- ChangePoint,
- Stabilizing,
- Starvation,
- ThreadTimedOut
- }
-
- [Event(50, Level = EventLevel.Informational, Message = Messages.WorkerThread, Task = Tasks.ThreadPoolWorkerThread, Opcode = EventOpcode.Start, Version = 0, Keywords = Keywords.ThreadingKeyword)]
- public unsafe void ThreadPoolWorkerThreadStart(
- uint ActiveWorkerThreadCount,
- uint RetiredWorkerThreadCount = 0,
- ushort ClrInstanceID = DefaultClrInstanceId)
- {
- if (IsEnabled(EventLevel.Informational, Keywords.ThreadingKeyword))
- {
- LogThreadPoolWorkerThreadStart(ActiveWorkerThreadCount, RetiredWorkerThreadCount, ClrInstanceID);
- }
- }
-
- [Event(51, Level = EventLevel.Informational, Message = Messages.WorkerThread, Task = Tasks.ThreadPoolWorkerThread, Opcode = EventOpcode.Stop, Version = 0, Keywords = Keywords.ThreadingKeyword)]
- public void ThreadPoolWorkerThreadStop(
- uint ActiveWorkerThreadCount,
- uint RetiredWorkerThreadCount = 0,
- ushort ClrInstanceID = DefaultClrInstanceId)
- {
- if (IsEnabled(EventLevel.Informational, Keywords.ThreadingKeyword))
- {
- LogThreadPoolWorkerThreadStop(ActiveWorkerThreadCount, RetiredWorkerThreadCount, ClrInstanceID);
- }
- }
-
- [Event(57, Level = EventLevel.Informational, Message = Messages.WorkerThread, Task = Tasks.ThreadPoolWorkerThread, Opcode = Opcodes.Wait, Version = 0, Keywords = Keywords.ThreadingKeyword)]
- [MethodImpl(MethodImplOptions.NoInlining)]
- public void ThreadPoolWorkerThreadWait(
- uint ActiveWorkerThreadCount,
- uint RetiredWorkerThreadCount = 0,
- ushort ClrInstanceID = DefaultClrInstanceId)
- {
- if (IsEnabled(EventLevel.Informational, Keywords.ThreadingKeyword))
- {
- LogThreadPoolWorkerThreadWait(ActiveWorkerThreadCount, RetiredWorkerThreadCount, ClrInstanceID);
- }
- }
-
- [Event(54, Level = EventLevel.Informational, Message = Messages.WorkerThreadAdjustmentSample, Task = Tasks.ThreadPoolWorkerThreadAdjustment, Opcode = Opcodes.Sample, Version = 0, Keywords = Keywords.ThreadingKeyword)]
- public unsafe void ThreadPoolWorkerThreadAdjustmentSample(
- double Throughput,
- ushort ClrInstanceID = DefaultClrInstanceId)
- {
- if (!IsEnabled(EventLevel.Informational, Keywords.ThreadingKeyword))
- {
- return;
- }
- LogThreadPoolWorkerThreadAdjustmentSample(Throughput, ClrInstanceID);
- }
-
- [Event(55, Level = EventLevel.Informational, Message = Messages.WorkerThreadAdjustmentAdjustment, Task = Tasks.ThreadPoolWorkerThreadAdjustment, Opcode = Opcodes.Adjustment, Version = 0, Keywords = Keywords.ThreadingKeyword)]
- public unsafe void ThreadPoolWorkerThreadAdjustmentAdjustment(
- double AverageThroughput,
- uint NewWorkerThreadCount,
- ThreadAdjustmentReasonMap Reason,
- ushort ClrInstanceID = DefaultClrInstanceId)
- {
- if (!IsEnabled(EventLevel.Informational, Keywords.ThreadingKeyword))
- {
- return;
- }
- LogThreadPoolWorkerThreadAdjustmentAdjustment(AverageThroughput, NewWorkerThreadCount, Reason, ClrInstanceID);
- }
-
- [Event(56, Level = EventLevel.Verbose, Message = Messages.WorkerThreadAdjustmentStats, Task = Tasks.ThreadPoolWorkerThreadAdjustment, Opcode = Opcodes.Stats, Version = 0, Keywords = Keywords.ThreadingKeyword)]
- public unsafe void ThreadPoolWorkerThreadAdjustmentStats(
- double Duration,
- double Throughput,
- double ThreadWave,
- double ThroughputWave,
- double ThroughputErrorEstimate,
- double AverageThroughputErrorEstimate,
- double ThroughputRatio,
- double Confidence,
- double NewControlSetting,
- ushort NewThreadWaveMagnitude,
- ushort ClrInstanceID = DefaultClrInstanceId)
- {
- if (!IsEnabled(EventLevel.Verbose, Keywords.ThreadingKeyword))
- {
- return;
- }
- LogThreadPoolWorkerThreadAdjustmentStats(Duration, Throughput, ThreadWave, ThroughputWave, ThroughputErrorEstimate, AverageThroughputErrorEstimate, ThroughputRatio, Confidence, NewControlSetting, NewThreadWaveMagnitude, ClrInstanceID);
- }
-
- [Event(63, Level = EventLevel.Verbose, Message = Messages.IOEnqueue, Task = Tasks.ThreadPool, Opcode = Opcodes.IOEnqueue, Version = 0, Keywords = Keywords.ThreadingKeyword | Keywords.ThreadTransferKeyword)]
- private unsafe void ThreadPoolIOEnqueue(
- IntPtr NativeOverlapped,
- IntPtr Overlapped,
- bool MultiDequeues,
- ushort ClrInstanceID = DefaultClrInstanceId)
- {
- int multiDequeuesInt = Convert.ToInt32(MultiDequeues); // bool maps to "win:Boolean", a 4-byte boolean
- LogThreadPoolIOEnqueue(NativeOverlapped, Overlapped, MultiDequeues, ClrInstanceID);
- }
-
- // TODO: This event is fired for minor compat with CoreCLR in this case. Consider removing this method and use
- // FrameworkEventSource's thread transfer send/receive events instead at callers.
- [NonEvent]
- [MethodImpl(MethodImplOptions.NoInlining)]
- public void ThreadPoolIOEnqueue(RegisteredWaitHandle registeredWaitHandle)
- {
- if (IsEnabled(EventLevel.Verbose, Keywords.ThreadingKeyword | Keywords.ThreadTransferKeyword))
- {
- ThreadPoolIOEnqueue((IntPtr)registeredWaitHandle.GetHashCode(), IntPtr.Zero, registeredWaitHandle.Repeating);
- }
- }
-
- [Event(64, Level = EventLevel.Verbose, Message = Messages.IO, Task = Tasks.ThreadPool, Opcode = Opcodes.IODequeue, Version = 0, Keywords = Keywords.ThreadingKeyword | Keywords.ThreadTransferKeyword)]
- private unsafe void ThreadPoolIODequeue(
- IntPtr NativeOverlapped,
- IntPtr Overlapped,
- ushort ClrInstanceID = DefaultClrInstanceId)
- {
- LogThreadPoolIODequeue(NativeOverlapped, Overlapped, ClrInstanceID);
- }
-
- // TODO: This event is fired for minor compat with CoreCLR in this case. Consider removing this method and use
- // FrameworkEventSource's thread transfer send/receive events instead at callers.
- [NonEvent]
- [MethodImpl(MethodImplOptions.NoInlining)]
- public void ThreadPoolIODequeue(RegisteredWaitHandle registeredWaitHandle)
- {
- if (IsEnabled(EventLevel.Verbose, Keywords.ThreadingKeyword | Keywords.ThreadTransferKeyword))
- {
- ThreadPoolIODequeue((IntPtr)registeredWaitHandle.GetHashCode(), IntPtr.Zero);
- }
- }
-
- [Event(60, Level = EventLevel.Verbose, Message = Messages.WorkingThreadCount, Task = Tasks.ThreadPoolWorkingThreadCount, Opcode = EventOpcode.Start, Version = 0, Keywords = Keywords.ThreadingKeyword)]
- public unsafe void ThreadPoolWorkingThreadCount(uint Count, ushort ClrInstanceID = DefaultClrInstanceId)
- {
- if (!IsEnabled(EventLevel.Verbose, Keywords.ThreadingKeyword))
- {
- return;
- }
- LogThreadPoolWorkingThreadCount(Count, ClrInstanceID);
- }
-
- [NonEvent]
- [DllImport(RuntimeHelpers.QCall)]
- internal static extern void LogThreadPoolWorkerThreadStart(uint ActiveWorkerThreadCount, uint RetiredWorkerThreadCount, ushort ClrInstanceID);
-
- [NonEvent]
- [DllImport(RuntimeHelpers.QCall)]
- internal static extern void LogThreadPoolWorkerThreadStop(uint ActiveWorkerThreadCount, uint RetiredWorkerThreadCount, ushort ClrInstanceID);
-
- [NonEvent]
- [DllImport(RuntimeHelpers.QCall)]
- internal static extern void LogThreadPoolWorkerThreadWait(uint ActiveWorkerThreadCount, uint RetiredWorkerThreadCount, ushort ClrInstanceID);
-
- [NonEvent]
- [DllImport(RuntimeHelpers.QCall)]
- internal static extern void LogThreadPoolWorkerThreadAdjustmentSample(double Throughput, ushort ClrInstanceID);
-
- [NonEvent]
- [DllImport(RuntimeHelpers.QCall)]
- internal static extern void LogThreadPoolWorkerThreadAdjustmentAdjustment(double AverageThroughput, uint NewWorkerThreadCount, NativeRuntimeEventSource.ThreadAdjustmentReasonMap Reason, ushort ClrInstanceID);
-
- [NonEvent]
- [DllImport(RuntimeHelpers.QCall)]
- internal static extern void LogThreadPoolWorkerThreadAdjustmentStats(
- double Duration,
- double Throughput,
- double ThreadPoolWorkerThreadWait,
- double ThroughputWave,
- double ThroughputErrorEstimate,
- double AverageThroughputErrorEstimate,
- double ThroughputRatio,
- double Confidence,
- double NewControlSetting,
- ushort NewThreadWaveMagnitude,
- ushort ClrInstanceID);
-
- [NonEvent]
- [DllImport(RuntimeHelpers.QCall)]
- internal static extern void LogThreadPoolIOEnqueue(
- IntPtr NativeOverlapped,
- IntPtr Overlapped,
- bool MultiDequeues,
- ushort ClrInstanceID);
-
- [NonEvent]
- [DllImport(RuntimeHelpers.QCall)]
- internal static extern void LogThreadPoolIODequeue(
- IntPtr NativeOverlapped,
- IntPtr Overlapped,
- ushort ClrInstanceID);
-
- [NonEvent]
- [DllImport(RuntimeHelpers.QCall)]
- internal static extern void LogThreadPoolWorkingThreadCount(
- uint Count,
- ushort ClrInstanceID
- );
- }
-}
--- /dev/null
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+
+using System.Threading;
+using System.Diagnostics.Tracing;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+using Internal.Runtime.CompilerServices;
+
+namespace System.Diagnostics.Tracing
+{
+ // This is part of the NativeRuntimeEventsource, which is the managed version of the Microsoft-Windows-DotNETRuntime provider.
+ // It contains the runtime specific interop to native event sinks.
+ internal sealed partial class NativeRuntimeEventSource : EventSource
+ {
+ [NonEvent]
+ [DllImport(RuntimeHelpers.QCall)]
+ internal static extern void LogThreadPoolWorkerThreadStart(uint ActiveWorkerThreadCount, uint RetiredWorkerThreadCount, ushort ClrInstanceID);
+
+ [NonEvent]
+ [DllImport(RuntimeHelpers.QCall)]
+ internal static extern void LogThreadPoolWorkerThreadStop(uint ActiveWorkerThreadCount, uint RetiredWorkerThreadCount, ushort ClrInstanceID);
+
+ [NonEvent]
+ [DllImport(RuntimeHelpers.QCall)]
+ internal static extern void LogThreadPoolWorkerThreadWait(uint ActiveWorkerThreadCount, uint RetiredWorkerThreadCount, ushort ClrInstanceID);
+
+ [NonEvent]
+ [DllImport(RuntimeHelpers.QCall)]
+ internal static extern void LogThreadPoolWorkerThreadAdjustmentSample(double Throughput, ushort ClrInstanceID);
+
+ [NonEvent]
+ [DllImport(RuntimeHelpers.QCall)]
+ internal static extern void LogThreadPoolWorkerThreadAdjustmentAdjustment(double AverageThroughput, uint NewWorkerThreadCount, NativeRuntimeEventSource.ThreadAdjustmentReasonMap Reason, ushort ClrInstanceID);
+
+ [NonEvent]
+ [DllImport(RuntimeHelpers.QCall)]
+ internal static extern void LogThreadPoolWorkerThreadAdjustmentStats(
+ double Duration,
+ double Throughput,
+ double ThreadPoolWorkerThreadWait,
+ double ThroughputWave,
+ double ThroughputErrorEstimate,
+ double AverageThroughputErrorEstimate,
+ double ThroughputRatio,
+ double Confidence,
+ double NewControlSetting,
+ ushort NewThreadWaveMagnitude,
+ ushort ClrInstanceID);
+
+ [NonEvent]
+ [DllImport(RuntimeHelpers.QCall)]
+ internal static extern void LogThreadPoolIOEnqueue(
+ IntPtr NativeOverlapped,
+ IntPtr Overlapped,
+ bool MultiDequeues,
+ ushort ClrInstanceID);
+
+ [NonEvent]
+ [DllImport(RuntimeHelpers.QCall)]
+ internal static extern void LogThreadPoolIODequeue(
+ IntPtr NativeOverlapped,
+ IntPtr Overlapped,
+ ushort ClrInstanceID);
+
+ [NonEvent]
+ [DllImport(RuntimeHelpers.QCall)]
+ internal static extern void LogThreadPoolWorkingThreadCount(
+ uint Count,
+ ushort ClrInstanceID
+ );
+ }
+}
import os
import xml.dom.minidom as DOM
from utilities import open_for_update
+from genEventing import RuntimeFlavor
import argparse
import sys
########################################################################
# START CONFIGURATION
########################################################################
-manifestsToGenerate = {
+coreCLRManifestsToGenerate = {
"Microsoft-Windows-DotNETRuntime" : "NativeRuntimeEventSource.CoreCLR.cs"
}
+monoManifestsToGenerate = {
+ "Microsoft-Windows-DotNETRuntime" : "NativeRuntimeEventSource.Mono.cs"
+}
+
providerNameToClassNameMap = {
"Microsoft-Windows-DotNETRuntime" : "NativeRuntimeEventSource"
}
def getCSharpTypeFromManifestType(manifestType):
return manifestTypeToCSharpTypeMap[manifestType]
+def getManifestsToGenerate(runtimeFlavor):
+ if runtimeFlavor.coreclr:
+ return coreCLRManifestsToGenerate
+ elif runtimeFlavor.mono:
+ return monoManifestsToGenerate
+
def generateEvent(eventNode, providerNode, outputFile, stringTable):
# ThreadPool events are defined manually in NativeRuntimeEventSource.PortableThreadPool.cs
return stringTable
-def generateEventSources(manifestFullPath, intermediatesDirFullPath):
+def generateEventSources(manifestFullPath, intermediatesDirFullPath, runtimeFlavor):
# Open the manifest for reading.
manifest = DOM.parse(manifestFullPath)
stringTable = loadStringTable(manifest)
# Iterate over each provider that we want to generate an EventSource for.
- for providerName, outputFileName in manifestsToGenerate.items():
+ for providerName, outputFileName in getManifestsToGenerate(runtimeFlavor).items():
for node in manifest.getElementsByTagName("provider"):
if node.getAttribute("name") == providerName:
providerNode = node
help='full path to manifest containig the description of events')
required.add_argument('--intermediate', type=str, required=True,
help='full path to eventprovider intermediate directory')
+ required.add_argument('--runtimeflavor', type=str,default="CoreCLR",
+ help='runtime flavor')
args, unknown = parser.parse_known_args(argv)
if unknown:
print('Unknown argument(s): ', ', '.join(unknown))
manifestFullPath = args.man
intermediatesDirFullPath = args.intermediate
+ runtimeFlavor = RuntimeFlavor(args.runtimeflavor)
# Ensure the intermediates directory exists.
try:
raise
# Generate event sources.
- generateEventSources(manifestFullPath, intermediatesDirFullPath)
+ generateEventSources(manifestFullPath, intermediatesDirFullPath, runtimeFlavor)
return 0
if __name__ == '__main__':
<Compile Include="$(MSBuildThisFileDirectory)System\Threading\ThreadPool.Portable.cs" Condition="'$(FeatureCoreCLR)' != 'true'" />
<Compile Include="$(MSBuildThisFileDirectory)System\Threading\ThreadPoolBoundHandle.PlatformNotSupported.cs" Condition="'$(FeatureCoreCLR)' != 'true'" />
<Compile Include="$(MSBuildThisFileDirectory)System\Threading\PortableThreadPool.cs" />
- <Compile Include="$(MSBuildThisFileDirectory)System\Threading\NativeRuntimeEventSource.PortableThreadPool.cs" Condition="'$(FeatureCoreCLR)' != 'true'" />
+ <Compile Include="$(MSBuildThisFileDirectory)System\Threading\NativeRuntimeEventSource.PortableThreadPool.cs" Condition="'$(FeatureCoreCLR)' != 'true' and '$(FeatureMono)' != 'true'" />
+ <Compile Include="$(MSBuildThisFileDirectory)System\Threading\NativeRuntimeEventSource.PortableThreadPool.NativeSinks.cs" Condition="'$(FeatureCoreCLR)' == 'true' or '$(FeatureMono)' == 'true'"/>
<Compile Include="$(MSBuildThisFileDirectory)System\Threading\PortableThreadPool.GateThread.cs" />
<Compile Include="$(MSBuildThisFileDirectory)System\Threading\PortableThreadPool.HillClimbing.cs" />
<Compile Include="$(MSBuildThisFileDirectory)System\Threading\PortableThreadPool.HillClimbing.Complex.cs" />
/// Microsoft-Windows-DotNETRuntime provider and will throw a NotImplementedException without hand-written overloads of the Events.
/// To have a runtime event be fired from the managed code, you need to add a managed definition for that event
/// and call into the native runtime that invoke the appropriate native sinks for the platform (i.e. ETW, EventPipe, LTTng).
- /// To see some examples of this, refer to NativeRuntimeEventSource.PortableThreadPool.CoreClr.cs and NativeRuntimeEventSource.PortableThreadPool.cs.
+ /// To see some examples of this, refer to NativeRuntimeEventSource.PortableThreadPool.NativeSinks.cs and NativeRuntimeEventSource.PortableThreadPool.cs.
/// Then, modify genRuntimeEventSources.py to skip over the event so that it doesn't generate the dummy method.
/// </summary>
[EventSource(Guid = "E13C0D23-CCBC-4E12-931B-D9CC2EEE27E4", Name = EventSourceName)]
--- /dev/null
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+
+using System.Threading;
+using System.Diagnostics.Tracing;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+using Internal.Runtime.CompilerServices;
+
+namespace System.Diagnostics.Tracing
+{
+ // This is part of the NativeRuntimeEventsource, which is the managed version of the Microsoft-Windows-DotNETRuntime provider.
+ // It contains the handwritten implementation of the ThreadPool events.
+ // The events here do not call into the typical WriteEvent* APIs unlike most EventSources because that results in the
+ // events to be forwarded to EventListeners twice, once directly from the managed WriteEvent API, and another time
+ // from the mechanism in NativeRuntimeEventSource.ProcessEvents that forwards native runtime events to EventListeners.
+ // To prevent this, these events call directly into QCalls provided by the runtime (refer to NativeRuntimeEventSource.cs) which call
+ // FireEtw* methods auto-generated from ClrEtwAll.man. This ensures that corresponding event sinks are being used
+ // for the native platform.
+ // For implementation of these events not supporting native sinks, refer to NativeRuntimeEventSource.PortableThreadPool.cs.
+ internal sealed partial class NativeRuntimeEventSource : EventSource
+ {
+ // This value does not seem to be used, leaving it as zero for now. It may be useful for a scenario that may involve
+ // multiple instances of the runtime within the same process, but then it seems unlikely that both instances' thread
+ // pools would be in moderate use.
+ private const ushort DefaultClrInstanceId = 0;
+
+ private static class Messages
+ {
+ public const string WorkerThread = "ActiveWorkerThreadCount={0};\nRetiredWorkerThreadCount={1};\nClrInstanceID={2}";
+ public const string WorkerThreadAdjustmentSample = "Throughput={0};\nClrInstanceID={1}";
+ public const string WorkerThreadAdjustmentAdjustment = "AverageThroughput={0};\nNewWorkerThreadCount={1};\nReason={2};\nClrInstanceID={3}";
+ public const string WorkerThreadAdjustmentStats = "Duration={0};\nThroughput={1};\nThreadWave={2};\nThroughputWave={3};\nThroughputErrorEstimate={4};\nAverageThroughputErrorEstimate={5};\nThroughputRatio={6};\nConfidence={7};\nNewControlSetting={8};\nNewThreadWaveMagnitude={9};\nClrInstanceID={10}";
+ public const string IOEnqueue = "NativeOverlapped={0};\nOverlapped={1};\nMultiDequeues={2};\nClrInstanceID={3}";
+ public const string IO = "NativeOverlapped={0};\nOverlapped={1};\nClrInstanceID={2}";
+ public const string WorkingThreadCount = "Count={0};\nClrInstanceID={1}";
+ }
+
+ // The task definitions for the ETW manifest
+ public static class Tasks // this name and visibility is important for EventSource
+ {
+ public const EventTask ThreadPoolWorkerThread = (EventTask)16;
+ public const EventTask ThreadPoolWorkerThreadAdjustment = (EventTask)18;
+ public const EventTask ThreadPool = (EventTask)23;
+ public const EventTask ThreadPoolWorkingThreadCount = (EventTask)22;
+ }
+
+ public static class Opcodes // this name and visibility is important for EventSource
+ {
+ public const EventOpcode IOEnqueue = (EventOpcode)13;
+ public const EventOpcode IODequeue = (EventOpcode)14;
+ public const EventOpcode Wait = (EventOpcode)90;
+ public const EventOpcode Sample = (EventOpcode)100;
+ public const EventOpcode Adjustment = (EventOpcode)101;
+ public const EventOpcode Stats = (EventOpcode)102;
+ }
+
+ public enum ThreadAdjustmentReasonMap : uint
+ {
+ Warmup,
+ Initializing,
+ RandomMove,
+ ClimbingMove,
+ ChangePoint,
+ Stabilizing,
+ Starvation,
+ ThreadTimedOut
+ }
+
+ [Event(50, Level = EventLevel.Informational, Message = Messages.WorkerThread, Task = Tasks.ThreadPoolWorkerThread, Opcode = EventOpcode.Start, Version = 0, Keywords = Keywords.ThreadingKeyword)]
+ public unsafe void ThreadPoolWorkerThreadStart(
+ uint ActiveWorkerThreadCount,
+ uint RetiredWorkerThreadCount = 0,
+ ushort ClrInstanceID = DefaultClrInstanceId)
+ {
+ if (IsEnabled(EventLevel.Informational, Keywords.ThreadingKeyword))
+ {
+ LogThreadPoolWorkerThreadStart(ActiveWorkerThreadCount, RetiredWorkerThreadCount, ClrInstanceID);
+ }
+ }
+
+ [Event(51, Level = EventLevel.Informational, Message = Messages.WorkerThread, Task = Tasks.ThreadPoolWorkerThread, Opcode = EventOpcode.Stop, Version = 0, Keywords = Keywords.ThreadingKeyword)]
+ public void ThreadPoolWorkerThreadStop(
+ uint ActiveWorkerThreadCount,
+ uint RetiredWorkerThreadCount = 0,
+ ushort ClrInstanceID = DefaultClrInstanceId)
+ {
+ if (IsEnabled(EventLevel.Informational, Keywords.ThreadingKeyword))
+ {
+ LogThreadPoolWorkerThreadStop(ActiveWorkerThreadCount, RetiredWorkerThreadCount, ClrInstanceID);
+ }
+ }
+
+ [Event(57, Level = EventLevel.Informational, Message = Messages.WorkerThread, Task = Tasks.ThreadPoolWorkerThread, Opcode = Opcodes.Wait, Version = 0, Keywords = Keywords.ThreadingKeyword)]
+ [MethodImpl(MethodImplOptions.NoInlining)]
+ public void ThreadPoolWorkerThreadWait(
+ uint ActiveWorkerThreadCount,
+ uint RetiredWorkerThreadCount = 0,
+ ushort ClrInstanceID = DefaultClrInstanceId)
+ {
+ if (IsEnabled(EventLevel.Informational, Keywords.ThreadingKeyword))
+ {
+ LogThreadPoolWorkerThreadWait(ActiveWorkerThreadCount, RetiredWorkerThreadCount, ClrInstanceID);
+ }
+ }
+
+ [Event(54, Level = EventLevel.Informational, Message = Messages.WorkerThreadAdjustmentSample, Task = Tasks.ThreadPoolWorkerThreadAdjustment, Opcode = Opcodes.Sample, Version = 0, Keywords = Keywords.ThreadingKeyword)]
+ public unsafe void ThreadPoolWorkerThreadAdjustmentSample(
+ double Throughput,
+ ushort ClrInstanceID = DefaultClrInstanceId)
+ {
+ if (!IsEnabled(EventLevel.Informational, Keywords.ThreadingKeyword))
+ {
+ return;
+ }
+ LogThreadPoolWorkerThreadAdjustmentSample(Throughput, ClrInstanceID);
+ }
+
+ [Event(55, Level = EventLevel.Informational, Message = Messages.WorkerThreadAdjustmentAdjustment, Task = Tasks.ThreadPoolWorkerThreadAdjustment, Opcode = Opcodes.Adjustment, Version = 0, Keywords = Keywords.ThreadingKeyword)]
+ public unsafe void ThreadPoolWorkerThreadAdjustmentAdjustment(
+ double AverageThroughput,
+ uint NewWorkerThreadCount,
+ ThreadAdjustmentReasonMap Reason,
+ ushort ClrInstanceID = DefaultClrInstanceId)
+ {
+ if (!IsEnabled(EventLevel.Informational, Keywords.ThreadingKeyword))
+ {
+ return;
+ }
+ LogThreadPoolWorkerThreadAdjustmentAdjustment(AverageThroughput, NewWorkerThreadCount, Reason, ClrInstanceID);
+ }
+
+ [Event(56, Level = EventLevel.Verbose, Message = Messages.WorkerThreadAdjustmentStats, Task = Tasks.ThreadPoolWorkerThreadAdjustment, Opcode = Opcodes.Stats, Version = 0, Keywords = Keywords.ThreadingKeyword)]
+ public unsafe void ThreadPoolWorkerThreadAdjustmentStats(
+ double Duration,
+ double Throughput,
+ double ThreadWave,
+ double ThroughputWave,
+ double ThroughputErrorEstimate,
+ double AverageThroughputErrorEstimate,
+ double ThroughputRatio,
+ double Confidence,
+ double NewControlSetting,
+ ushort NewThreadWaveMagnitude,
+ ushort ClrInstanceID = DefaultClrInstanceId)
+ {
+ if (!IsEnabled(EventLevel.Verbose, Keywords.ThreadingKeyword))
+ {
+ return;
+ }
+ LogThreadPoolWorkerThreadAdjustmentStats(Duration, Throughput, ThreadWave, ThroughputWave, ThroughputErrorEstimate, AverageThroughputErrorEstimate, ThroughputRatio, Confidence, NewControlSetting, NewThreadWaveMagnitude, ClrInstanceID);
+ }
+
+ [Event(63, Level = EventLevel.Verbose, Message = Messages.IOEnqueue, Task = Tasks.ThreadPool, Opcode = Opcodes.IOEnqueue, Version = 0, Keywords = Keywords.ThreadingKeyword | Keywords.ThreadTransferKeyword)]
+ private unsafe void ThreadPoolIOEnqueue(
+ IntPtr NativeOverlapped,
+ IntPtr Overlapped,
+ bool MultiDequeues,
+ ushort ClrInstanceID = DefaultClrInstanceId)
+ {
+ int multiDequeuesInt = Convert.ToInt32(MultiDequeues); // bool maps to "win:Boolean", a 4-byte boolean
+ LogThreadPoolIOEnqueue(NativeOverlapped, Overlapped, MultiDequeues, ClrInstanceID);
+ }
+
+ // TODO: This event is fired for minor compat with CoreCLR in this case. Consider removing this method and use
+ // FrameworkEventSource's thread transfer send/receive events instead at callers.
+ [NonEvent]
+ [MethodImpl(MethodImplOptions.NoInlining)]
+ public void ThreadPoolIOEnqueue(RegisteredWaitHandle registeredWaitHandle)
+ {
+ if (IsEnabled(EventLevel.Verbose, Keywords.ThreadingKeyword | Keywords.ThreadTransferKeyword))
+ {
+ ThreadPoolIOEnqueue((IntPtr)registeredWaitHandle.GetHashCode(), IntPtr.Zero, registeredWaitHandle.Repeating);
+ }
+ }
+
+ [Event(64, Level = EventLevel.Verbose, Message = Messages.IO, Task = Tasks.ThreadPool, Opcode = Opcodes.IODequeue, Version = 0, Keywords = Keywords.ThreadingKeyword | Keywords.ThreadTransferKeyword)]
+ private unsafe void ThreadPoolIODequeue(
+ IntPtr NativeOverlapped,
+ IntPtr Overlapped,
+ ushort ClrInstanceID = DefaultClrInstanceId)
+ {
+ LogThreadPoolIODequeue(NativeOverlapped, Overlapped, ClrInstanceID);
+ }
+
+ // TODO: This event is fired for minor compat with CoreCLR in this case. Consider removing this method and use
+ // FrameworkEventSource's thread transfer send/receive events instead at callers.
+ [NonEvent]
+ [MethodImpl(MethodImplOptions.NoInlining)]
+ public void ThreadPoolIODequeue(RegisteredWaitHandle registeredWaitHandle)
+ {
+ if (IsEnabled(EventLevel.Verbose, Keywords.ThreadingKeyword | Keywords.ThreadTransferKeyword))
+ {
+ ThreadPoolIODequeue((IntPtr)registeredWaitHandle.GetHashCode(), IntPtr.Zero);
+ }
+ }
+
+ [Event(60, Level = EventLevel.Verbose, Message = Messages.WorkingThreadCount, Task = Tasks.ThreadPoolWorkingThreadCount, Opcode = EventOpcode.Start, Version = 0, Keywords = Keywords.ThreadingKeyword)]
+ public unsafe void ThreadPoolWorkingThreadCount(uint Count, ushort ClrInstanceID = DefaultClrInstanceId)
+ {
+ if (!IsEnabled(EventLevel.Verbose, Keywords.ThreadingKeyword))
+ {
+ return;
+ }
+ LogThreadPoolWorkingThreadCount(Count, ClrInstanceID);
+ }
+ }
+}
namespace System.Diagnostics.Tracing
{
- // This is part of the NativeRuntimeEventsource for Mono|CoreRT, which is the managed version of the Microsoft-Windows-DotNETRuntime provider.
- // and contains the implementation of ThreadPool events. Since file is shared between Mono|CoreRT it is kept in shared part of SPC.
- // To look at CoreCLR implementation of these events, refer to NativeRuntimeEventSource.PortableThreadPool.CoreCLR.cs.
+ // This is part of the NativeRuntimeEventsource, which is the managed version of the Microsoft-Windows-DotNETRuntime provider.
+ // Contains the implementation of ThreadPool events. This implemention is used by runtime not supporting NativeRuntimeEventSource.PortableThreadPool.NativeSinks.cs.
internal sealed partial class NativeRuntimeEventSource : EventSource
{
- // On Mono|CoreRT, we don't have these keywords defined from the genRuntimeEventSources.py, so we need to manually define them here.
+ // We don't have these keywords defined from the genRuntimeEventSources.py, so we need to manually define them here.
public static class Keywords
{
public const EventKeywords ThreadingKeyword = (EventKeywords)0x10000;
<DefineConstants>$(DefineConstants);MONO_FEATURE_SRE</DefineConstants>
+ <FeatureMono>true</FeatureMono>
<FeatureManagedEtwChannels>true</FeatureManagedEtwChannels>
<FeatureManagedEtw>true</FeatureManagedEtw>
<FeaturePortableTimer Condition="'$(TargetsBrowser)' != 'true'">true</FeaturePortableTimer>
<Compile Include="$(BclSourcesRoot)\System\Diagnostics\StackFrame.Mono.cs" />
<Compile Include="$(BclSourcesRoot)\System\Diagnostics\StackTrace.Mono.cs" />
<Compile Include="$(BclSourcesRoot)\System\Diagnostics\Tracing\EventPipe.Mono.cs" />
+ <Compile Include="$(BclSourcesRoot)\System\Diagnostics\Tracing\NativeRuntimeEventSource.PortableThreadPool.NativeSinks.Mono.cs" Condition="'$(FeaturePortableThreadPool)' == 'true'" />
<Compile Include="$(BclSourcesRoot)\System\IO\Stream.Mono.cs" />
<Compile Include="$(BclSourcesRoot)\System\IO\FileLoadException.Mono.cs" />
<Compile Include="$(BclSourcesRoot)\System\Reflection\Assembly.Mono.cs" />
SkipUnchangedFiles="true" />
</Target>
+ <!-- Setup eventing file generation -->
+ <ItemGroup>
+ <EventingGenerationScript Include="$(CoreClrProjectRoot)scripts/genRuntimeEventSources.py" />
+ <EventManifestFile Include="$(CoreClrProjectRoot)vm/ClrEtwAll.man" />
+ <EventingSourceFile Include="$(IntermediateOutputPath)..\..\..\Eventing\$(TargetArchitecture)\$(Configuration)\NativeRuntimeEventSource.Mono.cs" Condition="'$(FeaturePerfTracing)' == 'true' ">
+ <Link>src\System\Diagnostics\Eventing\Generated\NativeRuntimeEventSource.Mono.cs</Link>
+ </EventingSourceFile>
+ <Compile Include="@(EventingSourceFile)" />
+ </ItemGroup>
+
+ <Target Name="GenerateEventingFiles"
+ Inputs="@(EventingGenerationScript);@(EventManifestFile)"
+ Outputs="@(EventingSourceFile)"
+ DependsOnTargets="FindPython"
+ BeforeTargets="BeforeCompile">
+
+ <Error Condition="'$(PYTHON)' == ''" Text="Unable to locate Python. NativeRuntimeEventSource.Mono.cs cannot be generated without Python installed on the machine. Either install Python in your path or point to it with the PYTHON environment variable." />
+ <PropertyGroup>
+ <_PythonWarningParameter>-Wall</_PythonWarningParameter>
+ <_PythonWarningParameter Condition="'$(MSBuildTreatWarningsAsErrors)' == 'true'">$(_PythonWarningParameter) -Werror</_PythonWarningParameter>
+ <_EventingSourceFileDirectory>%(EventingSourceFile.RootDir)%(EventingSourceFile.Directory)</_EventingSourceFileDirectory>
+ <_EventingSourceFileDirectory Condition="HasTrailingSlash('$(_EventingSourceFileDirectory)')">$(_EventingSourceFileDirectory.TrimEnd('\'))</_EventingSourceFileDirectory>
+ </PropertyGroup>
+
+ <Exec Command="$(PYTHON) -B $(_PythonWarningParameter) "@(EventingGenerationScript)" --man "@(EventManifestFile)" --intermediate "$(_EventingSourceFileDirectory)" --runtimeflavor mono" />
+
+ <ItemGroup>
+ <FileWrites Include="@(EventingSourceFile)" />
+ </ItemGroup>
+ </Target>
+
</Project>
--- /dev/null
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+
+using System.Threading;
+using System.Diagnostics.Tracing;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+using Internal.Runtime.CompilerServices;
+
+namespace System.Diagnostics.Tracing
+{
+ // This is part of the NativeRuntimeEventsource, which is the managed version of the Microsoft-Windows-DotNETRuntime provider.
+ // It contains the runtime specific interop to native event sinks.
+ internal sealed partial class NativeRuntimeEventSource : EventSource
+ {
+ [NonEvent]
+ [MethodImplAttribute(MethodImplOptions.InternalCall)]
+ internal static extern void LogThreadPoolWorkerThreadStart(uint ActiveWorkerThreadCount, uint RetiredWorkerThreadCount, ushort ClrInstanceID);
+
+ [NonEvent]
+ [MethodImplAttribute(MethodImplOptions.InternalCall)]
+ internal static extern void LogThreadPoolWorkerThreadStop(uint ActiveWorkerThreadCount, uint RetiredWorkerThreadCount, ushort ClrInstanceID);
+
+ [NonEvent]
+ [MethodImplAttribute(MethodImplOptions.InternalCall)]
+ internal static extern void LogThreadPoolWorkerThreadWait(uint ActiveWorkerThreadCount, uint RetiredWorkerThreadCount, ushort ClrInstanceID);
+
+ [NonEvent]
+ [MethodImplAttribute(MethodImplOptions.InternalCall)]
+ internal static extern void LogThreadPoolWorkerThreadAdjustmentSample(double Throughput, ushort ClrInstanceID);
+
+ [NonEvent]
+ [MethodImplAttribute(MethodImplOptions.InternalCall)]
+ internal static extern void LogThreadPoolWorkerThreadAdjustmentAdjustment(double AverageThroughput, uint NewWorkerThreadCount, NativeRuntimeEventSource.ThreadAdjustmentReasonMap Reason, ushort ClrInstanceID);
+
+ [NonEvent]
+ [MethodImplAttribute(MethodImplOptions.InternalCall)]
+ internal static extern void LogThreadPoolWorkerThreadAdjustmentStats(
+ double Duration,
+ double Throughput,
+ double ThreadPoolWorkerThreadWait,
+ double ThroughputWave,
+ double ThroughputErrorEstimate,
+ double AverageThroughputErrorEstimate,
+ double ThroughputRatio,
+ double Confidence,
+ double NewControlSetting,
+ ushort NewThreadWaveMagnitude,
+ ushort ClrInstanceID);
+
+ [NonEvent]
+ [MethodImplAttribute(MethodImplOptions.InternalCall)]
+ internal static extern void LogThreadPoolIOEnqueue(
+ IntPtr NativeOverlapped,
+ IntPtr Overlapped,
+ bool MultiDequeues,
+ ushort ClrInstanceID);
+
+ [NonEvent]
+ [MethodImplAttribute(MethodImplOptions.InternalCall)]
+ internal static extern void LogThreadPoolIODequeue(
+ IntPtr NativeOverlapped,
+ IntPtr Overlapped,
+ ushort ClrInstanceID);
+
+ [NonEvent]
+ [MethodImplAttribute(MethodImplOptions.InternalCall)]
+ internal static extern void LogThreadPoolWorkingThreadCount(
+ uint Count,
+ ushort ClrInstanceID
+ );
+ }
+}
static bool
event_pipe_stub_write_event_ee_startup_start (void);
+static bool
+event_pipe_stub_write_event_threadpool_worker_thread_start (
+ uint32_t active_thread_count,
+ uint32_t retired_worker_thread_count,
+ uint16_t clr_instance_id);
+
+static bool
+event_pipe_stub_write_event_threadpool_worker_thread_stop (
+ uint32_t active_thread_count,
+ uint32_t retired_worker_thread_count,
+ uint16_t clr_instance_id);
+
+static bool
+event_pipe_stub_write_event_threadpool_worker_thread_wait (
+ uint32_t active_thread_count,
+ uint32_t retired_worker_thread_count,
+ uint16_t clr_instance_id);
+
+static bool
+event_pipe_stub_write_event_threadpool_worker_thread_adjustment_sample (
+ double throughput,
+ uint16_t clr_instance_id);
+
+static bool
+event_pipe_stub_write_event_threadpool_worker_thread_adjustment_adjustment (
+ double average_throughput,
+ uint32_t networker_thread_count,
+ /*NativeRuntimeEventSource.ThreadAdjustmentReasonMap*/ int32_t reason,
+ uint16_t clr_instance_id);
+
+static bool
+event_pipe_stub_write_event_threadpool_worker_thread_adjustment_stats (
+ double duration,
+ double throughput,
+ double threadpool_worker_thread_wait,
+ double throughput_wave,
+ double throughput_error_estimate,
+ double average_throughput_error_estimate,
+ double throughput_ratio,
+ double confidence,
+ double new_control_setting,
+ uint16_t new_thread_wave_magnitude,
+ uint16_t clr_instance_id);
+
+static bool
+event_pipe_stub_write_event_threadpool_io_enqueue (
+ intptr_t native_overlapped,
+ intptr_t overlapped,
+ bool multi_dequeues,
+ uint16_t clr_instance_id);
+
+static bool
+event_pipe_stub_write_event_threadpool_io_dequeue (
+ intptr_t native_overlapped,
+ intptr_t overlapped,
+ uint16_t clr_instance_id);
+
+static bool
+event_pipe_stub_write_event_threadpool_working_thread_count (
+ uint16_t count,
+ uint16_t clr_instance_id);
+
MonoComponentEventPipe *
component_event_pipe_stub_init (void);
&event_pipe_stub_provider_add_event,
&event_pipe_stub_get_session_info,
&event_pipe_stub_thread_ctrl_activity_id,
- &event_pipe_stub_write_event_ee_startup_start
+ &event_pipe_stub_write_event_ee_startup_start,
+ &event_pipe_stub_write_event_threadpool_worker_thread_start,
+ &event_pipe_stub_write_event_threadpool_worker_thread_stop,
+ &event_pipe_stub_write_event_threadpool_worker_thread_wait,
+ &event_pipe_stub_write_event_threadpool_worker_thread_adjustment_sample,
+ &event_pipe_stub_write_event_threadpool_worker_thread_adjustment_adjustment,
+ &event_pipe_stub_write_event_threadpool_worker_thread_adjustment_stats,
+ &event_pipe_stub_write_event_threadpool_io_enqueue,
+ &event_pipe_stub_write_event_threadpool_io_dequeue,
+ &event_pipe_stub_write_event_threadpool_working_thread_count
};
static bool
return true;
}
+static bool
+event_pipe_stub_write_event_threadpool_worker_thread_start (
+ uint32_t active_thread_count,
+ uint32_t retired_worker_thread_count,
+ uint16_t clr_instance_id)
+{
+ return true;
+}
+
+static bool
+event_pipe_stub_write_event_threadpool_worker_thread_stop (
+ uint32_t active_thread_count,
+ uint32_t retired_worker_thread_count,
+ uint16_t clr_instance_id)
+{
+ return true;
+}
+
+static bool
+event_pipe_stub_write_event_threadpool_worker_thread_wait (
+ uint32_t active_thread_count,
+ uint32_t retired_worker_thread_count,
+ uint16_t clr_instance_id)
+{
+ return true;
+}
+
+static bool
+event_pipe_stub_write_event_threadpool_worker_thread_adjustment_sample (
+ double throughput,
+ uint16_t clr_instance_id)
+{
+ return true;
+}
+
+static bool
+event_pipe_stub_write_event_threadpool_worker_thread_adjustment_adjustment (
+ double average_throughput,
+ uint32_t networker_thread_count,
+ /*NativeRuntimeEventSource.ThreadAdjustmentReasonMap*/ int32_t reason,
+ uint16_t clr_instance_id)
+{
+ return true;
+}
+
+static bool
+event_pipe_stub_write_event_threadpool_worker_thread_adjustment_stats (
+ double duration,
+ double throughput,
+ double threadpool_worker_thread_wait,
+ double throughput_wave,
+ double throughput_error_estimate,
+ double average_throughput_error_estimate,
+ double throughput_ratio,
+ double confidence,
+ double new_control_setting,
+ uint16_t new_thread_wave_magnitude,
+ uint16_t clr_instance_id)
+{
+ return true;
+}
+
+static bool
+event_pipe_stub_write_event_threadpool_io_enqueue (
+ intptr_t native_overlapped,
+ intptr_t overlapped,
+ bool multi_dequeues,
+ uint16_t clr_instance_id)
+{
+ return true;
+}
+
+static bool
+event_pipe_stub_write_event_threadpool_io_dequeue (
+ intptr_t native_overlapped,
+ intptr_t overlapped,
+ uint16_t clr_instance_id)
+{
+ return true;
+}
+
+static bool
+event_pipe_stub_write_event_threadpool_working_thread_count (
+ uint16_t count,
+ uint16_t clr_instance_id)
+{
+ return true;
+}
+
MonoComponentEventPipe *
component_event_pipe_stub_init (void)
{
&ep_provider_add_event,
&event_pipe_get_session_info,
&event_pipe_thread_ctrl_activity_id,
- &ep_rt_mono_write_event_ee_startup_start
+ &ep_rt_mono_write_event_ee_startup_start,
+ &ep_rt_write_event_threadpool_worker_thread_start,
+ &ep_rt_write_event_threadpool_worker_thread_stop,
+ &ep_rt_write_event_threadpool_worker_thread_wait,
+ &ep_rt_write_event_threadpool_worker_thread_adjustment_sample,
+ &ep_rt_write_event_threadpool_worker_thread_adjustment_adjustment,
+ &ep_rt_write_event_threadpool_worker_thread_adjustment_stats,
+ &ep_rt_write_event_threadpool_io_enqueue,
+ &ep_rt_write_event_threadpool_io_dequeue,
+ &ep_rt_write_event_threadpool_working_thread_count
};
static bool
typedef bool
(*event_pipe_component_write_event_ee_startup_start_func)(void);
+typedef bool
+(*event_pipe_component_write_event_threadpool_worker_thread_start_func)(
+ uint32_t active_thread_count,
+ uint32_t retired_worker_thread_count,
+ uint16_t clr_instance_id);
+
+typedef bool
+(*event_pipe_component_write_event_threadpool_worker_thread_stop_func)(
+ uint32_t active_thread_count,
+ uint32_t retired_worker_thread_count,
+ uint16_t clr_instance_id);
+
+typedef bool
+(*event_pipe_component_write_event_threadpool_worker_thread_wait_func)(
+ uint32_t active_thread_count,
+ uint32_t retired_worker_thread_count,
+ uint16_t clr_instance_id);
+
+typedef bool
+(*event_pipe_component_write_event_threadpool_worker_thread_adjustment_sample_func)(
+ double throughput,
+ uint16_t clr_instance_id);
+
+typedef bool
+(*event_pipe_component_write_event_threadpool_worker_thread_adjustment_adjustment_func)(
+ double average_throughput,
+ uint32_t networker_thread_count,
+ /*NativeRuntimeEventSource.ThreadAdjustmentReasonMap*/ int32_t reason,
+ uint16_t clr_instance_id);
+
+typedef bool
+(*event_pipe_component_write_event_threadpool_worker_thread_adjustment_stats_func)(
+ double duration,
+ double throughput,
+ double threadpool_worker_thread_wait,
+ double throughput_wave,
+ double throughput_error_estimate,
+ double average_throughput_error_estimate,
+ double throughput_ratio,
+ double confidence,
+ double new_control_setting,
+ uint16_t new_thread_wave_magnitude,
+ uint16_t clr_instance_id);
+
+typedef bool
+(*event_pipe_component_write_event_threadpool_io_enqueue_func)(
+ intptr_t native_overlapped,
+ intptr_t overlapped,
+ bool multi_dequeues,
+ uint16_t clr_instance_id);
+
+typedef bool
+(*event_pipe_component_write_event_threadpool_io_dequeue_func)(
+ intptr_t native_overlapped,
+ intptr_t overlapped,
+ uint16_t clr_instance_id);
+
+typedef bool
+(*event_pipe_component_write_event_threadpool_working_thread_count_func)(
+ uint16_t count,
+ uint16_t clr_instance_id);
+
/*
* MonoComponentEventPipe function table.
*/
event_pipe_component_get_session_info_func get_session_info;
event_pipe_component_thread_ctrl_activity_id_func thread_ctrl_activity_id;
event_pipe_component_write_event_ee_startup_start_func write_event_ee_startup_start;
+ event_pipe_component_write_event_threadpool_worker_thread_start_func write_event_threadpool_worker_thread_start;
+ event_pipe_component_write_event_threadpool_worker_thread_stop_func write_event_threadpool_worker_thread_stop;
+ event_pipe_component_write_event_threadpool_worker_thread_wait_func write_event_threadpool_worker_thread_wait;
+ event_pipe_component_write_event_threadpool_worker_thread_adjustment_sample_func write_event_threadpool_worker_thread_adjustment_sample;
+ event_pipe_component_write_event_threadpool_worker_thread_adjustment_adjustment_func write_event_threadpool_worker_thread_adjustment_adjustment;
+ event_pipe_component_write_event_threadpool_worker_thread_adjustment_stats_func write_event_threadpool_worker_thread_adjustment_stats;
+ event_pipe_component_write_event_threadpool_io_enqueue_func write_event_threadpool_io_enqueue;
+ event_pipe_component_write_event_threadpool_io_dequeue_func write_event_threadpool_io_dequeue;
+ event_pipe_component_write_event_threadpool_working_thread_count_func write_event_threadpool_working_thread_count;
} MonoComponentEventPipe;
MONO_COMPONENT_EXPORT_ENTRYPOINT
return true;
}
+bool
+ep_rt_write_event_threadpool_worker_thread_start (
+ uint32_t active_thread_count,
+ uint32_t retired_worker_thread_count,
+ uint16_t clr_instance_id)
+{
+ return FireEtwThreadPoolWorkerThreadStart (
+ active_thread_count,
+ retired_worker_thread_count,
+ clr_instance_id,
+ NULL,
+ NULL) == 0 ? true : false;
+}
+
+bool
+ep_rt_write_event_threadpool_worker_thread_stop (
+ uint32_t active_thread_count,
+ uint32_t retired_worker_thread_count,
+ uint16_t clr_instance_id)
+{
+ return FireEtwThreadPoolWorkerThreadStop (
+ active_thread_count,
+ retired_worker_thread_count,
+ clr_instance_id,
+ NULL,
+ NULL) == 0 ? true : false;
+}
+
+bool
+ep_rt_write_event_threadpool_worker_thread_wait (
+ uint32_t active_thread_count,
+ uint32_t retired_worker_thread_count,
+ uint16_t clr_instance_id)
+{
+ return FireEtwThreadPoolWorkerThreadWait (
+ active_thread_count,
+ retired_worker_thread_count,
+ clr_instance_id,
+ NULL,
+ NULL) == 0 ? true : false;
+}
+
+bool
+ep_rt_write_event_threadpool_worker_thread_adjustment_sample (
+ double throughput,
+ uint16_t clr_instance_id)
+{
+ return FireEtwThreadPoolWorkerThreadAdjustmentSample (
+ throughput,
+ clr_instance_id,
+ NULL,
+ NULL) == 0 ? true : false;
+}
+
+bool
+ep_rt_write_event_threadpool_worker_thread_adjustment_adjustment (
+ double average_throughput,
+ uint32_t networker_thread_count,
+ /*NativeRuntimeEventSource.ThreadAdjustmentReasonMap*/ int32_t reason,
+ uint16_t clr_instance_id)
+{
+ return FireEtwThreadPoolWorkerThreadAdjustmentAdjustment (
+ average_throughput,
+ networker_thread_count,
+ reason,
+ clr_instance_id,
+ NULL,
+ NULL) == 0 ? true : false;
+}
+
+bool
+ep_rt_write_event_threadpool_worker_thread_adjustment_stats (
+ double duration,
+ double throughput,
+ double threadpool_worker_thread_wait,
+ double throughput_wave,
+ double throughput_error_estimate,
+ double average_throughput_error_estimate,
+ double throughput_ratio,
+ double confidence,
+ double new_control_setting,
+ uint16_t new_thread_wave_magnitude,
+ uint16_t clr_instance_id)
+{
+ return FireEtwThreadPoolWorkerThreadAdjustmentStats (
+ duration,
+ throughput,
+ threadpool_worker_thread_wait,
+ throughput_wave,
+ throughput_error_estimate,
+ average_throughput_error_estimate,
+ throughput_ratio,
+ confidence,
+ new_control_setting,
+ new_thread_wave_magnitude,
+ clr_instance_id,
+ NULL,
+ NULL) == 0 ? true : false;
+}
+
+bool
+ep_rt_write_event_threadpool_io_enqueue (
+ intptr_t native_overlapped,
+ intptr_t overlapped,
+ bool multi_dequeues,
+ uint16_t clr_instance_id)
+{
+ return FireEtwThreadPoolIOEnqueue (
+ (const void *)native_overlapped,
+ (const void *)overlapped,
+ multi_dequeues,
+ clr_instance_id,
+ NULL,
+ NULL) == 0 ? true : false;
+}
+
+bool
+ep_rt_write_event_threadpool_io_dequeue (
+ intptr_t native_overlapped,
+ intptr_t overlapped,
+ uint16_t clr_instance_id)
+{
+ return FireEtwThreadPoolIODequeue (
+ (const void *)native_overlapped,
+ (const void *)overlapped,
+ clr_instance_id,
+ NULL,
+ NULL) == 0 ? true : false;
+}
+
+bool
+ep_rt_write_event_threadpool_working_thread_count (
+ uint16_t count,
+ uint16_t clr_instance_id)
+{
+ return FireEtwThreadPoolWorkingThreadCount (
+ count,
+ clr_instance_id,
+ NULL,
+ NULL) == 0 ? true : false;
+}
+
static
void
profiler_jit_begin (
bool
ep_rt_mono_write_event_assembly_load (MonoAssembly *assembly);
+bool
+ep_rt_write_event_threadpool_worker_thread_start (
+ uint32_t active_thread_count,
+ uint32_t retired_worker_thread_count,
+ uint16_t clr_instance_id);
+
+bool
+ep_rt_write_event_threadpool_worker_thread_stop (
+ uint32_t active_thread_count,
+ uint32_t retired_worker_thread_count,
+ uint16_t clr_instance_id);
+
+bool
+ep_rt_write_event_threadpool_worker_thread_wait (
+ uint32_t active_thread_count,
+ uint32_t retired_worker_thread_count,
+ uint16_t clr_instance_id);
+
+bool
+ep_rt_write_event_threadpool_worker_thread_adjustment_sample (
+ double throughput,
+ uint16_t clr_instance_id);
+
+bool
+ep_rt_write_event_threadpool_worker_thread_adjustment_adjustment (
+ double average_throughput,
+ uint32_t networker_thread_count,
+ /*NativeRuntimeEventSource.ThreadAdjustmentReasonMap*/ int32_t reason,
+ uint16_t clr_instance_id);
+
+bool
+ep_rt_write_event_threadpool_worker_thread_adjustment_stats (
+ double duration,
+ double throughput,
+ double threadpool_worker_thread_wait,
+ double throughput_wave,
+ double throughput_error_estimate,
+ double average_throughput_error_estimate,
+ double throughput_ratio,
+ double confidence,
+ double new_control_setting,
+ uint16_t new_thread_wave_magnitude,
+ uint16_t clr_instance_id);
+
+bool
+ep_rt_write_event_threadpool_io_enqueue (
+ intptr_t native_overlapped,
+ intptr_t overlapped,
+ bool multi_dequeues,
+ uint16_t clr_instance_id);
+
+bool
+ep_rt_write_event_threadpool_io_dequeue (
+ intptr_t native_overlapped,
+ intptr_t overlapped,
+ uint16_t clr_instance_id);
+
+bool
+ep_rt_write_event_threadpool_working_thread_count (
+ uint16_t count,
+ uint16_t clr_instance_id);
+
/*
* EventPipe provider callbacks.
*/
ModuleDCEnd_V2
ModuleLoad_V2
RuntimeInformationDCStart
+ThreadPoolIODequeue
+ThreadPoolIOEnqueue
+ThreadPoolWorkerThreadAdjustmentAdjustment
+ThreadPoolWorkerThreadAdjustmentSample
+ThreadPoolWorkerThreadAdjustmentStats
+ThreadPoolWorkerThreadStart
+ThreadPoolWorkerThreadStop
+ThreadPoolWorkerThreadWait
+ThreadPoolWorkingThreadCount
ICALL_EXPORT intptr_t ves_icall_System_Diagnostics_Tracing_EventPipeInternal_GetWaitHandle (uint64_t session_id);
ICALL_EXPORT void ves_icall_System_Diagnostics_Tracing_EventPipeInternal_WriteEventData (intptr_t event_handle, void *event_data, uint32_t event_data_len, const uint8_t *activity_id, const uint8_t *related_activity_id);
+ICALL_EXPORT void ves_icall_System_Diagnostics_Tracing_NativeRuntimeEventSource_LogThreadPoolIODequeue (intptr_t native_overlapped, intptr_t overlapped, uint16_t clr_instance_id);
+ICALL_EXPORT void ves_icall_System_Diagnostics_Tracing_NativeRuntimeEventSource_LogThreadPoolIOEnqueue (intptr_t native_overlapped, intptr_t overlapped, MonoBoolean multi_dequeues, uint16_t clr_instance_id);
+ICALL_EXPORT void ves_icall_System_Diagnostics_Tracing_NativeRuntimeEventSource_LogThreadPoolWorkerThreadAdjustmentAdjustment (double average_throughput, uint32_t networker_thread_count, int32_t reason, uint16_t clr_instance_id);
+ICALL_EXPORT void ves_icall_System_Diagnostics_Tracing_NativeRuntimeEventSource_LogThreadPoolWorkerThreadAdjustmentSample (double throughput, uint16_t clr_instance_id);
+ICALL_EXPORT void ves_icall_System_Diagnostics_Tracing_NativeRuntimeEventSource_LogThreadPoolWorkerThreadAdjustmentStats (double duration, double throughput, double threadpool_worker_thread_wait, double throughput_wave, double throughput_error_estimate, double average_throughput_error_estimate, double throughput_ratio, double confidence, double new_control_setting, uint16_t new_thread_wave_magnitude, uint16_t clr_instance_id);
+ICALL_EXPORT void ves_icall_System_Diagnostics_Tracing_NativeRuntimeEventSource_LogThreadPoolWorkerThreadStart (uint32_t active_thread_count, uint32_t retired_worker_thread_count, uint16_t clr_instance_id);
+ICALL_EXPORT void ves_icall_System_Diagnostics_Tracing_NativeRuntimeEventSource_LogThreadPoolWorkerThreadStop (uint32_t active_thread_count, uint32_t retired_worker_thread_count, uint16_t clr_instance_id);
+ICALL_EXPORT void ves_icall_System_Diagnostics_Tracing_NativeRuntimeEventSource_LogThreadPoolWorkerThreadWait (uint32_t active_thread_count, uint32_t retired_worker_thread_count, uint16_t clr_instance_id);
+ICALL_EXPORT void ves_icall_System_Diagnostics_Tracing_NativeRuntimeEventSource_LogThreadPoolWorkingThreadCount (uint16_t count, uint16_t clr_instance_id);
+
ICALL_EXPORT void ves_icall_Mono_RuntimeGPtrArrayHandle_GPtrArrayFree (GPtrArray *ptr_array);
ICALL_EXPORT void ves_icall_Mono_RuntimeMarshal_FreeAssemblyName (MonoAssemblyName *aname, MonoBoolean free_struct);
ICALL_EXPORT void ves_icall_Mono_SafeStringMarshal_GFree (void *c_str);
NOHANDLES(ICALL(EVENTPIPE_11, "GetWaitHandle", ves_icall_System_Diagnostics_Tracing_EventPipeInternal_GetWaitHandle))
NOHANDLES(ICALL(EVENTPIPE_12, "WriteEventData", ves_icall_System_Diagnostics_Tracing_EventPipeInternal_WriteEventData))
+ICALL_TYPE(NATIVE_RUNTIME_EVENT_SOURCE, "System.Diagnostics.Tracing.NativeRuntimeEventSource", NATIVE_RUNTIME_EVENT_SOURCE_1)
+NOHANDLES(ICALL(NATIVE_RUNTIME_EVENT_SOURCE_1, "LogThreadPoolIODequeue", ves_icall_System_Diagnostics_Tracing_NativeRuntimeEventSource_LogThreadPoolIODequeue))
+NOHANDLES(ICALL(NATIVE_RUNTIME_EVENT_SOURCE_2, "LogThreadPoolIOEnqueue", ves_icall_System_Diagnostics_Tracing_NativeRuntimeEventSource_LogThreadPoolIOEnqueue))
+NOHANDLES(ICALL(NATIVE_RUNTIME_EVENT_SOURCE_3, "LogThreadPoolWorkerThreadAdjustmentAdjustment", ves_icall_System_Diagnostics_Tracing_NativeRuntimeEventSource_LogThreadPoolWorkerThreadAdjustmentAdjustment))
+NOHANDLES(ICALL(NATIVE_RUNTIME_EVENT_SOURCE_4, "LogThreadPoolWorkerThreadAdjustmentSample", ves_icall_System_Diagnostics_Tracing_NativeRuntimeEventSource_LogThreadPoolWorkerThreadAdjustmentSample))
+NOHANDLES(ICALL(NATIVE_RUNTIME_EVENT_SOURCE_5, "LogThreadPoolWorkerThreadAdjustmentStats", ves_icall_System_Diagnostics_Tracing_NativeRuntimeEventSource_LogThreadPoolWorkerThreadAdjustmentStats))
+NOHANDLES(ICALL(NATIVE_RUNTIME_EVENT_SOURCE_6, "LogThreadPoolWorkerThreadStart", ves_icall_System_Diagnostics_Tracing_NativeRuntimeEventSource_LogThreadPoolWorkerThreadStart))
+NOHANDLES(ICALL(NATIVE_RUNTIME_EVENT_SOURCE_7, "LogThreadPoolWorkerThreadStop", ves_icall_System_Diagnostics_Tracing_NativeRuntimeEventSource_LogThreadPoolWorkerThreadStop))
+NOHANDLES(ICALL(NATIVE_RUNTIME_EVENT_SOURCE_8, "LogThreadPoolWorkerThreadWait", ves_icall_System_Diagnostics_Tracing_NativeRuntimeEventSource_LogThreadPoolWorkerThreadWait))
+NOHANDLES(ICALL(NATIVE_RUNTIME_EVENT_SOURCE_9, "LogThreadPoolWorkingThreadCount", ves_icall_System_Diagnostics_Tracing_NativeRuntimeEventSource_LogThreadPoolWorkingThreadCount))
+
ICALL_TYPE(ENUM, "System.Enum", ENUM_1)
HANDLES(ENUM_1, "GetEnumValuesAndNames", ves_icall_System_Enum_GetEnumValuesAndNames, MonoBoolean, 3, (MonoReflectionType, MonoArrayOut, MonoArrayOut))
HANDLES(ENUM_2, "InternalBoxEnum", ves_icall_System_Enum_ToObject, MonoObject, 2, (MonoReflectionType, guint64))
}
}
+void
+ves_icall_System_Diagnostics_Tracing_NativeRuntimeEventSource_LogThreadPoolWorkerThreadStart (
+ uint32_t active_thread_count,
+ uint32_t retired_worker_thread_count,
+ uint16_t clr_instance_id)
+{
+ mono_component_event_pipe ()->write_event_threadpool_worker_thread_start (
+ active_thread_count,
+ retired_worker_thread_count,
+ clr_instance_id);
+}
+
+void
+ves_icall_System_Diagnostics_Tracing_NativeRuntimeEventSource_LogThreadPoolWorkerThreadStop (
+ uint32_t active_thread_count,
+ uint32_t retired_worker_thread_count,
+ uint16_t clr_instance_id)
+{
+ mono_component_event_pipe ()->write_event_threadpool_worker_thread_stop (
+ active_thread_count,
+ retired_worker_thread_count,
+ clr_instance_id);
+}
+
+void
+ves_icall_System_Diagnostics_Tracing_NativeRuntimeEventSource_LogThreadPoolWorkerThreadWait (
+ uint32_t active_thread_count,
+ uint32_t retired_worker_thread_count,
+ uint16_t clr_instance_id)
+{
+ mono_component_event_pipe ()->write_event_threadpool_worker_thread_wait (
+ active_thread_count,
+ retired_worker_thread_count,
+ clr_instance_id);
+}
+
+void
+ves_icall_System_Diagnostics_Tracing_NativeRuntimeEventSource_LogThreadPoolWorkerThreadAdjustmentSample (
+ double throughput,
+ uint16_t clr_instance_id)
+{
+ mono_component_event_pipe ()->write_event_threadpool_worker_thread_adjustment_sample (
+ throughput,
+ clr_instance_id);
+}
+
+void
+ves_icall_System_Diagnostics_Tracing_NativeRuntimeEventSource_LogThreadPoolWorkerThreadAdjustmentAdjustment (
+ double average_throughput,
+ uint32_t networker_thread_count,
+ /*NativeRuntimeEventSource.ThreadAdjustmentReasonMap*/ int32_t reason,
+ uint16_t clr_instance_id)
+{
+ mono_component_event_pipe ()->write_event_threadpool_worker_thread_adjustment_adjustment (
+ average_throughput,
+ networker_thread_count,
+ reason,
+ clr_instance_id);
+}
+
+void
+ves_icall_System_Diagnostics_Tracing_NativeRuntimeEventSource_LogThreadPoolWorkerThreadAdjustmentStats (
+ double duration,
+ double throughput,
+ double threadpool_worker_thread_wait,
+ double throughput_wave,
+ double throughput_error_estimate,
+ double average_throughput_error_estimate,
+ double throughput_ratio,
+ double confidence,
+ double new_control_setting,
+ uint16_t new_thread_wave_magnitude,
+ uint16_t clr_instance_id)
+{
+ mono_component_event_pipe ()->write_event_threadpool_worker_thread_adjustment_stats (
+ duration,
+ throughput,
+ threadpool_worker_thread_wait,
+ throughput_wave,
+ throughput_error_estimate,
+ average_throughput_error_estimate,
+ throughput_ratio,
+ confidence,
+ new_control_setting,
+ new_thread_wave_magnitude,
+ clr_instance_id);
+}
+
+void
+ves_icall_System_Diagnostics_Tracing_NativeRuntimeEventSource_LogThreadPoolIOEnqueue (
+ intptr_t native_overlapped,
+ intptr_t overlapped,
+ MonoBoolean multi_dequeues,
+ uint16_t clr_instance_id)
+{
+ mono_component_event_pipe ()->write_event_threadpool_io_enqueue (
+ native_overlapped,
+ overlapped,
+ multi_dequeues,
+ clr_instance_id);
+}
+
+void
+ves_icall_System_Diagnostics_Tracing_NativeRuntimeEventSource_LogThreadPoolIODequeue (
+ intptr_t native_overlapped,
+ intptr_t overlapped,
+ uint16_t clr_instance_id)
+{
+ mono_component_event_pipe ()->write_event_threadpool_io_dequeue (
+ native_overlapped,
+ overlapped,
+ clr_instance_id);
+}
+
+void
+ves_icall_System_Diagnostics_Tracing_NativeRuntimeEventSource_LogThreadPoolWorkingThreadCount (
+ uint16_t count,
+ uint16_t clr_instance_id)
+{
+ mono_component_event_pipe ()->write_event_threadpool_working_thread_count (
+ count,
+ clr_instance_id);
+}
+
#else /* ENABLE_PERFTRACING */
gconstpointer
return 0;
}
+void
+ves_icall_System_Diagnostics_Tracing_NativeRuntimeEventSource_LogThreadPoolWorkerThreadStart (
+ uint32_t active_thread_count,
+ uint32_t retired_worker_thread_count,
+ uint16_t clr_instance_id)
+{
+ ERROR_DECL (error);
+ mono_error_set_not_implemented (error, "System.Diagnostics.Tracing.NativeRuntimeEventSource.LogThreadPoolWorkerThreadStart");
+ mono_error_set_pending_exception (error);
+}
+
+void
+ves_icall_System_Diagnostics_Tracing_NativeRuntimeEventSource_LogThreadPoolWorkerThreadStop (
+ uint32_t active_thread_count,
+ uint32_t retired_worker_thread_count,
+ uint16_t clr_instance_id)
+{
+ ERROR_DECL (error);
+ mono_error_set_not_implemented (error, "System.Diagnostics.Tracing.NativeRuntimeEventSource.LogThreadPoolWorkerThreadStop");
+ mono_error_set_pending_exception (error);
+}
+
+void
+ves_icall_System_Diagnostics_Tracing_NativeRuntimeEventSource_LogThreadPoolWorkerThreadWait (
+ uint32_t active_thread_count,
+ uint32_t retired_worker_thread_count,
+ uint16_t clr_instance_id)
+{
+ ERROR_DECL (error);
+ mono_error_set_not_implemented (error, "System.Diagnostics.Tracing.NativeRuntimeEventSource.LogThreadPoolWorkerThreadWait");
+ mono_error_set_pending_exception (error);
+}
+
+void
+ves_icall_System_Diagnostics_Tracing_NativeRuntimeEventSource_LogThreadPoolWorkerThreadAdjustmentSample (
+ double throughput,
+ uint16_t clr_instance_id)
+{
+ ERROR_DECL (error);
+ mono_error_set_not_implemented (error, "System.Diagnostics.Tracing.NativeRuntimeEventSource.LogThreadPoolWorkerThreadAdjustmentSample");
+ mono_error_set_pending_exception (error);
+}
+
+void
+ves_icall_System_Diagnostics_Tracing_NativeRuntimeEventSource_LogThreadPoolWorkerThreadAdjustmentAdjustment (
+ double average_throughput,
+ uint32_t networker_thread_count,
+ /*NativeRuntimeEventSource.ThreadAdjustmentReasonMap*/ int32_t reason,
+ uint16_t clr_instance_id)
+{
+ ERROR_DECL (error);
+ mono_error_set_not_implemented (error, "System.Diagnostics.Tracing.NativeRuntimeEventSource.LogThreadPoolWorkerThreadAdjustmentAdjustment");
+ mono_error_set_pending_exception (error);
+}
+
+void
+ves_icall_System_Diagnostics_Tracing_NativeRuntimeEventSource_LogThreadPoolWorkerThreadAdjustmentStats (
+ double duration,
+ double throughput,
+ double threadpool_worker_thread_wait,
+ double throughput_wave,
+ double throughput_error_estimate,
+ double average_throughput_error_estimate,
+ double throughput_ratio,
+ double confidence,
+ double new_control_setting,
+ uint16_t new_thread_wave_magnitude,
+ uint16_t clr_instance_id)
+{
+ ERROR_DECL (error);
+ mono_error_set_not_implemented (error, "System.Diagnostics.Tracing.NativeRuntimeEventSource.LogThreadPoolWorkerThreadAdjustmentStats");
+ mono_error_set_pending_exception (error);
+}
+
+void
+ves_icall_System_Diagnostics_Tracing_NativeRuntimeEventSource_LogThreadPoolIOEnqueue (
+ intptr_t native_overlapped,
+ intptr_t overlapped,
+ MonoBoolean multi_dequeues,
+ uint16_t clr_instance_id)
+{
+ ERROR_DECL (error);
+ mono_error_set_not_implemented (error, "System.Diagnostics.Tracing.NativeRuntimeEventSource.LogThreadPoolIOEnqueue");
+ mono_error_set_pending_exception (error);
+}
+
+void
+ves_icall_System_Diagnostics_Tracing_NativeRuntimeEventSource_LogThreadPoolIODequeue (
+ intptr_t native_overlapped,
+ intptr_t overlapped,
+ uint16_t clr_instance_id)
+{
+ ERROR_DECL (error);
+ mono_error_set_not_implemented (error, "System.Diagnostics.Tracing.NativeRuntimeEventSource.LogThreadPoolIODequeue");
+ mono_error_set_pending_exception (error);
+}
+
+void
+ves_icall_System_Diagnostics_Tracing_NativeRuntimeEventSource_LogThreadPoolWorkingThreadCount (
+ uint16_t count,
+ uint16_t clr_instance_id)
+{
+ ERROR_DECL (error);
+ mono_error_set_not_implemented (error, "System.Diagnostics.Tracing.NativeRuntimeEventSource.LogThreadPoolWorkingThreadCount");
+ mono_error_set_pending_exception (error);
+}
+
#endif /* ENABLE_PERFTRACING */