Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/corert.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/System.Private.CoreLib/shared/System/Buffers/ArrayPoolEventSource.cs')
-rw-r--r--src/System.Private.CoreLib/shared/System/Buffers/ArrayPoolEventSource.cs14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/System.Private.CoreLib/shared/System/Buffers/ArrayPoolEventSource.cs b/src/System.Private.CoreLib/shared/System/Buffers/ArrayPoolEventSource.cs
index b2d0dbd32..d0563c497 100644
--- a/src/System.Private.CoreLib/shared/System/Buffers/ArrayPoolEventSource.cs
+++ b/src/System.Private.CoreLib/shared/System/Buffers/ArrayPoolEventSource.cs
@@ -86,5 +86,19 @@ namespace System.Buffers
/// </summary>
[Event(3, Level = EventLevel.Verbose)]
internal void BufferReturned(int bufferId, int bufferSize, int poolId) => WriteEvent(3, bufferId, bufferSize, poolId);
+
+ /// <summary>
+ /// Event raised when we attempt to free a buffer due to inactivity or memory pressure (by no longer
+ /// referencing it). It is possible (although not commmon) this buffer could be rented as we attempt
+ /// to free it. A rent event before or after this event for the same ID, is a rare, but expected case.
+ /// </summary>
+ [Event(4, Level = EventLevel.Informational)]
+ internal void BufferTrimmed(int bufferId, int bufferSize, int poolId) => WriteEvent(4, bufferId, bufferSize, poolId);
+
+ /// <summary>
+ /// Event raised when we check to trim buffers.
+ /// </summary>
+ [Event(5, Level = EventLevel.Informational)]
+ internal void BufferTrimPoll(int milliseconds, int pressure) => WriteEvent(5, milliseconds, pressure);
}
}