[+] TEngineServer

[+] TEngineServer
This commit is contained in:
ALEXTANG
2023-07-13 17:17:26 +08:00
parent a69f53592e
commit 0c8f3a5f92
790 changed files with 52737 additions and 2533 deletions

View File

@@ -0,0 +1,463 @@
namespace TEngine.IO
{
using System;
public sealed partial class RecyclableMemoryStreamManager
{
/// <summary>
/// Arguments for the <see cref="StreamCreated"/> event.
/// </summary>
public sealed class StreamCreatedEventArgs : EventArgs
{
/// <summary>
/// Unique ID for the stream.
/// </summary>
public Guid Id { get; }
/// <summary>
/// Optional Tag for the event.
/// </summary>
public string Tag { get; }
/// <summary>
/// Requested stream size.
/// </summary>
public long RequestedSize { get; }
/// <summary>
/// Actual stream size.
/// </summary>
public long ActualSize { get; }
/// <summary>
/// Initializes a new instance of the <see cref="StreamCreatedEventArgs"/> class.
/// </summary>
/// <param name="guid">Unique ID of the stream.</param>
/// <param name="tag">Tag of the stream.</param>
/// <param name="requestedSize">The requested stream size.</param>
/// <param name="actualSize">The actual stream size.</param>
public StreamCreatedEventArgs(Guid guid, string tag, long requestedSize, long actualSize)
{
this.Id = guid;
this.Tag = tag;
this.RequestedSize = requestedSize;
this.ActualSize = actualSize;
}
}
/// <summary>
/// Arguments for the <see cref="StreamDisposed"/> event.
/// </summary>
public sealed class StreamDisposedEventArgs : EventArgs
{
/// <summary>
/// Unique ID for the stream.
/// </summary>
public Guid Id { get; }
/// <summary>
/// Optional Tag for the event.
/// </summary>
public string Tag { get; }
/// <summary>
/// Stack where the stream was allocated.
/// </summary>
public string AllocationStack { get; }
/// <summary>
/// Stack where stream was disposed.
/// </summary>
public string DisposeStack { get; }
/// <summary>
/// Lifetime of the stream.
/// </summary>
public TimeSpan Lifetime { get; }
/// <summary>
/// Initializes a new instance of the <see cref="StreamDisposedEventArgs"/> class.
/// </summary>
/// <param name="guid">Unique ID of the stream.</param>
/// <param name="tag">Tag of the stream.</param>
/// <param name="allocationStack">Stack of original allocation.</param>
/// <param name="disposeStack">Dispose stack.</param>
[Obsolete("Use another constructor override")]
public StreamDisposedEventArgs(Guid guid, string tag, string allocationStack, string disposeStack)
:this(guid, tag, TimeSpan.Zero, allocationStack, disposeStack)
{
}
/// <summary>
/// Initializes a new instance of the <see cref="StreamDisposedEventArgs"/> class.
/// </summary>
/// <param name="guid">Unique ID of the stream.</param>
/// <param name="tag">Tag of the stream.</param>
/// <param name="lifetime">Lifetime of the stream</param>
/// <param name="allocationStack">Stack of original allocation.</param>
/// <param name="disposeStack">Dispose stack.</param>
public StreamDisposedEventArgs(Guid guid, string tag, TimeSpan lifetime, string allocationStack, string disposeStack)
{
this.Id = guid;
this.Tag = tag;
this.Lifetime = lifetime;
this.AllocationStack = allocationStack;
this.DisposeStack = disposeStack;
}
}
/// <summary>
/// Arguments for the <see cref="StreamDoubleDisposed"/> event.
/// </summary>
public sealed class StreamDoubleDisposedEventArgs : EventArgs
{
/// <summary>
/// Unique ID for the stream.
/// </summary>
public Guid Id { get; }
/// <summary>
/// Optional Tag for the event.
/// </summary>
public string Tag { get; }
/// <summary>
/// Stack where the stream was allocated.
/// </summary>
public string AllocationStack { get; }
/// <summary>
/// First dispose stack.
/// </summary>
public string DisposeStack1 { get; }
/// <summary>
/// Second dispose stack.
/// </summary>
public string DisposeStack2 { get; }
/// <summary>
/// Initializes a new instance of the <see cref="StreamDoubleDisposedEventArgs"/> class.
/// </summary>
/// <param name="guid">Unique ID of the stream.</param>
/// <param name="tag">Tag of the stream.</param>
/// <param name="allocationStack">Stack of original allocation.</param>
/// <param name="disposeStack1">First dispose stack.</param>
/// <param name="disposeStack2">Second dispose stack.</param>
public StreamDoubleDisposedEventArgs(Guid guid, string tag, string allocationStack, string disposeStack1, string disposeStack2)
{
this.Id = guid;
this.Tag = tag;
this.AllocationStack = allocationStack;
this.DisposeStack1 = disposeStack1;
this.DisposeStack2 = disposeStack2;
}
}
/// <summary>
/// Arguments for the <see cref="StreamFinalized"/> event.
/// </summary>
public sealed class StreamFinalizedEventArgs : EventArgs
{
/// <summary>
/// Unique ID for the stream.
/// </summary>
public Guid Id { get; }
/// <summary>
/// Optional Tag for the event.
/// </summary>
public string Tag { get; }
/// <summary>
/// Stack where the stream was allocated.
/// </summary>
public string AllocationStack { get; }
/// <summary>
/// Initializes a new instance of the <see cref="StreamFinalizedEventArgs"/> class.
/// </summary>
/// <param name="guid">Unique ID of the stream.</param>
/// <param name="tag">Tag of the stream.</param>
/// <param name="allocationStack">Stack of original allocation.</param>
public StreamFinalizedEventArgs(Guid guid, string tag, string allocationStack)
{
this.Id = guid;
this.Tag = tag;
this.AllocationStack = allocationStack;
}
}
/// <summary>
/// Arguments for the <see cref="StreamConvertedToArray"/> event.
/// </summary>
public sealed class StreamConvertedToArrayEventArgs : EventArgs
{
/// <summary>
/// Unique ID for the stream.
/// </summary>
public Guid Id { get; }
/// <summary>
/// Optional Tag for the event.
/// </summary>
public string Tag { get; }
/// <summary>
/// Stack where ToArray was called.
/// </summary>
public string Stack { get; }
/// <summary>
/// Length of stack.
/// </summary>
public long Length { get; }
/// <summary>
/// Initializes a new instance of the <see cref="StreamConvertedToArrayEventArgs"/> class.
/// </summary>
/// <param name="guid">Unique ID of the stream.</param>
/// <param name="tag">Tag of the stream.</param>
/// <param name="stack">Stack of ToArray call.</param>
/// <param name="length">Length of stream.</param>
public StreamConvertedToArrayEventArgs(Guid guid, string tag, string stack, long length)
{
this.Id = guid;
this.Tag = tag;
this.Stack = stack;
this.Length = length;
}
}
/// <summary>
/// Arguments for the <see cref="StreamOverCapacity"/> event.
/// </summary>
public sealed class StreamOverCapacityEventArgs : EventArgs
{
/// <summary>
/// Unique ID for the stream.
/// </summary>
public Guid Id { get; }
/// <summary>
/// Optional Tag for the event.
/// </summary>
public string Tag { get; }
/// <summary>
/// Original allocation stack.
/// </summary>
public string AllocationStack { get; }
/// <summary>
/// Requested capacity.
/// </summary>
public long RequestedCapacity { get; }
/// <summary>
/// Maximum capacity.
/// </summary>
public long MaximumCapacity { get; }
/// <summary>
/// Initializes a new instance of the <see cref="StreamOverCapacityEventArgs"/> class.
/// </summary>
/// <param name="guid">Unique ID of the stream.</param>
/// <param name="tag">Tag of the stream.</param>
/// <param name="requestedCapacity">Requested capacity.</param>
/// <param name="maximumCapacity">Maximum stream capacity of the manager.</param>
/// <param name="allocationStack">Original allocation stack.</param>
internal StreamOverCapacityEventArgs(Guid guid, string tag, long requestedCapacity, long maximumCapacity, string allocationStack)
{
this.Id = guid;
this.Tag = tag;
this.RequestedCapacity = requestedCapacity;
this.MaximumCapacity = maximumCapacity;
this.AllocationStack = allocationStack;
}
}
/// <summary>
/// Arguments for the <see cref="BlockCreated"/> event.
/// </summary>
public sealed class BlockCreatedEventArgs : EventArgs
{
/// <summary>
/// How many bytes are currently in use from the small pool.
/// </summary>
public long SmallPoolInUse { get; }
/// <summary>
/// Initializes a new instance of the <see cref="BlockCreatedEventArgs"/> class.
/// </summary>
/// <param name="smallPoolInUse">Number of bytes currently in use from the small pool.</param>
internal BlockCreatedEventArgs(long smallPoolInUse)
{
this.SmallPoolInUse = smallPoolInUse;
}
}
/// <summary>
/// Arguments for the <see cref="LargeBufferCreated"/> events.
/// </summary>
public sealed class LargeBufferCreatedEventArgs : EventArgs
{
/// <summary>
/// Unique ID for the stream.
/// </summary>
public Guid Id { get; }
/// <summary>
/// Optional Tag for the event.
/// </summary>
public string Tag { get; }
/// <summary>
/// Whether the buffer was satisfied from the pool or not.
/// </summary>
public bool Pooled { get; }
/// <summary>
/// Required buffer size.
/// </summary>
public long RequiredSize { get; }
/// <summary>
/// How many bytes are in use from the large pool.
/// </summary>
public long LargePoolInUse { get; }
/// <summary>
/// If the buffer was not satisfied from the pool, and <see cref="GenerateCallStacks"/> is turned on, then.
/// this will contain the callstack of the allocation request.
/// </summary>
public string CallStack { get; }
/// <summary>
/// Initializes a new instance of the <see cref="LargeBufferCreatedEventArgs"/> class.
/// </summary>
/// <param name="guid">Unique ID of the stream.</param>
/// <param name="tag">Tag of the stream.</param>
/// <param name="requiredSize">Required size of the new buffer.</param>
/// <param name="largePoolInUse">How many bytes from the large pool are currently in use.</param>
/// <param name="pooled">Whether the buffer was satisfied from the pool or not.</param>
/// <param name="callStack">Callstack of the allocation, if it wasn't pooled.</param>
internal LargeBufferCreatedEventArgs(Guid guid, string tag, long requiredSize, long largePoolInUse, bool pooled, string callStack)
{
this.RequiredSize = requiredSize;
this.LargePoolInUse = largePoolInUse;
this.Pooled = pooled;
this.Id = guid;
this.Tag = tag;
this.CallStack = callStack;
}
}
/// <summary>
/// Arguments for the <see cref="BufferDiscarded"/> event.
/// </summary>
public sealed class BufferDiscardedEventArgs : EventArgs
{
/// <summary>
/// Unique ID for the stream.
/// </summary>
public Guid Id { get; }
/// <summary>
/// Optional Tag for the event.
/// </summary>
public string Tag { get; }
/// <summary>
/// Type of the buffer.
/// </summary>
public Events.MemoryStreamBufferType BufferType { get; }
/// <summary>
/// The reason this buffer was discarded.
/// </summary>
public Events.MemoryStreamDiscardReason Reason { get; }
/// <summary>
/// Initializes a new instance of the <see cref="BufferDiscardedEventArgs"/> class.
/// </summary>
/// <param name="guid">Unique ID of the stream.</param>
/// <param name="tag">Tag of the stream.</param>
/// <param name="bufferType">Type of buffer being discarded.</param>
/// <param name="reason">The reason for the discard.</param>
internal BufferDiscardedEventArgs(Guid guid, string tag, Events.MemoryStreamBufferType bufferType, Events.MemoryStreamDiscardReason reason)
{
this.Id = guid;
this.Tag = tag;
this.BufferType = bufferType;
this.Reason = reason;
}
}
/// <summary>
/// Arguments for the <see cref="StreamLength"/> event.
/// </summary>
public sealed class StreamLengthEventArgs : EventArgs
{
/// <summary>
/// Length of the stream.
/// </summary>
public long Length { get; }
/// <summary>
/// Initializes a new instance of the <see cref="StreamLengthEventArgs"/> class.
/// </summary>
/// <param name="length">Length of the strength.</param>
public StreamLengthEventArgs(long length)
{
this.Length = length;
}
}
/// <summary>
/// Arguments for the <see cref="UsageReport"/> event.
/// </summary>
public sealed class UsageReportEventArgs : EventArgs
{
/// <summary>
/// Bytes from the small pool currently in use.
/// </summary>
public long SmallPoolInUseBytes { get; }
/// <summary>
/// Bytes from the small pool currently available.
/// </summary>
public long SmallPoolFreeBytes { get; }
/// <summary>
/// Bytes from the large pool currently in use.
/// </summary>
public long LargePoolInUseBytes { get; }
/// <summary>
/// Bytes from the large pool currently available.
/// </summary>
public long LargePoolFreeBytes { get; }
/// <summary>
/// Initializes a new instance of the <see cref="UsageReportEventArgs"/> class.
/// </summary>
/// <param name="smallPoolInUseBytes">Bytes from the small pool currently in use.</param>
/// <param name="smallPoolFreeBytes">Bytes from the small pool currently available.</param>
/// <param name="largePoolInUseBytes">Bytes from the large pool currently in use.</param>
/// <param name="largePoolFreeBytes">Bytes from the large pool currently available.</param>
public UsageReportEventArgs(
long smallPoolInUseBytes,
long smallPoolFreeBytes,
long largePoolInUseBytes,
long largePoolFreeBytes)
{
this.SmallPoolInUseBytes = smallPoolInUseBytes;
this.SmallPoolFreeBytes = smallPoolFreeBytes;
this.LargePoolInUseBytes = largePoolInUseBytes;
this.LargePoolFreeBytes = largePoolFreeBytes;
}
}
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 245f4b325bce62948854e163f9e6f56c
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,258 @@
// ---------------------------------------------------------------------
// Copyright (c) 2015 Microsoft
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
// ---------------------------------------------------------------------
namespace TEngine.IO
{
using System;
using System.Diagnostics.Tracing;
public sealed partial class RecyclableMemoryStreamManager
{
/// <summary>
/// ETW events for RecyclableMemoryStream.
/// </summary>
[EventSource(Name = "Microsoft-IO-RecyclableMemoryStream", Guid = "{B80CD4E4-890E-468D-9CBA-90EB7C82DFC7}")]
public sealed class Events : EventSource
{
/// <summary>
/// Static log object, through which all events are written.
/// </summary>
public static Events Writer = new();
/// <summary>
/// Type of buffer.
/// </summary>
public enum MemoryStreamBufferType
{
/// <summary>
/// Small block buffer.
/// </summary>
Small,
/// <summary>
/// Large pool buffer.
/// </summary>
Large
}
/// <summary>
/// The possible reasons for discarding a buffer.
/// </summary>
public enum MemoryStreamDiscardReason
{
/// <summary>
/// Buffer was too large to be re-pooled.
/// </summary>
TooLarge,
/// <summary>
/// There are enough free bytes in the pool.
/// </summary>
EnoughFree
}
/// <summary>
/// Logged when a stream object is created.
/// </summary>
/// <param name="guid">A unique ID for this stream.</param>
/// <param name="tag">A temporary ID for this stream, usually indicates current usage.</param>
/// <param name="requestedSize">Requested size of the stream.</param>
/// <param name="actualSize">Actual size given to the stream from the pool.</param>
[Event(1, Level = EventLevel.Verbose, Version = 2)]
public void MemoryStreamCreated(Guid guid, string tag, long requestedSize, long actualSize)
{
if (this.IsEnabled(EventLevel.Verbose, EventKeywords.None))
{
WriteEvent(1, guid, tag ?? string.Empty, requestedSize, actualSize);
}
}
/// <summary>
/// Logged when the stream is disposed.
/// </summary>
/// <param name="guid">A unique ID for this stream.</param>
/// <param name="tag">A temporary ID for this stream, usually indicates current usage.</param>
/// <param name="lifetimeMs">Lifetime in milliseconds of the stream</param>
/// <param name="allocationStack">Call stack of initial allocation.</param>
/// <param name="disposeStack">Call stack of the dispose.</param>
[Event(2, Level = EventLevel.Verbose, Version = 3)]
public void MemoryStreamDisposed(Guid guid, string tag, long lifetimeMs, string allocationStack, string disposeStack)
{
if (this.IsEnabled(EventLevel.Verbose, EventKeywords.None))
{
WriteEvent(2, guid, tag ?? string.Empty, lifetimeMs, allocationStack ?? string.Empty, disposeStack ?? string.Empty);
}
}
/// <summary>
/// Logged when the stream is disposed for the second time.
/// </summary>
/// <param name="guid">A unique ID for this stream.</param>
/// <param name="tag">A temporary ID for this stream, usually indicates current usage.</param>
/// <param name="allocationStack">Call stack of initial allocation.</param>
/// <param name="disposeStack1">Call stack of the first dispose.</param>
/// <param name="disposeStack2">Call stack of the second dispose.</param>
/// <remarks>Note: Stacks will only be populated if RecyclableMemoryStreamManager.GenerateCallStacks is true.</remarks>
[Event(3, Level = EventLevel.Critical)]
public void MemoryStreamDoubleDispose(Guid guid, string tag, string allocationStack, string disposeStack1,
string disposeStack2)
{
if (this.IsEnabled())
{
this.WriteEvent(3, guid, tag ?? string.Empty, allocationStack ?? string.Empty,
disposeStack1 ?? string.Empty, disposeStack2 ?? string.Empty);
}
}
/// <summary>
/// Logged when a stream is finalized.
/// </summary>
/// <param name="guid">A unique ID for this stream.</param>
/// <param name="tag">A temporary ID for this stream, usually indicates current usage.</param>
/// <param name="allocationStack">Call stack of initial allocation.</param>
/// <remarks>Note: Stacks will only be populated if RecyclableMemoryStreamManager.GenerateCallStacks is true.</remarks>
[Event(4, Level = EventLevel.Error)]
public void MemoryStreamFinalized(Guid guid, string tag, string allocationStack)
{
if (this.IsEnabled())
{
WriteEvent(4, guid, tag ?? string.Empty, allocationStack ?? string.Empty);
}
}
/// <summary>
/// Logged when ToArray is called on a stream.
/// </summary>
/// <param name="guid">A unique ID for this stream.</param>
/// <param name="tag">A temporary ID for this stream, usually indicates current usage.</param>
/// <param name="stack">Call stack of the ToArray call.</param>
/// <param name="size">Length of stream.</param>
/// <remarks>Note: Stacks will only be populated if RecyclableMemoryStreamManager.GenerateCallStacks is true.</remarks>
[Event(5, Level = EventLevel.Verbose, Version = 2)]
public void MemoryStreamToArray(Guid guid, string tag, string stack, long size)
{
if (this.IsEnabled(EventLevel.Verbose, EventKeywords.None))
{
WriteEvent(5, guid, tag ?? string.Empty, stack ?? string.Empty, size);
}
}
/// <summary>
/// Logged when the RecyclableMemoryStreamManager is initialized.
/// </summary>
/// <param name="blockSize">Size of blocks, in bytes.</param>
/// <param name="largeBufferMultiple">Size of the large buffer multiple, in bytes.</param>
/// <param name="maximumBufferSize">Maximum buffer size, in bytes.</param>
[Event(6, Level = EventLevel.Informational)]
public void MemoryStreamManagerInitialized(int blockSize, int largeBufferMultiple, int maximumBufferSize)
{
if (this.IsEnabled())
{
WriteEvent(6, blockSize, largeBufferMultiple, maximumBufferSize);
}
}
/// <summary>
/// Logged when a new block is created.
/// </summary>
/// <param name="smallPoolInUseBytes">Number of bytes in the small pool currently in use.</param>
[Event(7, Level = EventLevel.Warning, Version = 2)]
public void MemoryStreamNewBlockCreated(long smallPoolInUseBytes)
{
if (this.IsEnabled(EventLevel.Warning, EventKeywords.None))
{
WriteEvent(7, smallPoolInUseBytes);
}
}
/// <summary>
/// Logged when a new large buffer is created.
/// </summary>
/// <param name="requiredSize">Requested size.</param>
/// <param name="largePoolInUseBytes">Number of bytes in the large pool in use.</param>
[Event(8, Level = EventLevel.Warning, Version = 3)]
public void MemoryStreamNewLargeBufferCreated(long requiredSize, long largePoolInUseBytes)
{
if (this.IsEnabled(EventLevel.Warning, EventKeywords.None))
{
WriteEvent(8, requiredSize, largePoolInUseBytes);
}
}
/// <summary>
/// Logged when a buffer is created that is too large to pool.
/// </summary>
/// <param name="guid">Unique stream ID.</param>
/// <param name="tag">A temporary ID for this stream, usually indicates current usage.</param>
/// <param name="requiredSize">Size requested by the caller.</param>
/// <param name="allocationStack">Call stack of the requested stream.</param>
/// <remarks>Note: Stacks will only be populated if RecyclableMemoryStreamManager.GenerateCallStacks is true.</remarks>
[Event(9, Level = EventLevel.Verbose, Version = 3)]
public void MemoryStreamNonPooledLargeBufferCreated(Guid guid, string tag, long requiredSize, string allocationStack)
{
if (this.IsEnabled(EventLevel.Verbose, EventKeywords.None))
{
WriteEvent(9, guid, tag ?? string.Empty, requiredSize, allocationStack ?? string.Empty);
}
}
/// <summary>
/// Logged when a buffer is discarded (not put back in the pool, but given to GC to clean up).
/// </summary>
/// <param name="guid">Unique stream ID.</param>
/// <param name="tag">A temporary ID for this stream, usually indicates current usage.</param>
/// <param name="bufferType">Type of the buffer being discarded.</param>
/// <param name="reason">Reason for the discard.</param>
/// <param name="smallBlocksFree">Number of free small pool blocks.</param>
/// <param name="smallPoolBytesFree">Bytes free in the small pool.</param>
/// <param name="smallPoolBytesInUse">Bytes in use from the small pool.</param>
/// <param name="largeBlocksFree">Number of free large pool blocks.</param>
/// <param name="largePoolBytesFree">Bytes free in the large pool.</param>
/// <param name="largePoolBytesInUse">Bytes in use from the large pool.</param>
[Event(10, Level = EventLevel.Warning, Version = 2)]
public void MemoryStreamDiscardBuffer(Guid guid, string tag, MemoryStreamBufferType bufferType,
MemoryStreamDiscardReason reason, long smallBlocksFree, long smallPoolBytesFree, long smallPoolBytesInUse, long largeBlocksFree, long largePoolBytesFree, long largePoolBytesInUse)
{
if (this.IsEnabled(EventLevel.Warning, EventKeywords.None))
{
WriteEvent(10, guid, tag ?? string.Empty, bufferType, reason, smallBlocksFree, smallPoolBytesFree, smallPoolBytesInUse, largeBlocksFree, largePoolBytesFree, largePoolBytesInUse);
}
}
/// <summary>
/// Logged when a stream grows beyond the maximum capacity.
/// </summary>
/// <param name="guid">Unique stream ID</param>
/// <param name="requestedCapacity">The requested capacity.</param>
/// <param name="maxCapacity">Maximum capacity, as configured by RecyclableMemoryStreamManager.</param>
/// <param name="tag">A temporary ID for this stream, usually indicates current usage.</param>
/// <param name="allocationStack">Call stack for the capacity request.</param>
/// <remarks>Note: Stacks will only be populated if RecyclableMemoryStreamManager.GenerateCallStacks is true.</remarks>
[Event(11, Level = EventLevel.Error, Version = 3)]
public void MemoryStreamOverCapacity(Guid guid, string tag, long requestedCapacity, long maxCapacity, string allocationStack)
{
if (this.IsEnabled())
{
WriteEvent(11, guid, tag ?? string.Empty, requestedCapacity, maxCapacity, allocationStack ?? string.Empty);
}
}
}
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 25287e2fc3cca8444a5514df30ac7c13
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 943657a525c4a1f469a62b5e8cb2c319
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 1e251d7371d835143ab1ba00fe110831
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant: