Commit 70a2431f authored by Simon Marlow's avatar Simon Marlow

Remove the IND_OLDGEN and IND_OLDGEN_PERM closure types

These are no longer used: once upon a time they used to have different
layout from IND and IND_PERM respectively, but that is no longer the
case since we changed the remembered set to be an array of addresses
instead of a linked list of closures.
parent f4692220
...@@ -295,9 +295,7 @@ ...@@ -295,9 +295,7 @@
(TO_W_( %INFO_TYPE(%STD_INFO(info)) )) { \ (TO_W_( %INFO_TYPE(%STD_INFO(info)) )) { \
case \ case \
IND, \ IND, \
IND_OLDGEN, \
IND_PERM, \ IND_PERM, \
IND_OLDGEN_PERM, \
IND_STATIC: \ IND_STATIC: \
{ \ { \
P1 = StgInd_indirectee(P1); \ P1 = StgInd_indirectee(P1); \
......
...@@ -327,8 +327,6 @@ closure_sizeW_ (StgClosure *p, StgInfoTable *info) ...@@ -327,8 +327,6 @@ closure_sizeW_ (StgClosure *p, StgInfoTable *info)
return pap_sizeW((StgPAP *)p); return pap_sizeW((StgPAP *)p);
case IND: case IND:
case IND_PERM: case IND_PERM:
case IND_OLDGEN:
case IND_OLDGEN_PERM:
return sizeofW(StgInd); return sizeofW(StgInd);
case ARR_WORDS: case ARR_WORDS:
return arr_words_sizeW((StgArrWords *)p); return arr_words_sizeW((StgArrWords *)p);
......
...@@ -50,38 +50,36 @@ ...@@ -50,38 +50,36 @@
#define PAP 26 #define PAP 26
#define AP_STACK 27 #define AP_STACK 27
#define IND 28 #define IND 28
#define IND_OLDGEN 29 #define IND_PERM 29
#define IND_PERM 30 #define IND_STATIC 30
#define IND_OLDGEN_PERM 31 #define RET_BCO 31
#define IND_STATIC 32 #define RET_SMALL 32
#define RET_BCO 33 #define RET_BIG 33
#define RET_SMALL 34 #define RET_DYN 34
#define RET_BIG 35 #define RET_FUN 35
#define RET_DYN 36 #define UPDATE_FRAME 36
#define RET_FUN 37 #define CATCH_FRAME 37
#define UPDATE_FRAME 38 #define STOP_FRAME 38
#define CATCH_FRAME 39 #define BLOCKING_QUEUE 39
#define STOP_FRAME 40 #define BLACKHOLE 40
#define BLOCKING_QUEUE 41 #define MVAR_CLEAN 41
#define BLACKHOLE 42 #define MVAR_DIRTY 42
#define MVAR_CLEAN 43 #define ARR_WORDS 43
#define MVAR_DIRTY 44 #define MUT_ARR_PTRS_CLEAN 44
#define ARR_WORDS 45 #define MUT_ARR_PTRS_DIRTY 45
#define MUT_ARR_PTRS_CLEAN 46 #define MUT_ARR_PTRS_FROZEN0 46
#define MUT_ARR_PTRS_DIRTY 47 #define MUT_ARR_PTRS_FROZEN 47
#define MUT_ARR_PTRS_FROZEN0 48 #define MUT_VAR_CLEAN 48
#define MUT_ARR_PTRS_FROZEN 49 #define MUT_VAR_DIRTY 49
#define MUT_VAR_CLEAN 50 #define WEAK 50
#define MUT_VAR_DIRTY 51 #define PRIM 51
#define WEAK 52 #define MUT_PRIM 52
#define PRIM 53 #define TSO 53
#define MUT_PRIM 54 #define TREC_CHUNK 54
#define TSO 55 #define ATOMICALLY_FRAME 55
#define TREC_CHUNK 56 #define CATCH_RETRY_FRAME 56
#define ATOMICALLY_FRAME 57 #define CATCH_STM_FRAME 57
#define CATCH_RETRY_FRAME 58 #define WHITEHOLE 58
#define CATCH_STM_FRAME 59 #define N_CLOSURE_TYPES 59
#define WHITEHOLE 60
#define N_CLOSURE_TYPES 61
#endif /* RTS_STORAGE_CLOSURETYPES_H */ #endif /* RTS_STORAGE_CLOSURETYPES_H */
...@@ -83,8 +83,6 @@ RTS_ENTRY(stg_IND); ...@@ -83,8 +83,6 @@ RTS_ENTRY(stg_IND);
RTS_ENTRY(stg_IND_direct); RTS_ENTRY(stg_IND_direct);
RTS_ENTRY(stg_IND_STATIC); RTS_ENTRY(stg_IND_STATIC);
RTS_ENTRY(stg_IND_PERM); RTS_ENTRY(stg_IND_PERM);
RTS_ENTRY(stg_IND_OLDGEN);
RTS_ENTRY(stg_IND_OLDGEN_PERM);
RTS_ENTRY(stg_BLACKHOLE); RTS_ENTRY(stg_BLACKHOLE);
RTS_ENTRY(stg_CAF_BLACKHOLE); RTS_ENTRY(stg_CAF_BLACKHOLE);
RTS_ENTRY(__stg_EAGER_BLACKHOLE); RTS_ENTRY(__stg_EAGER_BLACKHOLE);
......
...@@ -50,9 +50,7 @@ StgWord16 closure_flags[] = { ...@@ -50,9 +50,7 @@ StgWord16 closure_flags[] = {
[PAP] = (_HNF| _NS ), [PAP] = (_HNF| _NS ),
[AP_STACK] = ( _THU ), [AP_STACK] = ( _THU ),
[IND] = ( _NS| _IND ), [IND] = ( _NS| _IND ),
[IND_OLDGEN] = ( _NS| _IND ),
[IND_PERM] = ( _NS| _IND ), [IND_PERM] = ( _NS| _IND ),
[IND_OLDGEN_PERM] = ( _NS| _IND ),
[IND_STATIC] = ( _NS|_STA| _IND ), [IND_STATIC] = ( _NS|_STA| _IND ),
[RET_BCO] = ( _BTM ), [RET_BCO] = ( _BTM ),
[RET_SMALL] = ( _BTM| _SRT ), [RET_SMALL] = ( _BTM| _SRT ),
...@@ -84,6 +82,6 @@ StgWord16 closure_flags[] = { ...@@ -84,6 +82,6 @@ StgWord16 closure_flags[] = {
[WHITEHOLE] = ( 0 ) [WHITEHOLE] = ( 0 )
}; };
#if N_CLOSURE_TYPES != 61 #if N_CLOSURE_TYPES != 59
#error Closure types changed: update ClosureFlags.c! #error Closure types changed: update ClosureFlags.c!
#endif #endif
...@@ -700,7 +700,6 @@ residencyCensus( void ) ...@@ -700,7 +700,6 @@ residencyCensus( void )
case MUT_VAR: case MUT_VAR:
/* case MUT_CONS: FIXME: case does not exist */ /* case MUT_CONS: FIXME: case does not exist */
case IND_PERM: case IND_PERM:
case IND_OLDGEN_PERM:
size = sizeW_fromITBL(info); size = sizeW_fromITBL(info);
type = Other; type = Other;
break; break;
......
...@@ -276,9 +276,7 @@ eval_obj: ...@@ -276,9 +276,7 @@ eval_obj:
switch ( get_itbl(obj)->type ) { switch ( get_itbl(obj)->type ) {
case IND: case IND:
case IND_OLDGEN:
case IND_PERM: case IND_PERM:
case IND_OLDGEN_PERM:
case IND_STATIC: case IND_STATIC:
{ {
tagged_obj = ((StgInd*)obj)->indirectee; tagged_obj = ((StgInd*)obj)->indirectee;
......
...@@ -142,18 +142,16 @@ processHeapClosureForDead( StgClosure *c ) ...@@ -142,18 +142,16 @@ processHeapClosureForDead( StgClosure *c )
case BLACKHOLE: case BLACKHOLE:
case BLOCKING_QUEUE: case BLOCKING_QUEUE:
case IND_PERM: case IND_PERM:
case IND_OLDGEN_PERM:
/* /*
'Ingore' cases 'Ingore' cases
*/ */
// Why can we ignore IND/IND_OLDGEN closures? We assume that // Why can we ignore IND closures? We assume that
// any census is preceded by a major garbage collection, which // any census is preceded by a major garbage collection, which
// IND/IND_OLDGEN closures cannot survive. Therefore, it is no // IND closures cannot survive. Therefore, it is no
// use considering IND/IND_OLDGEN closures in the meanwhile // use considering IND closures in the meanwhile
// because they will perish before the next census at any // because they will perish before the next census at any
// rate. // rate.
case IND: case IND:
case IND_OLDGEN:
// Found a dead closure: record its size // Found a dead closure: record its size
LDV_recordDead(c, size); LDV_recordDead(c, size);
return size; return size;
......
...@@ -233,24 +233,12 @@ printClosure( StgClosure *obj ) ...@@ -233,24 +233,12 @@ printClosure( StgClosure *obj )
debugBelch(")\n"); debugBelch(")\n");
break; break;
case IND_OLDGEN:
debugBelch("IND_OLDGEN(");
printPtr((StgPtr)((StgInd*)obj)->indirectee);
debugBelch(")\n");
break;
case IND_PERM: case IND_PERM:
debugBelch("IND("); debugBelch("IND(");
printPtr((StgPtr)((StgInd*)obj)->indirectee); printPtr((StgPtr)((StgInd*)obj)->indirectee);
debugBelch(")\n"); debugBelch(")\n");
break; break;
case IND_OLDGEN_PERM:
debugBelch("IND_OLDGEN_PERM(");
printPtr((StgPtr)((StgInd*)obj)->indirectee);
debugBelch(")\n");
break;
case IND_STATIC: case IND_STATIC:
debugBelch("IND_STATIC("); debugBelch("IND_STATIC(");
printPtr((StgPtr)((StgInd*)obj)->indirectee); printPtr((StgPtr)((StgInd*)obj)->indirectee);
...@@ -994,9 +982,7 @@ void prettyPrintClosure_ (StgClosure *obj) ...@@ -994,9 +982,7 @@ void prettyPrintClosure_ (StgClosure *obj)
while (type == IND || while (type == IND ||
type == IND_STATIC || type == IND_STATIC ||
type == IND_OLDGEN || type == IND_PERM)
type == IND_PERM ||
type == IND_OLDGEN_PERM)
{ {
obj = ((StgInd *)obj)->indirectee; obj = ((StgInd *)obj)->indirectee;
type = get_itbl(obj)->type; type = get_itbl(obj)->type;
...@@ -1108,9 +1094,7 @@ char *closure_type_names[] = { ...@@ -1108,9 +1094,7 @@ char *closure_type_names[] = {
[PAP] = "PAP", [PAP] = "PAP",
[AP_STACK] = "AP_STACK", [AP_STACK] = "AP_STACK",
[IND] = "IND", [IND] = "IND",
[IND_OLDGEN] = "IND_OLDGEN",
[IND_PERM] = "IND_PERM", [IND_PERM] = "IND_PERM",
[IND_OLDGEN_PERM] = "IND_OLDGEN_PERM",
[IND_STATIC] = "IND_STATIC", [IND_STATIC] = "IND_STATIC",
[RET_BCO] = "RET_BCO", [RET_BCO] = "RET_BCO",
[RET_SMALL] = "RET_SMALL", [RET_SMALL] = "RET_SMALL",
......
...@@ -876,8 +876,6 @@ heapCensusChain( Census *census, bdescr *bd ) ...@@ -876,8 +876,6 @@ heapCensusChain( Census *census, bdescr *bd )
case CONSTR: case CONSTR:
case FUN: case FUN:
case IND_PERM: case IND_PERM:
case IND_OLDGEN:
case IND_OLDGEN_PERM:
case BLACKHOLE: case BLACKHOLE:
case BLOCKING_QUEUE: case BLOCKING_QUEUE:
case FUN_1_0: case FUN_1_0:
......
...@@ -466,8 +466,6 @@ push( StgClosure *c, retainer c_child_r, StgClosure **first_child ) ...@@ -466,8 +466,6 @@ push( StgClosure *c, retainer c_child_r, StgClosure **first_child )
*first_child = ((StgSelector *)c)->selectee; *first_child = ((StgSelector *)c)->selectee;
return; return;
case IND_PERM: case IND_PERM:
case IND_OLDGEN_PERM:
case IND_OLDGEN:
case BLACKHOLE: case BLACKHOLE:
*first_child = ((StgInd *)c)->indirectee; *first_child = ((StgInd *)c)->indirectee;
return; return;
...@@ -921,8 +919,6 @@ pop( StgClosure **c, StgClosure **cp, retainer *r ) ...@@ -921,8 +919,6 @@ pop( StgClosure **c, StgClosure **cp, retainer *r )
case MUT_VAR_DIRTY: case MUT_VAR_DIRTY:
case THUNK_SELECTOR: case THUNK_SELECTOR:
case IND_PERM: case IND_PERM:
case IND_OLDGEN_PERM:
case IND_OLDGEN:
case CONSTR_1_1: case CONSTR_1_1:
// cannot appear // cannot appear
case PAP: case PAP:
...@@ -1058,8 +1054,6 @@ isRetainer( StgClosure *c ) ...@@ -1058,8 +1054,6 @@ isRetainer( StgClosure *c )
case PAP: case PAP:
// indirection // indirection
case IND_PERM: case IND_PERM:
case IND_OLDGEN_PERM:
case IND_OLDGEN:
case BLACKHOLE: case BLACKHOLE:
// static objects // static objects
case CONSTR_STATIC: case CONSTR_STATIC:
......
...@@ -188,9 +188,7 @@ removeIndirections(StgClosure* p) ...@@ -188,9 +188,7 @@ removeIndirections(StgClosure* p)
while (get_itbl(q)->type == IND || while (get_itbl(q)->type == IND ||
get_itbl(q)->type == IND_STATIC || get_itbl(q)->type == IND_STATIC ||
get_itbl(q)->type == IND_OLDGEN || get_itbl(q)->type == IND_PERM) {
get_itbl(q)->type == IND_PERM ||
get_itbl(q)->type == IND_OLDGEN_PERM ) {
q = ((StgInd *)q)->indirectee; q = ((StgInd *)q)->indirectee;
tag = GET_CLOSURE_TAG(q); tag = GET_CLOSURE_TAG(q);
q = UNTAG_CLOSURE(q); q = UNTAG_CLOSURE(q);
......
...@@ -235,45 +235,6 @@ INFO_TABLE(stg_IND_PERM,1,0,IND_PERM,"IND_PERM","IND_PERM") ...@@ -235,45 +235,6 @@ INFO_TABLE(stg_IND_PERM,1,0,IND_PERM,"IND_PERM","IND_PERM")
jump %GET_ENTRY(R1); jump %GET_ENTRY(R1);
} }
INFO_TABLE(stg_IND_OLDGEN,1,0,IND_OLDGEN,"IND_OLDGEN","IND_OLDGEN")
{
TICK_ENT_STATIC_IND(); /* tick */
R1 = UNTAG(StgInd_indirectee(R1));
TICK_ENT_VIA_NODE();
jump %GET_ENTRY(R1);
}
INFO_TABLE(stg_IND_OLDGEN_PERM,1,0,IND_OLDGEN_PERM,"IND_OLDGEN_PERM","IND_OLDGEN_PERM")
{
/* Don't: TICK_ENT_STATIC_IND(Node); for ticky-ticky;
this ind is here only to help profiling */
#if defined(TICKY_TICKY) && !defined(PROFILING)
/* TICKY_TICKY && !PROFILING means PERM_IND *replaces* an IND,
rather than being extra */
TICK_ENT_PERM_IND(); /* tick */
#endif
LDV_ENTER(R1);
/* Enter PAP cost centre -- lexical scoping only */
ENTER_CCS_PAP_CL(R1);
/* see comment in IND_PERM */
#ifdef TICKY_TICKY
# ifdef PROFILING
# error Profiling and ticky-ticky do not mix at present!
# endif /* PROFILING */
StgHeader_info(R1) = stg_IND_OLDGEN_info;
#endif /* TICKY_TICKY */
R1 = UNTAG(StgInd_indirectee(R1));
TICK_ENT_VIA_NODE();
jump %GET_ENTRY(R1);
}
/* ---------------------------------------------------------------------------- /* ----------------------------------------------------------------------------
Black holes. Black holes.
......
...@@ -22,8 +22,8 @@ BEGIN_RTS_PRIVATE ...@@ -22,8 +22,8 @@ BEGIN_RTS_PRIVATE
* which p1 resides. * which p1 resides.
* *
* Note: * Note:
* After all, we do *NOT* need to call LDV_RECORD_CREATE() for both IND and * After all, we do *NOT* need to call LDV_RECORD_CREATE() for IND
* IND_OLDGEN closures because they are inherently used. But, it corrupts * closures because they are inherently used. But, it corrupts
* the invariants that every closure keeps its creation time in the profiling * the invariants that every closure keeps its creation time in the profiling
* field. So, we call LDV_RECORD_CREATE(). * field. So, we call LDV_RECORD_CREATE().
*/ */
......
...@@ -664,8 +664,6 @@ thread_obj (StgInfoTable *info, StgPtr p) ...@@ -664,8 +664,6 @@ thread_obj (StgInfoTable *info, StgPtr p)
case IND: case IND:
case IND_PERM: case IND_PERM:
case IND_OLDGEN:
case IND_OLDGEN_PERM:
thread(&((StgInd *)p)->indirectee); thread(&((StgInd *)p)->indirectee);
return p + sizeofW(StgInd); return p + sizeofW(StgInd);
......
...@@ -620,7 +620,6 @@ loop: ...@@ -620,7 +620,6 @@ loop:
case FUN: case FUN:
case IND_PERM: case IND_PERM:
case IND_OLDGEN_PERM:
case CONSTR: case CONSTR:
copy_tag_nolock(p,info,q,sizeW_fromITBL(INFO_PTR_TO_STRUCT(info)),gen,tag); copy_tag_nolock(p,info,q,sizeW_fromITBL(INFO_PTR_TO_STRUCT(info)),gen,tag);
return; return;
...@@ -666,7 +665,6 @@ loop: ...@@ -666,7 +665,6 @@ loop:
return; return;
case IND: case IND:
case IND_OLDGEN:
// follow chains of indirections, don't evacuate them // follow chains of indirections, don't evacuate them
q = ((StgInd*)q)->indirectee; q = ((StgInd*)q)->indirectee;
*p = q; *p = q;
...@@ -971,8 +969,6 @@ selector_loop: ...@@ -971,8 +969,6 @@ selector_loop:
switch (info->type) { switch (info->type) {
case IND: case IND:
case IND_PERM: case IND_PERM:
case IND_OLDGEN:
case IND_OLDGEN_PERM:
case IND_STATIC: case IND_STATIC:
val = ((StgInd *)val)->indirectee; val = ((StgInd *)val)->indirectee;
goto val_loop; goto val_loop;
...@@ -1006,8 +1002,6 @@ selector_loop: ...@@ -1006,8 +1002,6 @@ selector_loop:
case IND: case IND:
case IND_PERM: case IND_PERM:
case IND_OLDGEN:
case IND_OLDGEN_PERM:
case IND_STATIC: case IND_STATIC:
// Again, we might need to untag a constructor. // Again, we might need to untag a constructor.
selectee = UNTAG_CLOSURE( ((StgInd *)selectee)->indirectee ); selectee = UNTAG_CLOSURE( ((StgInd *)selectee)->indirectee );
......
...@@ -90,8 +90,6 @@ isAlive(StgClosure *p) ...@@ -90,8 +90,6 @@ isAlive(StgClosure *p)
case IND: case IND:
case IND_STATIC: case IND_STATIC:
case IND_PERM: case IND_PERM:
case IND_OLDGEN: // rely on compatible layout with StgInd
case IND_OLDGEN_PERM:
// follow indirections // follow indirections
p = ((StgInd *)q)->indirectee; p = ((StgInd *)q)->indirectee;
continue; continue;
......
...@@ -303,8 +303,6 @@ checkClosure( StgClosure* p ) ...@@ -303,8 +303,6 @@ checkClosure( StgClosure* p )
case CONSTR_0_2: case CONSTR_0_2:
case CONSTR_2_0: case CONSTR_2_0:
case IND_PERM: case IND_PERM:
case IND_OLDGEN:
case IND_OLDGEN_PERM:
case BLACKHOLE: case BLACKHOLE:
case PRIM: case PRIM:
case MUT_PRIM: case MUT_PRIM:
......
...@@ -550,23 +550,6 @@ scavenge_block (bdescr *bd) ...@@ -550,23 +550,6 @@ scavenge_block (bdescr *bd)
} }
case IND_PERM: case IND_PERM:
if (bd->gen_no != 0) {
#ifdef PROFILING
// @LDV profiling
// No need to call LDV_recordDead_FILL_SLOP_DYNAMIC() because an
// IND_OLDGEN_PERM closure is larger than an IND_PERM closure.
LDV_recordDead((StgClosure *)p, sizeofW(StgInd));
#endif
//
// Todo: maybe use SET_HDR() and remove LDV_RECORD_CREATE()?
//
SET_INFO(((StgClosure *)p), &stg_IND_OLDGEN_PERM_info);
// We pretend that p has just been created.
LDV_RECORD_CREATE((StgClosure *)p);
}
// fall through
case IND_OLDGEN_PERM:
case BLACKHOLE: case BLACKHOLE:
evacuate(&((StgInd *)p)->indirectee); evacuate(&((StgInd *)p)->indirectee);
p += sizeofW(StgInd); p += sizeofW(StgInd);
...@@ -896,8 +879,6 @@ scavenge_mark_stack(void) ...@@ -896,8 +879,6 @@ scavenge_mark_stack(void)
break; break;
case IND: case IND:
case IND_OLDGEN:
case IND_OLDGEN_PERM:
case BLACKHOLE: case BLACKHOLE:
evacuate(&((StgInd *)p)->indirectee); evacuate(&((StgInd *)p)->indirectee);
break; break;
...@@ -1284,8 +1265,6 @@ scavenge_one(StgPtr p) ...@@ -1284,8 +1265,6 @@ scavenge_one(StgPtr p)
// IND can happen, for example, when the interpreter allocates // IND can happen, for example, when the interpreter allocates
// a gigantic AP closure (more than one block), which ends up // a gigantic AP closure (more than one block), which ends up
// on the large-object list and then gets updated. See #3424. // on the large-object list and then gets updated. See #3424.
case IND_OLDGEN:
case IND_OLDGEN_PERM:
case BLACKHOLE: case BLACKHOLE:
case IND_STATIC: case IND_STATIC:
evacuate(&((StgInd *)p)->indirectee); evacuate(&((StgInd *)p)->indirectee);
......
...@@ -467,10 +467,8 @@ genApply regstatus args = ...@@ -467,10 +467,8 @@ genApply regstatus args =
-- print " [THUNK_STATIC] &&thunk_lbl," -- print " [THUNK_STATIC] &&thunk_lbl,"
-- print " [THUNK_SELECTOR] &&thunk_lbl," -- print " [THUNK_SELECTOR] &&thunk_lbl,"
-- print " [IND] &&ind_lbl," -- print " [IND] &&ind_lbl,"
-- print " [IND_OLDGEN] &&ind_lbl,"
-- print " [IND_STATIC] &&ind_lbl," -- print " [IND_STATIC] &&ind_lbl,"
-- print " [IND_PERM] &&ind_lbl," -- print " [IND_PERM] &&ind_lbl,"
-- print " [IND_OLDGEN_PERM] &&ind_lbl"
-- print " };" -- print " };"
tickForArity (length args), tickForArity (length args),
...@@ -590,10 +588,8 @@ genApply regstatus args = ...@@ -590,10 +588,8 @@ genApply regstatus args =
-- print " ind_lbl:" -- print " ind_lbl:"
-- else: -- else:
text "case IND,", text "case IND,",
text " IND_OLDGEN,",
text " IND_STATIC,", text " IND_STATIC,",
text " IND_PERM,", text " IND_PERM: {",
text " IND_OLDGEN_PERM: {",
nest 4 (vcat [ nest 4 (vcat [
text "R1 = StgInd_indirectee(R1);", text "R1 = StgInd_indirectee(R1);",
-- An indirection node might contain a tagged pointer -- An indirection node might contain a tagged pointer
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment