[commit: ghc] master: More accurate allocation stats for :set +s (cf7573b)
git at git.haskell.org
git at git.haskell.org
Mon May 11 11:51:37 UTC 2015
Repository : ssh://git@git.haskell.org/ghc
On branch : master
Link : http://ghc.haskell.org/trac/ghc/changeset/cf7573b8207bbb17c58612f3345e0b17d74cfb58/ghc
>---------------------------------------------------------------
commit cf7573b8207bbb17c58612f3345e0b17d74cfb58
Author: Simon Marlow <marlowsd at gmail.com>
Date: Fri May 8 15:28:40 2015 +0100
More accurate allocation stats for :set +s
The point of this commit is to make the memory allocation statistic
from :set +s in GHCi a lot more accurate. Currently it uses the total
allocation figure calculated by the RTS, which is only updated during
GC, so can be wrong by an arbitrary amount. The fix is to the the
per-thread allocation counter that was introduced for allocation
limits.
This required changes to the GHC API, because we now have to return
the allocation value from each evaluation. Rather than just change
the API, I introduced a new API and deprecated the old one. The new
one is simpler and more extensible, so hopefully we won't need to make
this transition in the future. See GHC.hs for details.
>---------------------------------------------------------------
cf7573b8207bbb17c58612f3345e0b17d74cfb58
compiler/main/GHC.hs | 62 +++++++-----
compiler/main/InteractiveEval.hs | 131 ++++++++++++++++++--------
compiler/main/InteractiveEvalTypes.hs | 37 ++++++--
ghc/GhciMonad.hs | 37 ++++----
ghc/InteractiveUI.hs | 65 ++++++++-----
testsuite/tests/ghc-api/T8628.hs | 8 +-
testsuite/tests/ghc-api/T8639_api.hs | 4 +-
testsuite/tests/ghc-api/apirecomp001/myghc.hs | 8 +-
8 files changed, 234 insertions(+), 118 deletions(-)
Diff suppressed because of size. To see it, use:
git diff-tree --root --patch-with-stat --no-color --find-copies-harder --ignore-space-at-eol --cc cf7573b8207bbb17c58612f3345e0b17d74cfb58
More information about the ghc-commits
mailing list