Fix parallel make for libffi.
[ghc.git] / rts / LdvProfile.h
1 /* -----------------------------------------------------------------------------
2 *
3 * (c) The GHC Team, 2001
4 * Author: Sungwoo Park
5 *
6 * Lag/Drag/Void profiling.
7 *
8 * ---------------------------------------------------------------------------*/
9
10 #ifndef LDVPROFILE_H
11 #define LDVPROFILE_H
12
13 #ifdef PROFILING
14
15 #include "ProfHeap.h"
16
17 extern void LDV_recordDead_FILL_SLOP_DYNAMIC( StgClosure *p );
18 extern void LdvCensusForDead ( nat );
19 extern void LdvCensusKillAll ( void );
20
21 // Creates a 0-filled slop of size 'howManyBackwards' backwards from the
22 // address 'from'.
23 //
24 // Invoked when:
25 // 1) Hp is incremented and exceeds HpLim (in Updates.hc).
26 // 2) copypart() is called (in GC.c).
27 #define LDV_FILL_SLOP(from, howMany) \
28 if (era > 0) { \
29 int i; \
30 for (i = 0;i < (howMany); i++) \
31 ((StgWord *)(from))[i] = 0; \
32 }
33
34 // Informs the LDV profiler that closure c has just been evacuated.
35 // Evacuated objects are no longer needed, so we just store its original size in
36 // the LDV field.
37 #define SET_EVACUAEE_FOR_LDV(c, size) \
38 LDVW((c)) = (size)
39
40 #endif /* PROFILING */
41
42 #endif /* LDVPROFILE_H */