[GHC] #15880: GHC.Stats: Add info on amount of pinned memory
GHC
ghc-devs at haskell.org
Mon Nov 12 04:29:36 UTC 2018
#15880: GHC.Stats: Add info on amount of pinned memory
-------------------------------------+-------------------------------------
Reporter: nh2 | Owner: (none)
Type: task | Status: new
Priority: normal | Milestone: 8.6.3
Component: Runtime System | Version: 8.6.2
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture:
| Unknown/Multiple
Type of failure: None/Unknown | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s):
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by osa1):
To answer the questions:
- `gcdetails_mem_in_use_bytes` is simply `mblocks_allocated *
MBLOCK_SIZE`.
Because pinned memory is also allocated via the block allocator
`gcdetails_mem_in_use_bytes` includes pinned memory too.
- I don't understand this question.
- You'd need to compute this. In the GC once a pinned object block is
filled we
only distinguish a pinned object block from a large object block in one
place,
to avoid scavenging pinned blocks. So there's no special accounting for
pinned
objects.
Perhaps you could implement something like `calcTotalLargeObjectsW` by
checking if a `BF_LARGE` block is also `BF_PINNED`. If it is then add
number
of blocks to a counter. Then `num_of_blocks * BLOCK_SIZE` gives you the
bytes.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/15880#comment:1>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list