diff options
author | Matthew Pickering <matthewtpickering@gmail.com> | 2021-02-26 15:40:18 +0000 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2021-03-08 07:32:15 -0500 |
commit | 33a4fd9939f8fc8e9ba4e61041270353f51ae55e (patch) | |
tree | 8bc3624fc179d11dc68a504646bae97b1ce48dcb /docs | |
parent | 657b5538904f7d9e0b3ea5d84f4017af3c513df9 (diff) | |
download | haskell-33a4fd9939f8fc8e9ba4e61041270353f51ae55e.tar.gz |
eventlog: Add MEM_RETURN event to give information about fragmentation
See #19357
The event reports the
* Current number of megablocks allocated
* The number that the RTS thinks it needs
* The number is managed to return to the OS
When current > need then the difference is returned to the OS, the
successful number of returned mblocks is reported by 'returned'.
In a fragmented heap current > need but returned < current - need.
Diffstat (limited to 'docs')
-rw-r--r-- | docs/users_guide/eventlog-formats.rst | 26 |
1 files changed, 23 insertions, 3 deletions
diff --git a/docs/users_guide/eventlog-formats.rst b/docs/users_guide/eventlog-formats.rst index 9ccd6bb2cf..f8561a911d 100644 --- a/docs/users_guide/eventlog-formats.rst +++ b/docs/users_guide/eventlog-formats.rst @@ -258,6 +258,10 @@ A typical garbage collection will look something like the following: 13. As mutator threads resume execution they will emit :event-type:`RUN_THREAD` events. +14. A :event-type:`MEM_RETURN` event will be emitted containing details about + currently live mblocks, how many we think we need and whether we could return + excess to the OS. + Note that in the case of the concurrent non-moving collector additional events will be emitted during the concurrent phase of collection. These are described in :ref:`nonmoving-gc-events`. @@ -319,13 +323,14 @@ in :ref:`nonmoving-gc-events`. :field Word16: generation of collection :field Word64: bytes copied :field Word64: bytes of slop found - :field Word64: TODO + :field Word64: bytes of fragmentation, the difference between total mblock size + and total block size. When all mblocks are full of full blocks, + this number is 0. :field Word64: number of parallel garbage collection threads :field Word64: maximum number of bytes copied by any single collector thread :field Word64: total bytes copied by all collector threads - Report various information about the heap configuration. Typically produced - during RTS initialization.. + Report various information about a major collection. .. event-type:: GC_GLOBAL_SYNC @@ -334,6 +339,21 @@ in :ref:`nonmoving-gc-events`. TODO +.. event-type:: MEM_RETURN + + :tag: 90 + :length: fixed + :field CapSetId: heap capability set + :field Word32: currently allocated mblocks + :field Word32: the number of mblocks we would like to retain + :field Word32: the number of mblocks which we returned to the OS + + Report information about currently allocation megablocks and attempts + made to return them to the operating system. If your heap is fragmented + then the current value will be greater than needed value but returned will + be less than the difference between the two. + + Heap events and statistics ~~~~~~~~~~~~~~~~~~~~~~~~~~ |