\begin{code} #include "rtsdefs.h" #if defined(DO_RUNTIME_TRACE_UPDATES) /********** Debugging Tracing of Updates ***********/ /* These will only be called if StgUpdate.h macro calls compiled with -DDO_RUNTIME_TRACE_UPDATES */ extern I_ traceUpdates; /* a Bool, essentially */ void TRACE_UPDATE_Ind(updclosure,heapptr) P_ updclosure,heapptr; { #if defined(GCap) if (traceUpdates) { fprintf(stderr,"Upd Ind %s Gen: 0x%lx -> 0x%lx\n", (updclosure) <= StorageMgrInfo.OldLim ? "Old" : "New", (W_) updclosure, (W_) heapptr); } #else if (traceUpdates) { fprintf(stderr,"Upd Ind: 0x%lx -> 0x%lx\n", (W_) updclosure, (W_) heapptr); } #endif } void TRACE_UPDATE_Inplace_NoPtrs(updclosure) P_ updclosure; { #if defined(GCap) if (traceUpdates) { fprintf(stderr,"Upd Inplace %s Gen: 0x%lx\n", (updclosure) <= StorageMgrInfo.OldLim ? "Old" : "New", (W_) updclosure); } #else if (traceUpdates) { fprintf(stderr,"Upd Inplace: 0x%lx\n", (W_) updclosure); } #endif } void TRACE_UPDATE_Inplace_Ptrs(updclosure, hp) P_ updclosure; P_ hp; { #if defined(GCap) if (traceUpdates) { if ((updclosure) <= StorageMgrInfo.OldLim) { fprintf(stderr,"Upd Redirect Old Gen (Ptrs): 0x%lx -> 0x%lx\n", (W_) updclosure, (W_) (hp + 1)); } else { fprintf(stderr,"Upd Inplace New Gen (Ptrs): 0x%lx\n", (W_) updclosure); } } #else if (traceUpdates) { fprintf(stderr,"Update Inplace: 0x%lx\n", (W_) updclosure); } #endif } #endif /* DO_RUNTIME_TRACE_UPDATES */ \end{code}