@@ -442,12 +442,11 @@ func readmemstats_m(stats *MemStats) {
442
442
443
443
stackInUse := uint64 (consStats .inStacks )
444
444
gcWorkBufInUse := uint64 (consStats .inWorkBufs )
445
- gcProgPtrScalarBitsInUse := uint64 (consStats .inPtrScalarBits )
446
445
447
446
totalMapped := gcController .heapInUse .load () + gcController .heapFree .load () + gcController .heapReleased .load () +
448
447
memstats .stacks_sys .load () + memstats .mspan_sys .load () + memstats .mcache_sys .load () +
449
448
memstats .buckhash_sys .load () + memstats .gcMiscSys .load () + memstats .other_sys .load () +
450
- stackInUse + gcWorkBufInUse + gcProgPtrScalarBitsInUse
449
+ stackInUse + gcWorkBufInUse
451
450
452
451
heapGoal := gcController .heapGoal ()
453
452
@@ -461,7 +460,7 @@ func readmemstats_m(stats *MemStats) {
461
460
//
462
461
// * memstats.heapInUse == inHeap
463
462
// * memstats.heapReleased == released
464
- // * memstats.heapInUse + memstats.heapFree == committed - inStacks - inWorkBufs - inPtrScalarBits
463
+ // * memstats.heapInUse + memstats.heapFree == committed - inStacks - inWorkBufs
465
464
// * memstats.totalAlloc == totalAlloc
466
465
// * memstats.totalFree == totalFree
467
466
//
@@ -482,7 +481,7 @@ func readmemstats_m(stats *MemStats) {
482
481
throw ("heapReleased and consistent stats are not equal" )
483
482
}
484
483
heapRetained := gcController .heapInUse .load () + gcController .heapFree .load ()
485
- consRetained := uint64 (consStats .committed - consStats .inStacks - consStats .inWorkBufs - consStats . inPtrScalarBits )
484
+ consRetained := uint64 (consStats .committed - consStats .inStacks - consStats .inWorkBufs )
486
485
if heapRetained != consRetained {
487
486
print ("runtime: global value=" , heapRetained , "\n " )
488
487
print ("runtime: consistent value=" , consRetained , "\n " )
@@ -533,8 +532,8 @@ func readmemstats_m(stats *MemStats) {
533
532
//
534
533
// or
535
534
//
536
- // HeapSys = sys - stacks_inuse - gcWorkBufInUse - gcProgPtrScalarBitsInUse
537
- // HeapIdle = sys - stacks_inuse - gcWorkBufInUse - gcProgPtrScalarBitsInUse - heapInUse
535
+ // HeapSys = sys - stacks_inuse - gcWorkBufInUse
536
+ // HeapIdle = sys - stacks_inuse - gcWorkBufInUse - heapInUse
538
537
//
539
538
// => HeapIdle = HeapSys - heapInUse = heapFree + heapReleased
540
539
stats .HeapIdle = gcController .heapFree .load () + gcController .heapReleased .load ()
@@ -553,7 +552,7 @@ func readmemstats_m(stats *MemStats) {
553
552
// MemStats defines GCSys as an aggregate of all memory related
554
553
// to the memory management system, but we track this memory
555
554
// at a more granular level in the runtime.
556
- stats .GCSys = memstats .gcMiscSys .load () + gcWorkBufInUse + gcProgPtrScalarBitsInUse
555
+ stats .GCSys = memstats .gcMiscSys .load () + gcWorkBufInUse
557
556
stats .OtherSys = memstats .other_sys .load ()
558
557
stats .NextGC = heapGoal
559
558
stats .LastGC = memstats .last_gc_unix
@@ -678,12 +677,11 @@ func (s *sysMemStat) add(n int64) {
678
677
// consistent with one another.
679
678
type heapStatsDelta struct {
680
679
// Memory stats.
681
- committed int64 // byte delta of memory committed
682
- released int64 // byte delta of released memory generated
683
- inHeap int64 // byte delta of memory placed in the heap
684
- inStacks int64 // byte delta of memory reserved for stacks
685
- inWorkBufs int64 // byte delta of memory reserved for work bufs
686
- inPtrScalarBits int64 // byte delta of memory reserved for unrolled GC prog bits
680
+ committed int64 // byte delta of memory committed
681
+ released int64 // byte delta of released memory generated
682
+ inHeap int64 // byte delta of memory placed in the heap
683
+ inStacks int64 // byte delta of memory reserved for stacks
684
+ inWorkBufs int64 // byte delta of memory reserved for work bufs
687
685
688
686
// Allocator stats.
689
687
//
@@ -709,7 +707,6 @@ func (a *heapStatsDelta) merge(b *heapStatsDelta) {
709
707
a .inHeap += b .inHeap
710
708
a .inStacks += b .inStacks
711
709
a .inWorkBufs += b .inWorkBufs
712
- a .inPtrScalarBits += b .inPtrScalarBits
713
710
714
711
a .tinyAllocCount += b .tinyAllocCount
715
712
a .largeAlloc += b .largeAlloc
0 commit comments