Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Update a comment.
  • Loading branch information
VSadov committed Dec 18, 2023
commit 344ea2a3b79db56f00e266b14e8e061d41ef5b16
Original file line number Diff line number Diff line change
Expand Up @@ -681,19 +681,19 @@ private void LogContentionEnd(long contentionTrackingStartedTicks)
double waitDurationNs =
(Stopwatch.GetTimestamp() - contentionTrackingStartedTicks) * 1_000_000_000.0 / Stopwatch.Frequency;

// Also check NativeRuntimeEventSource.Log.IsEnabled() to enable trimming
if (NativeRuntimeEventSource.Log.IsEnabled())
try
{
try
// Also check NativeRuntimeEventSource.Log.IsEnabled() to enable trimming
if (NativeRuntimeEventSource.Log.IsEnabled())
{
NativeRuntimeEventSource.Log.ContentionStop(waitDurationNs);
}
catch
{
// We are throwing. The acquire failed.
this.Exit();
throw;
}
}
catch
{
// We are throwing. The acquire failed and we should not leave the lock locked.
this.Exit();
throw;
}
}

Expand Down