Commit 3ebaa4b5 authored by Daniel Gröber (dxld)'s avatar Daniel Gröber (dxld)

rts: Remove bitrotten retainer debug code

The `defined(DEBUG_RETAINER) == true` branch doesn't even compile anymore
because 1) retainerSet was renamed to RetainerSet and 2) even if I fix that
the context in Rts.h seems to have changed such that it's not in scope. If
3) I fix that 'flip' is still not in scope :)  At that point I just gave up.
parent da12da79
......@@ -117,36 +117,20 @@ INLINE_HEADER StgHalfWord GET_TAG(const StgClosure *con)
-------------------------------------------------------------------------- */
#if defined(PROFILING)
#if defined(DEBUG_RETAINER)
For the sake of debugging, we take the safest way for the moment. Actually, this
is useful to check the sanity of heap before beginning retainer profiling.
flip is defined in RetainerProfile.c, and declared as extern in RetainerProfile.h.
Note: change those functions building Haskell objects from C datatypes, i.e.,
all rts_mk???() functions in RtsAPI.c, as well.
#define SET_PROF_HDR(c,ccs_) \
((c)-> = ccs_, (c)-> = (retainerSet *)((StgWord)NULL | flip))
For retainer profiling only: we do not have to set (c)-> to
NULL | flip (flip is defined in RetainerProfile.c) because even when flip
is 1, rs is invalid and will be initialized to NULL | flip later when
the closure *c is visited.
#define SET_PROF_HDR(c,ccs_) \
((c)-> = ccs_, (c)-> = NULL)
The following macro works for both retainer profiling and LDV profiling:
for retainer profiling, ldvTime remains 0, so rs fields are initialized to 0.
See the invariants on ldvTime.
The following macro works for both retainer profiling and LDV profiling. For
retainer profiling, 'era' remains 0, so by setting the 'ldvw' field we also set
'rs' to zero.
Note that we don't have to bother handling the 'flip' bit properly[1] since the
retainer profiling code will just set 'rs' to NULL upon visiting a closure with
an invalid 'flip' bit anyways.
[1]: Technically we should set 'rs' to `NULL | flip`.
#define SET_PROF_HDR(c,ccs_) \
((c)-> = ccs_, \
#endif /* DEBUG_RETAINER */
#define SET_PROF_HDR(c,ccs)
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment