
#7763: Resource limits for Haskell -----------------------------+---------------------------------------------- Reporter: ezyang | Owner: ezyang Type: feature request | Status: new Priority: normal | Component: Profiling Version: 7.7 | Keywords: Os: Unknown/Multiple | Architecture: Unknown/Multiple Failure: None/Unknown | Blockedby: Blocking: | Related: -----------------------------+---------------------------------------------- Description changed by ezyang: Old description:
{{{ commit 1f5eb79cc278fd64ee3f1f4249ea3b7404f62ba1 Author: Edward Z. Yang
Date: Thu Mar 7 13:53:31 2013 -0800 Primops and runtime support for space resource limits.
This patch adds support for resource limits in Haskell, especially for monitoring and triggering events when portions of Haskell code exceed memory usage and/or allocation. The system is described in more detail at.
http://hackage.haskell.org/trac/ghc/wiki/Commentary/ResourceLimits
This patch adds the following types:
CostCentre# - non-GCd pointer to CostCentre struct CostCentreStack# - non-GCd pointer to CostCentreStack struct Listener# - GC'd object for listening to pointer events
and the following primops:
ccToAddr addrToCC ccsToAddr addrToCCS
newCC# setCCSOf# withCCS# pushCC# queryCCS# listenCCS# unlistenCCS#
These previously existing primops have had their types changed, mainly for better type safety (replacing Addr# with CostCentreStack#)
getCCSOf# getCurrentCCS#
We add the following new RTS options:
-hl equivalent to -hc but also keeps census information in- memory for access and does not write out a *.hp file
-xf modified cost-centre stack semantics, where function entries never modify the stack (so only CAFs and explicit set CCCS affect cost-centres).
To utilize these new features, compile with -prof and run with +RTS -hl -xf }}}
See also http://hackage.haskell.org/trac/ghc/wiki/Commentary/ResourceLimits
New description:
{{{
commit 1f5eb79cc278fd64ee3f1f4249ea3b7404f62ba1
Author: Edward Z. Yang