Skip to content

Commit 1a12e7e

Browse files
authored
GCMemoryInfo improvements (dotnet#5225)
1 parent fa5a043 commit 1a12e7e

File tree

1 file changed

+20
-28
lines changed

1 file changed

+20
-28
lines changed

xml/System/GCMemoryInfo.xml

Lines changed: 20 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,7 @@
2828
2929
## Remarks
3030
31-
A GC is identified by its Index. which starts from 1 and increases with each GC (see more explanation of it in the Index property).
32-
If you are asking for a GC that does not exist, eg, you called the GC.GetGCMemoryInfo API before a GC happened, or you are asking for a GC of GCKind.FullBlocking and no full blocking GCs have happened, you will get all 0's in the info, including the Index. So you can use Index 0 to detect that no GCs, or no GCs of the kind you specified have happened.
31+
A GC is identified by its <xref:System.GCMemoryInfo.Index>, which starts from 1 and increases with each GC. If you are asking for a GC that doesn't exist, for example, you called the <xref:System.GC.GetGCMemoryInfo%2A> method before a GC happened, or you're asking for a GC of <xref:System.GCKind.FullBlocking?displayProperty=nameWithType> and no full blocking GCs have happened, you will get all 0's in the info, including the <xref:System.GCMemoryInfo.Index>. You can use index 0 to detect that no GCs, or no GCs of the kind you specified, have occurred.
3332
3433
]]></format>
3534
</remarks>
@@ -51,7 +50,7 @@ A GC is identified by its Index. which starts from 1 and increases with each GC
5150
<ReturnType>System.Boolean</ReturnType>
5251
</ReturnValue>
5352
<Docs>
54-
<summary>Specifies if this is a compacting GC or not.</summary>
53+
<summary>Gets a value that indicates if this is a compacting GC or not.</summary>
5554
<value>
5655
<see langword="true" /> if this is a compacting GC; <see langword="false" /> otherwise.</value>
5756
<remarks>To be added.</remarks>
@@ -73,7 +72,7 @@ A GC is identified by its Index. which starts from 1 and increases with each GC
7372
<ReturnType>System.Boolean</ReturnType>
7473
</ReturnValue>
7574
<Docs>
76-
<summary>Specifies if this is a concurrent GC (BGC) or not.</summary>
75+
<summary>Gets a value that indicates if this is a concurrent GC (BGC) or not.</summary>
7776
<value>
7877
<see langword="true" /> if this is a concurrent GC (BGC); <see langword="false" /> otherwise.</value>
7978
<remarks>To be added.</remarks>
@@ -95,8 +94,8 @@ A GC is identified by its Index. which starts from 1 and increases with each GC
9594
<ReturnType>System.Int64</ReturnType>
9695
</ReturnValue>
9796
<Docs>
98-
<summary>Gets the number of objects ready for finalization this GC observed.</summary>
99-
<value>A number representing the total objects observed by this GC that are ready for finalization.</value>
97+
<summary>Gets the number of objects that are ready for finalization that this GC observed.</summary>
98+
<value>The total number of objects observed by this GC that are ready for finalization.</value>
10099
<remarks>To be added.</remarks>
101100
</Docs>
102101
</Member>
@@ -119,7 +118,7 @@ A GC is identified by its Index. which starts from 1 and increases with each GC
119118
</ReturnValue>
120119
<Docs>
121120
<summary>Gets the total fragmentation when the last garbage collection occurred.</summary>
122-
<value>An integer representing the total fragmentation when the last garbage collection occurred.</value>
121+
<value>The total fragmentation when the last garbage collection occurred.</value>
123122
<remarks>
124123
<format type="text/markdown"><![CDATA[
125124
@@ -135,7 +134,7 @@ If `OBJ_B`, `OBJ_C`, and `OBJ_E` are garbage collected but the heap is not compa
135134
136135
The memory between `OBJ_A` and `OBJ_D`, which is marked `F`, is considered part of the `FragmentedBytes` and is used to allocate new objects.
137136
138-
The memory after `OBJ_D` is not considered part of the `FragmentedBytes` but will also be used to allocate new objects.
137+
The memory after `OBJ_D` is not considered part of the `FragmentedBytes` but is also used to allocate new objects.
139138
140139
]]></format>
141140
</remarks>
@@ -157,8 +156,8 @@ The memory after `OBJ_D` is not considered part of the `FragmentedBytes` but wil
157156
<ReturnType>System.Int32</ReturnType>
158157
</ReturnValue>
159158
<Docs>
160-
<summary>Gets the generation this GC collected. Collecting a generation means all its younger generation(s) are also collected.</summary>
161-
<value>A number representing the generation this GC collected.</value>
159+
<summary>Gets the generation this GC collected. Collecting a generation also collected younger generations.</summary>
160+
<value>The generation this GC collected.</value>
162161
<remarks>To be added.</remarks>
163162
</Docs>
164163
</Member>
@@ -179,7 +178,7 @@ The memory after `OBJ_D` is not considered part of the `FragmentedBytes` but wil
179178
</ReturnValue>
180179
<Docs>
181180
<summary>Gets the generation information for all generations.</summary>
182-
<value>A read-only span containing the generation information for all generations.</value>
181+
<value>The generation information for all generations.</value>
183182
<remarks>To be added.</remarks>
184183
</Docs>
185184
</Member>
@@ -245,9 +244,9 @@ The memory after `OBJ_D` is not considered part of the `FragmentedBytes` but wil
245244
<ReturnType>System.Int64</ReturnType>
246245
</ReturnValue>
247246
<Docs>
248-
<summary>The index of this GC. GC indices start with 1 and get increased at the beginning of a GC.
249-
Since the information is updated at the end of a GC, this means you can get the information for a BGC with a smaller index than a foreground GC finished earlier.</summary>
250-
<value>A number representing the index of this GC.</value>
247+
<summary>Gets the index of this GC. GC indices start with 1 and are increased at the beginning of a GC.
248+
Since the information is updated at the end of a GC, this means you can get the information for a background GC with a smaller index than a foreground GC that finished earlier.</summary>
249+
<value>The index of this GC.</value>
251250
<remarks>To be added.</remarks>
252251
</Docs>
253252
</Member>
@@ -290,7 +289,7 @@ The memory after `OBJ_D` is not considered part of the `FragmentedBytes` but wil
290289
<ReturnType>System.ReadOnlySpan&lt;System.TimeSpan&gt;</ReturnType>
291290
</ReturnValue>
292291
<Docs>
293-
<summary>Gets the pause durations. For blocking GCs there's only 1 pause; for BGC there are 2.</summary>
292+
<summary>Gets the pause durations. For blocking GCs, there is one pause; for background GC, there are two.</summary>
294293
<value>A timespan representing the pause durations.</value>
295294
<remarks>To be added.</remarks>
296295
</Docs>
@@ -311,16 +310,9 @@ The memory after `OBJ_D` is not considered part of the `FragmentedBytes` but wil
311310
<ReturnType>System.Double</ReturnType>
312311
</ReturnValue>
313312
<Docs>
314-
<summary>Gets the pause time percentage in the GC so far.</summary>
315-
<value>A number representing the pause time percentage.</value>
316-
<remarks>
317-
<format type="text/markdown"><![CDATA[
318-
## Remarks
319-
320-
If it's 1.2%, this number is 1.2.
321-
322-
]]></format>
323-
</remarks>
313+
<summary>Gets the pause time percentage in the GC so far. If the pause time is 1.2%, this property's value is 1.2. The value is calculated by taking the sum of all GC pauses so far and dividing that by the total elapsed time of the process since the runtime was loaded. This running counter is updated at the end of each GC. It does not distinguish between <see cref="T:System.GCKind" />. That is, at every GC, the calculated value is updated, and when you access this property, it gets the latest calculated value.</summary>
314+
<value>The pause time percentage.</value>
315+
<remarks>To be added.</remarks>
324316
</Docs>
325317
</Member>
326318
<Member MemberName="PinnedObjectsCount">
@@ -340,7 +332,7 @@ If it's 1.2%, this number is 1.2.
340332
</ReturnValue>
341333
<Docs>
342334
<summary>Gets the number of pinned objects this GC observed.</summary>
343-
<value>A number representing the total pinned objects observed by this GC.</value>
335+
<value>The total number of pinned objects observed by this GC.</value>
344336
<remarks>To be added.</remarks>
345337
</Docs>
346338
</Member>
@@ -361,7 +353,7 @@ If it's 1.2%, this number is 1.2.
361353
</ReturnValue>
362354
<Docs>
363355
<summary>Gets the promoted bytes for this GC.</summary>
364-
<value>A number representing the number of promoted bytes for this GC.</value>
356+
<value>The number of promoted bytes for this GC.</value>
365357
<remarks>To be added.</remarks>
366358
</Docs>
367359
</Member>
@@ -417,7 +409,7 @@ Otherwise, the value of the property is the physical memory on the machine that
417409
</ReturnValue>
418410
<Docs>
419411
<summary>Gets the total committed bytes of the managed heap.</summary>
420-
<value>A number representing the total commited bytes of the managed heap.</value>
412+
<value>The total committed bytes of the managed heap.</value>
421413
<remarks>To be added.</remarks>
422414
</Docs>
423415
</Member>

0 commit comments

Comments
 (0)