Skip to content
Prev Previous commit
Next Next commit
Move code inside the if(IsEnabled) block
  • Loading branch information
eduardo-vp authored and github-actions committed Mar 13, 2024
commit 466edccedc751137102cafc10c7b01eea4693f7a
Original file line number Diff line number Diff line change
Expand Up @@ -205,13 +205,13 @@ private unsafe void ThreadPoolIOEnqueue(
[MethodImpl(MethodImplOptions.NoInlining)]
public unsafe void ThreadPoolIOEnqueue(NativeOverlapped* nativeOverlapped)
{
if (IsEnabled(EventLevel.Verbose, Keywords.ThreadingKeyword | Keywords.ThreadTransferKeyword))
{
#if TARGET_WINDOWS
IntPtr overlapped = ThreadPool.UseWindowsThreadPool ? 0 : (IntPtr)Overlapped.GetOverlappedFromNative(nativeOverlapped).GetHashCode();
#else
IntPtr overlapped = (IntPtr)Overlapped.GetOverlappedFromNative(nativeOverlapped).GetHashCode();
#endif
if (IsEnabled(EventLevel.Verbose, Keywords.ThreadingKeyword | Keywords.ThreadTransferKeyword))
{
ThreadPoolIOEnqueue(
(IntPtr)nativeOverlapped,
overlapped,
Expand Down Expand Up @@ -246,13 +246,13 @@ private unsafe void ThreadPoolIODequeue(
[MethodImpl(MethodImplOptions.NoInlining)]
public unsafe void ThreadPoolIODequeue(NativeOverlapped* nativeOverlapped)
{
if (IsEnabled(EventLevel.Verbose, Keywords.ThreadingKeyword | Keywords.ThreadTransferKeyword))
{
#if TARGET_WINDOWS
IntPtr overlapped = ThreadPool.UseWindowsThreadPool ? 0 : (IntPtr)Overlapped.GetOverlappedFromNative(nativeOverlapped).GetHashCode();
#else
IntPtr overlapped = (IntPtr)Overlapped.GetOverlappedFromNative(nativeOverlapped).GetHashCode();
#endif
if (IsEnabled(EventLevel.Verbose, Keywords.ThreadingKeyword | Keywords.ThreadTransferKeyword))
{
ThreadPoolIODequeue(
(IntPtr)nativeOverlapped,
overlapped);
Expand Down Expand Up @@ -285,13 +285,13 @@ public unsafe void ThreadPoolWorkingThreadCount(uint Count, ushort ClrInstanceID
[MethodImpl(MethodImplOptions.NoInlining)]
public unsafe void ThreadPoolIOPack(NativeOverlapped* nativeOverlapped)
{
if (IsEnabled(EventLevel.Verbose, Keywords.ThreadingKeyword))
{
#if TARGET_WINDOWS
IntPtr overlapped = ThreadPool.UseWindowsThreadPool ? 0 : (IntPtr)Overlapped.GetOverlappedFromNative(nativeOverlapped).GetHashCode();
#else
IntPtr overlapped = (IntPtr)Overlapped.GetOverlappedFromNative(nativeOverlapped).GetHashCode();
#endif
if (IsEnabled(EventLevel.Verbose, Keywords.ThreadingKeyword))
{
ThreadPoolIOPack(
(IntPtr)nativeOverlapped,
overlapped);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -440,13 +440,13 @@ public unsafe void ThreadPoolWorkingThreadCount(uint Count, ushort ClrInstanceID
[MethodImpl(MethodImplOptions.NoInlining)]
public unsafe void ThreadPoolIOPack(NativeOverlapped* nativeOverlapped)
{
if (IsEnabled(EventLevel.Verbose, Keywords.ThreadingKeyword))
{
#if TARGET_WINDOWS
IntPtr overlapped = ThreadPool.UseWindowsThreadPool ? 0 : (IntPtr)Overlapped.GetOverlappedFromNative(nativeOverlapped).GetHashCode();
#else
IntPtr overlapped = (IntPtr)Overlapped.GetOverlappedFromNative(nativeOverlapped).GetHashCode();
#endif
if (IsEnabled(EventLevel.Verbose, Keywords.ThreadingKeyword))
{
ThreadPoolIOPack(
(IntPtr)nativeOverlapped,
overlapped);
Expand Down