1 /* -----------------------------------------------------------------------------
3 * (c) The University of Glasgow, 2004
5 * Lag/Drag/Void profiling.
7 * ---------------------------------------------------------------------------*/
14 /* retrieves the LDV word from closure c */
15 #define LDVW(c) (((StgClosure *)(c))->header.prof.hp.ldvw)
18 * Stores the creation time for closure c.
19 * This macro is called at the very moment of closure creation.
21 * NOTE: this initializes LDVW(c) to zero, which ensures that there
22 * is no conflict between retainer profiling and LDV profiling,
23 * because retainer profiling also expects LDVW(c) to be initialised
27 #define LDV_RECORD_CREATE(c) \
28 LDVW((c)) = ((StgWord)RTS_DEREF(era) << LDV_SHIFT) | LDV_STATE_CREATE
32 #define LDV_RECORD_DEAD_FILL_SLOP_DYNAMIC(c) \
33 foreign "C" LDV_recordDead_FILL_SLOP_DYNAMIC(c "ptr")
35 #define LDV_RECORD_DEAD_FILL_SLOP_DYNAMIC(c) \
36 LDV_recordDead_FILL_SLOP_DYNAMIC(c)
39 #else /* !PROFILING */
41 #define LDV_RECORD_CREATE(c) /* nothing */
42 #define LDV_RECORD_DEAD_FILL_SLOP_DYNAMIC(c) /* nothing */
44 #endif /* PROFILING */
45 #endif /* STGLDVPROF_H */