summaryrefslogtreecommitdiff
path: root/ghc/rts/Weak.c
diff options
context:
space:
mode:
authorsimonmar <unknown>2001-11-26 16:54:22 +0000
committersimonmar <unknown>2001-11-26 16:54:22 +0000
commitdbef766ce79e37a74468a07a93b15ba1f06fe8f8 (patch)
tree6230721a46c1d7b9c10387a4e6cf6cca08a3ccd1 /ghc/rts/Weak.c
parent5680ea4b2035198981739e24ad04cd0e0d133172 (diff)
downloadhaskell-dbef766ce79e37a74468a07a93b15ba1f06fe8f8.tar.gz
[project @ 2001-11-26 16:54:21 by simonmar]
Profiling cleanup. This commit eliminates some duplication in the various heap profiling subsystems, and generally centralises much of the machinery. The key concept is the separation of a heap *census* (which is now done in one place only instead of three) from the calculation of retainer sets. Previously the retainer profiling code also did a heap census on the fly, and lag-drag-void profiling had its own census machinery. Value-adds: - you can now restrict a heap profile to certain retainer sets, but still display by cost centre (or type, or closure or whatever). - I've added an option to restrict the maximum retainer set size (+RTS -R<size>, defaulting to 8). - I've cleaned up the heap profiling options at the request of Simon PJ. See the help text for details. The new scheme is backwards compatible with the old. - I've removed some odd bits of LDV or retainer profiling-specific code from various parts of the system. - the time taken doing heap censuses (and retainer set calculation) is now accurately reported by the RTS when you say +RTS -Sstderr. Still to come: - restricting a profile to a particular biography (lag/drag/void/use). This requires keeping old heap censuses around, but the infrastructure is now in place to do this.
Diffstat (limited to 'ghc/rts/Weak.c')
-rw-r--r--ghc/rts/Weak.c11
1 files changed, 1 insertions, 10 deletions
diff --git a/ghc/rts/Weak.c b/ghc/rts/Weak.c
index c80cf8c3c1..ef26e3b7ba 100644
--- a/ghc/rts/Weak.c
+++ b/ghc/rts/Weak.c
@@ -1,5 +1,5 @@
/* -----------------------------------------------------------------------------
- * $Id: Weak.c,v 1.19 2001/11/22 14:25:13 simonmar Exp $
+ * $Id: Weak.c,v 1.20 2001/11/26 16:54:22 simonmar Exp $
*
* (c) The GHC Team, 1998-1999
*
@@ -36,15 +36,6 @@ finalizeWeakPointersNow(void)
while ((w = weak_ptr_list)) {
weak_ptr_list = w->link;
if (w->header.info != &stg_DEAD_WEAK_info) {
- // @LDV profiling
- // Even thought the info type of w changes, we DO NOT perform any
- // LDV profiling because at this moment, LDV profiling must already
- // have been terminated. See the comments in shutdownHaskell().
- // At any rate, there is no need to call LDV_recordDead() because
- // weak pointers are inherently used.
-#ifdef PROFILING
- ASSERT(ldvTime == 0); // LDV profiling is turned off.
-#endif
w->header.info = &stg_DEAD_WEAK_info;
IF_DEBUG(weak,fprintf(stderr,"Finalising weak pointer at %p -> %p\n", w, w->key));
if (w->finalizer != &stg_NO_FINALIZER_closure) {