Commit eb407ca1 authored by keithw's avatar keithw

[project @ 1999-05-11 16:47:39 by keithw]

(this is number 9 of 9 commits to be applied together)

  Usage verification changes / ticky-ticky changes:

  We want to verify that SingleEntry thunks are indeed entered at most
  once.  In order to do this, -ticky / -DTICKY_TICKY turns on eager
  blackholing.  We blackhole with new blackholes: SE_BLACKHOLE and
  SE_CAF_BLACKHOLE.  We will enter one of these if we attempt to enter
  a SingleEntry thunk twice.  Note that CAFs are dealt with in by
  codeGen, and ordinary thunks by the RTS.

  We also want to see how many times we enter each Updatable thunk.
  To this end, we have modified -ticky.  When -ticky is on, we update
  with a permanent indirection, and arrange that when we enter a
  permanent indirection we count the entry and then convert the
  indirection to a normal indirection.  This gives us a means of
  counting the number of thunks entered again after the first entry.
  Obviously this screws up profiling, and so you can't build a ticky
  and profiling compiler any more.

  Also a few other changes that didn't make it into the previous 8
  commits, but form a part of this set.
parent 29b65248
/* ----------------------------------------------------------------------------
* $Id: ClosureMacros.h,v 1.14 1999/05/04 08:50:43 sof Exp $
* $Id: ClosureMacros.h,v 1.15 1999/05/11 16:47:39 keithw Exp $
*
* (c) The GHC Team, 1998-1999
*
......@@ -265,9 +265,9 @@ static __inline__ StgWord tso_sizeW ( StgTSO *tso )
#define SET_STATIC_PAR_HDR(stuff)
#endif
#ifdef TICKY
#define SET_TICKY_HDR(c,stuff) (c)->header.ticky.updated = stuff
#define SET_STATIC_TICKY_HDR(stuff) ticky : { updated : stuff }
#ifdef TICKY_TICKY
#define SET_TICKY_HDR(c,stuff) /* old: (c)->header.ticky.updated = stuff */
#define SET_STATIC_TICKY_HDR(stuff) /* old: ticky : { updated : stuff } */
#else
#define SET_TICKY_HDR(c,stuff)
#define SET_STATIC_TICKY_HDR(stuff)
......
/* ----------------------------------------------------------------------------
* $Id: ClosureTypes.h,v 1.10 1999/03/15 16:30:24 simonm Exp $
* $Id: ClosureTypes.h,v 1.11 1999/05/11 16:47:40 keithw Exp $
*
* (c) The GHC Team, 1998-1999
*
......@@ -62,18 +62,20 @@
#define SEQ_FRAME 46
#define BLACKHOLE 47
#define BLACKHOLE_BQ 48
#define MVAR 49
#define ARR_WORDS 50
#define MUT_ARR_PTRS 51
#define MUT_ARR_PTRS_FROZEN 52
#define MUT_VAR 53
#define WEAK 54
#define FOREIGN 55
#define STABLE_NAME 56
#define TSO 57
#define BLOCKED_FETCH 58
#define FETCH_ME 59
#define EVACUATED 60
#define N_CLOSURE_TYPES 61
#define SE_BLACKHOLE 49
#define SE_CAF_BLACKHOLE 50
#define MVAR 51
#define ARR_WORDS 52
#define MUT_ARR_PTRS 53
#define MUT_ARR_PTRS_FROZEN 54
#define MUT_VAR 55
#define WEAK 56
#define FOREIGN 57
#define STABLE_NAME 58
#define TSO 59
#define BLOCKED_FETCH 60
#define FETCH_ME 61
#define EVACUATED 62
#define N_CLOSURE_TYPES 63
#endif CLOSURETYPES_H
/* ----------------------------------------------------------------------------
* $Id: Closures.h,v 1.12 1999/03/25 13:01:44 simonm Exp $
* $Id: Closures.h,v 1.13 1999/05/11 16:47:40 keithw Exp $
*
* (c) The GHC Team, 1998-1999
*
......@@ -70,19 +70,19 @@ typedef struct {
info tables to be @_Evacuate_1@ and @_Scavenge_1_0@.
-------------------------------------------------------------------------- */
#ifdef TICKY
#ifdef TICKY_TICKY
typedef struct {
W_ updated;
/* old: W_ updated; */
} StgTickyHeader;
#else /* !TICKY */
#else /* !TICKY_TICKY */
typedef struct {
/* empty */
} StgTickyHeader;
#endif /* TICKY */
#endif /* TICKY_TICKY */
/* -----------------------------------------------------------------------------
The full fixed-size closure header
......@@ -99,7 +99,7 @@ typedef struct {
#ifdef GRAN
StgGranHeader par;
#endif
#ifdef TICKY
#ifdef TICKY_TICKY
StgTickyHeader ticky;
#endif
} StgHeader;
......
/* -----------------------------------------------------------------------------
* $Id: StgMacros.h,v 1.9 1999/04/28 12:42:45 sewardj Exp $
* $Id: StgMacros.h,v 1.10 1999/05/11 16:47:41 keithw Exp $
*
* (c) The GHC Team, 1998-1999
*
......@@ -321,7 +321,6 @@ static inline int IS_ARG_TAG( StgWord p ) { return p <= ARGTAG_MAX; }
#define R6_PTR 1<<5
#define R7_PTR 1<<6
#define R8_PTR 1<<7
#define HP_CHK_GEN(headroom,liveness,reentry,tag_assts) \
if ((Hp += (headroom)) > HpLim ) { \
EF_(stg_gen_chk); \
......@@ -417,9 +416,17 @@ EDI_(stg_gen_chk_info);
/* set the tag register (if we have one) */
#define SET_TAG(t) /* nothing */
/* don't do eager blackholing for now */
#define UPD_BH_UPDATABLE(thunk) /* nothing */
#define UPD_BH_SINGLE_ENTRY(thunk) /* nothing */
#ifdef EAGER_BLACKHOLING
# define UPD_BH_UPDATABLE(thunk) \
TICK_UPD_BH_UPDATABLE(); \
SET_INFO((StgClosure *)thunk,&BLACKHOLE_info)
# define UPD_BH_SINGLE_ENTRY(thunk) \
TICK_UPD_BH_SINGLE_ENTRY(); \
SET_INFO((StgClosure *)thunk,&SE_BLACKHOLE_info)
#else /* !EAGER_BLACKHOLING */
# define UPD_BH_UPDATABLE(thunk) /* nothing */
# define UPD_BH_SINGLE_ENTRY(thunk) /* nothing */
#endif /* EAGER_BLACKHOLING */
/* -----------------------------------------------------------------------------
Moving Floats and Doubles
......
/* -----------------------------------------------------------------------------
* $Id: StgMiscClosures.h,v 1.11 1999/03/02 19:44:20 sof Exp $
* $Id: StgMiscClosures.h,v 1.12 1999/05/11 16:47:41 keithw Exp $
*
* (c) The GHC Team, 1998-1999
*
......@@ -24,6 +24,10 @@ STGFUN(CAF_ENTERED_entry);
STGFUN(CAF_BLACKHOLE_entry);
STGFUN(BLACKHOLE_entry);
STGFUN(BLACKHOLE_BQ_entry);
#ifdef TICKY_TICKY
STGFUN(SE_BLACKHOLE_entry);
STGFUN(SE_CAF_BLACKHOLE_entry);
#endif
STGFUN(BCO_entry);
STGFUN(EVACUATED_entry);
STGFUN(FOREIGN_entry);
......@@ -55,6 +59,10 @@ extern DLL_IMPORT_RTS const StgInfoTable CAF_ENTERED_info;
extern DLL_IMPORT_RTS const StgInfoTable CAF_BLACKHOLE_info;
extern DLL_IMPORT_RTS const StgInfoTable BLACKHOLE_info;
extern DLL_IMPORT_RTS const StgInfoTable BLACKHOLE_BQ_info;
#ifdef TICKY_TICKY
extern DLL_IMPORT_RTS const StgInfoTable SE_BLACKHOLE_info;
extern DLL_IMPORT_RTS const StgInfoTable SE_CAF_BLACKHOLE_info;
#endif
extern DLL_IMPORT_RTS const StgInfoTable BCO_info;
extern DLL_IMPORT_RTS const StgInfoTable EVACUATED_info;
extern DLL_IMPORT_RTS const StgInfoTable FOREIGN_info;
......@@ -97,6 +105,8 @@ extern DLL_IMPORT_DATA StgIntCharlikeClosure INTLIKE_closure[];
extern StgFun stg_error_entry;
/* (see also below -- KSW 1998-12) */
/* standard selector thunks */
#ifdef COMPILING_RTS
......@@ -140,6 +150,43 @@ EI__ __sel_13_noupd_info;
EI__ __sel_14_noupd_info;
EI__ __sel_15_noupd_info;
/* and their standard entry points -- KSW 1998-12 */
EF_(__sel_0_upd_entry);
EF_(__sel_1_upd_entry);
EF_(__sel_2_upd_entry);
EF_(__sel_3_upd_entry);
EF_(__sel_4_upd_entry);
EF_(__sel_5_upd_entry);
EF_(__sel_6_upd_entry);
EF_(__sel_7_upd_entry);
EF_(__sel_8_upd_entry);
EF_(__sel_8_upd_entry);
EF_(__sel_9_upd_entry);
EF_(__sel_10_upd_entry);
EF_(__sel_11_upd_entry);
EF_(__sel_12_upd_entry);
EF_(__sel_13_upd_entry);
EF_(__sel_14_upd_entry);
EF_(__sel_15_upd_entry);
EF_(__sel_0_noupd_entry);
EF_(__sel_1_noupd_entry);
EF_(__sel_2_noupd_entry);
EF_(__sel_3_noupd_entry);
EF_(__sel_4_noupd_entry);
EF_(__sel_5_noupd_entry);
EF_(__sel_6_noupd_entry);
EF_(__sel_7_noupd_entry);
EF_(__sel_8_noupd_entry);
EF_(__sel_9_noupd_entry);
EF_(__sel_10_noupd_entry);
EF_(__sel_11_noupd_entry);
EF_(__sel_12_noupd_entry);
EF_(__sel_13_noupd_entry);
EF_(__sel_14_noupd_entry);
EF_(__sel_15_noupd_entry);
/* standard ap thunks */
EI__ __ap_1_upd_info;
......
/* ----------------------------------------------------------------------------
* $Id: StgTicky.h,v 1.3 1999/02/05 16:02:30 simonm Exp $
* $Id: StgTicky.h,v 1.4 1999/05/11 16:47:42 keithw Exp $
*
* (c) The AQUA project, Glasgow University, 1994-1997
* (c) The GHC Team, 1998-1999
......@@ -41,8 +41,13 @@
ALLOC_FUN_gds += (g); ALLOC_FUN_slp += (s); \
TICK_ALLOC_HISTO(FUN,_HS,g,s)
#define TICK_ALLOC_THK(g,s) \
ALLOC_THK_ctr++; ALLOC_THK_adm += _HS; \
#define TICK_ALLOC_UP_THK(g,s) \
ALLOC_UP_THK_ctr++; ALLOC_THK_adm += _HS; \
ALLOC_THK_gds += (g); ALLOC_THK_slp += (s); \
TICK_ALLOC_HISTO(THK,_HS,g,s)
#define TICK_ALLOC_SE_THK(g,s) \
ALLOC_SE_THK_ctr++; ALLOC_THK_adm += _HS; \
ALLOC_THK_gds += (g); ALLOC_THK_slp += (s); \
TICK_ALLOC_HISTO(THK,_HS,g,s)
......@@ -125,10 +130,12 @@
#define TICK_ENT_CON(n) ENT_CON_ctr++ /* enter constructor */
#define TICK_ENT_IND(n) ENT_IND_ctr++ /* enter indirection */
#define TICK_ENT_PERM_IND(n) ENT_PERM_IND_ctr++ /* enter permanent indirection */
#define TICK_ENT_PAP(n) ENT_PAP_ctr++ /* enter PAP */
#define TICK_ENT_AP_UPD(n) ENT_AP_UPD_ctr++ /* enter AP_UPD */
#define TICK_ENT_BH() ENT_BH_ctr++ /* enter BLACKHOLE */
/* -----------------------------------------------------------------------------
Returns
-------------------------------------------------------------------------- */
......@@ -185,7 +192,8 @@
-------------------------------------------------------------------------- */
#define TICK_UPDF_OMITTED() UPDF_OMITTED_ctr++
#define TICK_UPDF_PUSHED() UPDF_PUSHED_ctr++
#define TICK_UPDF_PUSHED(tgt,inf) UPDF_PUSHED_ctr++ \
/* ; fprintf(stderr,"UPDF_PUSHED:%p:%p\n",tgt,inf) */
#define TICK_SEQF_PUSHED() SEQF_PUSHED_ctr++
#define TICK_CATCHF_PUSHED() CATCHF_PUSHED_ctr++
#define TICK_UPDF_RCC_PUSHED() UPDF_RCC_PUSHED_ctr++
......@@ -230,7 +238,22 @@
/* For the generational collector:
*/
#define TICK_UPD_NEW_IND() UPD_NEW_IND_ctr++
#define TICK_UPD_NEW_PERM_IND(tgt) UPD_NEW_PERM_IND_ctr++ \
/* ; fprintf(stderr,"UPD_NEW_PERM:%p\n",tgt) */
#define TICK_UPD_OLD_IND() UPD_OLD_IND_ctr++
#define TICK_UPD_OLD_PERM_IND() UPD_OLD_PERM_IND_ctr++
/* Count blackholes:
*/
#define TICK_UPD_BH_UPDATABLE() UPD_BH_UPDATABLE_ctr++
#define TICK_UPD_BH_SINGLE_ENTRY() UPD_BH_SINGLE_ENTRY_ctr++
#define TICK_UPD_CAF_BH_UPDATABLE(s) \
UPD_CAF_BH_UPDATABLE_ctr++ \
/* ; fprintf(stderr,"TICK_UPD_CAF_BH_UPDATABLE(%s)\n",s) */
#define TICK_UPD_CAF_BH_SINGLE_ENTRY(s) \
UPD_CAF_BH_SINGLE_ENTRY_ctr++ \
/* ; fprintf(stderr,"TICK_UPD_CAF_BH_SINGLE_ENTRY(%s)\n",s) */
/* -----------------------------------------------------------------------------
Garbage collection counters
......@@ -283,7 +306,8 @@ EXTERN unsigned long ALLOC_FUN_hst[5]
#endif
;
EXTERN unsigned long ALLOC_THK_ctr INIT(0);
EXTERN unsigned long ALLOC_UP_THK_ctr INIT(0);
EXTERN unsigned long ALLOC_SE_THK_ctr INIT(0);
EXTERN unsigned long ALLOC_THK_adm INIT(0);
EXTERN unsigned long ALLOC_THK_gds INIT(0);
EXTERN unsigned long ALLOC_THK_slp INIT(0);
......@@ -391,6 +415,7 @@ EXTERN unsigned long ENT_FUN_STD_ctr INIT(0);
EXTERN unsigned long ENT_FUN_DIRECT_ctr INIT(0);
EXTERN unsigned long ENT_CON_ctr INIT(0);
EXTERN unsigned long ENT_IND_ctr INIT(0);
EXTERN unsigned long ENT_PERM_IND_ctr INIT(0);
EXTERN unsigned long ENT_PAP_ctr INIT(0);
EXTERN unsigned long ENT_AP_UPD_ctr INIT(0);
EXTERN unsigned long ENT_BH_ctr INIT(0);
......@@ -458,7 +483,14 @@ EXTERN unsigned long UPD_PAP_IN_NEW_hst[9]
;
EXTERN unsigned long UPD_NEW_IND_ctr INIT(0);
EXTERN unsigned long UPD_NEW_PERM_IND_ctr INIT(0);
EXTERN unsigned long UPD_OLD_IND_ctr INIT(0);
EXTERN unsigned long UPD_OLD_PERM_IND_ctr INIT(0);
EXTERN unsigned long UPD_BH_UPDATABLE_ctr INIT(0);
EXTERN unsigned long UPD_BH_SINGLE_ENTRY_ctr INIT(0);
EXTERN unsigned long UPD_CAF_BH_UPDATABLE_ctr INIT(0);
EXTERN unsigned long UPD_CAF_BH_SINGLE_ENTRY_ctr INIT(0);
EXTERN unsigned long GC_SEL_ABANDONED_ctr INIT(0);
EXTERN unsigned long GC_SEL_MINOR_ctr INIT(0);
......@@ -480,7 +512,8 @@ EXTERN unsigned long GC_WORDS_COPIED_ctr INIT(0);
#define TICK_ALLOC_HEAP(words)
#define TICK_ALLOC_FUN(g,s)
#define TICK_ALLOC_THK(g,s)
#define TICK_ALLOC_UP_THK(g,s)
#define TICK_ALLOC_SE_THK(g,s)
#define TICK_ALLOC_CON(g,s)
#define TICK_ALLOC_TUP(g,s)
#define TICK_ALLOC_BH(g,s)
......@@ -500,6 +533,7 @@ EXTERN unsigned long GC_WORDS_COPIED_ctr INIT(0);
#define TICK_ENT_CON(n)
#define TICK_ENT_IND(n)
#define TICK_ENT_PERM_IND(n)
#define TICK_ENT_PAP(n)
#define TICK_ENT_AP_UPD(n)
#define TICK_ENT_BH()
......@@ -513,7 +547,7 @@ EXTERN unsigned long GC_WORDS_COPIED_ctr INIT(0);
#define TICK_VEC_RETURN(n)
#define TICK_UPDF_OMITTED()
#define TICK_UPDF_PUSHED()
#define TICK_UPDF_PUSHED(tgt,inf)
#define TICK_SEQF_PUSHED()
#define TICK_CATCHF_PUSHED()
#define TICK_UPDF_RCC_PUSHED()
......@@ -526,7 +560,14 @@ EXTERN unsigned long GC_WORDS_COPIED_ctr INIT(0);
#define TICK_UPD_PAP_IN_PLACE()
#define TICK_UPD_NEW_IND()
#define TICK_UPD_NEW_PERM_IND(tgt)
#define TICK_UPD_OLD_IND()
#define TICK_UPD_OLD_PERM_IND()
#define TICK_UPD_BH_UPDATABLE()
#define TICK_UPD_BH_SINGLE_ENTRY()
#define TICK_UPD_CAF_BH_UPDATABLE()
#define TICK_UPD_CAF_BH_SINGLE_ENTRY()
#define TICK_GC_SEL_ABANDONED()
#define TICK_GC_SEL_MINOR()
......
/* -----------------------------------------------------------------------------
* $Id: TSO.h,v 1.6 1999/03/16 13:20:10 simonm Exp $
* $Id: TSO.h,v 1.7 1999/05/11 16:47:42 keithw Exp $
*
* (c) The GHC Team, 1998-1999
*
......@@ -27,13 +27,13 @@ typedef struct {
} StgTSOParInfo;
#endif /* PAR */
#if defined(TICKY)
#if defined(TICKY_TICKY)
typedef struct {
} StgTSOTickyInfo;
#else /* !TICKY */
#else /* !TICKY_TICKY */
typedef struct {
} StgTSOTickyInfo;
#endif /* TICKY */
#endif /* TICKY_TICKY */
typedef enum {
tso_state_runnable,
......
/* -----------------------------------------------------------------------------
* $Id: Updates.h,v 1.9 1999/03/18 17:57:20 simonm Exp $
* $Id: Updates.h,v 1.10 1999/05/11 16:47:42 keithw Exp $
*
* (c) The GHC Team, 1998-1999
*
......@@ -26,12 +26,21 @@
* preferably don't use this macro inline in compiled code.
*/
#define UPD_IND(updclosure, heapptr) \
#ifdef TICKY_TICKY
# define UPD_IND(updclosure, heapptr) UPD_PERM_IND(updclosure,heapptr)
#else
# define UPD_IND(updclosure, heapptr) UPD_REAL_IND(updclosure,heapptr)
#endif
/* UPD_IND actually does a PERM_IND if TICKY_TICKY is on;
if you *really* need an IND use UPD_REAL_IND
*/
#define UPD_REAL_IND(updclosure, heapptr) \
AWAKEN_BQ(updclosure); \
updateWithIndirection((StgClosure *)updclosure, \
(StgClosure *)heapptr);
#ifdef PROFILING
#if defined(PROFILING) || defined(TICKY_TICKY)
#define UPD_PERM_IND(updclosure, heapptr) \
AWAKEN_BQ(updclosure); \
updateWithPermIndirection((StgClosure *)updclosure, \
......@@ -68,7 +77,7 @@ extern DLL_IMPORT_DATA const StgPolyInfoTable Upd_frame_info;
#define PUSH_UPD_FRAME(target, Sp_offset) \
{ \
StgUpdateFrame *__frame; \
TICK_UPDF_PUSHED(); \
TICK_UPDF_PUSHED(target, GET_INFO((StgClosure*)target)); \
__frame = stgCast(StgUpdateFrame*,Sp + (Sp_offset)) - 1; \
SET_INFO(__frame,stgCast(StgInfoTable*,&Upd_frame_info)); \
__frame->link = Su; \
......
......@@ -170,7 +170,7 @@ AB.myhi: A.myhi B.myhi
HCFLAGS += -DDEBUG=1
HCFLAGS += -DDEBUG_EXTRA=1
HCFLAGS += -ULAZY_BLACKHOLING
HCFLAGS += -ULAZY_BLACKHOLING -DEAGER_BLACKHOLING
HCFLAGS += -DUSE_MINIINTERPRETER=1
HCFLAGS += -DINTERPRETER_ONLY=1
HCFLAGS += -DNO_REGS
......
......@@ -43,8 +43,10 @@ ifneq "$(way)" ""
SRC_HC_OPTS += -hisuf $(way_)hi
endif
Int_HC_OPTS += -H14m -fno-prune-tydecls -monly-3-regs
Word_HC_OPTS += -H12m -monly-3-regs
# KSW 1998-12: had to increase some of the heap sizes by 2m to 6m for USP
Int_HC_OPTS += -H20m -fno-prune-tydecls -monly-3-regs
Word_HC_OPTS += -H20m -monly-3-regs
Foreign_HC_OPTS += -fno-prune-tydecls
NativeInfo_HC_OPTS += -fno-prune-tydecls
Dynamic_HC_OPTS += $(MAGIC_HSCPP_OPTS)
......
# $Id: Makefile,v 1.13 1999/05/05 10:48:06 sof Exp $
# $Id: Makefile,v 1.14 1999/05/11 16:47:46 keithw Exp $
#
# Makefile for miscellaneous libraries.
#
......@@ -58,10 +58,15 @@ endif
#
# Specific flags
#
BSD_HC_OPTS += -I../std/cbits -optc-DNON_POSIX_SOURCE
# KSW 1998-12: had to increase some of the heap sizes by 2m for USP
BSD_HC_OPTS += -I../std/cbits -H8m -optc-DNON_POSIX_SOURCE
Socket_HC_OPTS += -I../std/cbits -optc-DNON_POSIX_SOURCE
SocketPrim_HC_OPTS += -I../std/cbits -H10m -optc-DNON_POSIX_SOURCE
SocketPrim_HC_OPTS += -I../std/cbits -H12m -optc-DNON_POSIX_SOURCE
PackedString_HC_OPTS += -H12m
Native_HC_OPTS += -H8m
Pretty_HC_OPTS += -H8m
#-----------------------------------------------------------------------------
# Dependency generation
......
#
# $Id: Makefile,v 1.5 1998/12/02 13:26:49 simonm Exp $
# $Id: Makefile,v 1.6 1999/05/11 16:47:46 keithw Exp $
#
# Makefile for POSIX library
#
......@@ -55,6 +55,10 @@ PosixProcPrim_HC_OPTS ='-\#include"cbits/libposix.h"'
PosixTTY_HC_OPTS ='-\#include"cbits/libposix.h"' -monly-2-regs
Posix_HC_OPTS ='-\#include"cbits/libposix.h"'
# KSW 1998-12: had to increase some of the heap sizes by 2m for USP
PosixProcPrim_HC_OPTS += -H8m
PosixFiles_HC_OPTS += -H8m
# sigh.
../misc/PackedString_HC_OPTS += -H8m
......
......@@ -8,5 +8,5 @@
__interface Main 1 where
__export ! Main main ;
1 main :: __forall [a] => PrelIOBase.IO a;
1 main :: __forall [a] => PrelIOBase.IO a; -- wish this could be __o. KSW 1999-04.
......@@ -54,21 +54,26 @@ PrelArrExtra_HC_OPTS += -monly-2-regs
Directory_HC_OPTS += -monly-3-regs
Time_HC_OPTS += -monly-3-regs
# argh, adding USP seems to require extra heap... an extra 2 to 6MB,
# in fact, on each of these. (KSW 1998-12)
# Far too much heap is needed to compile PrelNumExtra with -O at the
# moment, but there you go..
PrelNumExtra_HC_OPTS += -H30m -K2m
PrelNumExtra_HC_OPTS += -H34m -K2m
PrelPack_HC_OPTS += -K4m
PrelBase_HC_OPTS += -H10m
PrelRead_HC_OPTS += -H16m
PrelTup_HC_OPTS += -H12m
PrelBase_HC_OPTS += -H12m
PrelRead_HC_OPTS += -H20m
PrelTup_HC_OPTS += -H12m -K2m
PrelNum_HC_OPTS += -H12m -K4m
PrelArr_HC_OPTS += -H8m
PrelHandle_HC_OPTS += -H14m
Time_HC_OPTS += -H18m
PrelHandle_HC_OPTS += -H20m
Time_HC_OPTS += -H24m -K2m
Complex_HC_OPTS += -H10m
IO_HC_OPTS += -H12m
PrelMain_HC_OPTS += -fno-prune-tydecls # avoids an apparent bug; ToDo
List_HC_OPTS += -H8m
Directory_HC_OPTS += -H8m
#-----------------------------------------------------------------------------
# Dependency generation
......
......@@ -8,4 +8,5 @@
__interface PrelException 1 0 where
__export ! PrelException ioError catch;
1 ioError :: __forall [a] => PrelIOBase.IOError -> PrelIOBase.IO a ;
1 catch :: __forall [a] => PrelIOBase.IO a -> (PrelIOBase.IOError -> PrelIOBase.IO a) -> PrelIOBase.IO a ;
1 catch :: __forall [a] => PrelIOBase.IO a -> (PrelIOBase.IOError -> PrelIOBase.IO a) -> PrelIOBase.IO a ; -- wish there could be more __o's here. KSW 1999-04.
---------------------------------------------------------------------------
-- GHC.hi
-- PrelGHC.hi-boot
--
-- This hand-written interface file allows you to bring into scope the
-- primitive operations and types that GHC knows about.
......
......@@ -15,4 +15,3 @@ __export ! PrelPack packCStringzh unpackCStringzh unpackNByteszh unpackAppendCSt
1 unpackNByteszh :: PrelGHC.Addrzh -> PrelGHC.Intzh -> [PrelBase.Char] ;
1 unpackAppendCStringzh :: PrelGHC.Addrzh -> [PrelBase.Char] -> [PrelBase.Char] ;
1 unpackFoldrCStringzh :: __forall [a] => PrelGHC.Addrzh -> (PrelBase.Char -> a -> a) -> a -> a ;
/* -----------------------------------------------------------------------------
* $Id: ClosureFlags.c,v 1.1 1999/03/15 16:30:27 simonm Exp $
* $Id: ClosureFlags.c,v 1.2 1999/05/11 16:47:49 keithw Exp $
*
* (c) The GHC Team 1998-1999
*
......@@ -67,6 +67,8 @@ StgWord16 closure_flags[] = {
/* SEQ_FRAME */ ( _BTM ),
/* BLACKHOLE */ ( _NS| _UPT ),
/* BLACKHOLE_BQ */ ( _NS| _MUT|_UPT ),
/* SE_BLACKHOLE */ ( _NS| _UPT ),
/* SE_CAF_BLACKHOLE */ ( _NS| _UPT ),
/* MVAR */ (_HNF| _NS| _MUT|_UPT ),
/* ARR_WORDS */ (_HNF| _NS| _UPT ),
/* MUT_ARR_PTRS */ (_HNF| _NS| _MUT|_UPT ),
......
......@@ -5,8 +5,8 @@
* Copyright (c) 1994-1998.
*
* $RCSfile: Evaluator.c,v $
* $Revision: 1.15 $
* $Date: 1999/04/28 12:59:51 $
* $Revision: 1.16 $
* $Date: 1999/05/11 16:47:50 $
* ---------------------------------------------------------------------------*/
#include "Rts.h"
......@@ -1276,7 +1276,9 @@ StgThreadReturnCode enter( StgClosure* obj0 )
goto enterLoop;
}
case BLACKHOLE:
case SE_BLACKHOLE:
case CAF_BLACKHOLE:
case SE_CAF_BLACKHOLE:
{
/*was StgBlackHole* */
StgBlockingQueue* bh = (StgBlockingQueue*)obj;
......@@ -1303,8 +1305,7 @@ StgThreadReturnCode enter( StgClosure* obj0 )
xPushWord(payloadWord(ap,i));
}
obj = ap->fun;
#ifndef LAZY_BLACKHOLING
#error no no no
#ifdef EAGER_BLACKHOLING
{
/* superfluous - but makes debugging easier */
StgBlackHole* bh = stgCast(StgBlackHole*,ap);
......@@ -1313,7 +1314,7 @@ StgThreadReturnCode enter( StgClosure* obj0 )
IF_DEBUG(gccafs,fprintf(stderr,"Eagerly blackholed AP_UPD %p in evaluator\n",bh));
/*printObj(bh); */
}
#endif /* LAZY_BLACKHOLING */
#endif /* EAGER_BLACKHOLING */
goto enterLoop;
}
case PAP:
......@@ -1604,11 +1605,13 @@ static inline void PopUpdateFrame( StgClosure* obj )
printObj(obj);
fprintf(stderr,"Sp = %p\tSu = %p\n\n", Sp, Su);
);
#ifndef LAZY_BLACKHOLING
#ifdef EAGER_BLACKHOLING
ASSERT(get_itbl(Su->updatee)->type == BLACKHOLE
|| get_itbl(Su->updatee)->type == SE_BLACKHOLE
|| get_itbl(Su->updatee)->type == CAF_BLACKHOLE
|| get_itbl(Su->updatee)->type == SE_CAF_BLACKHOLE
);
#endif /* LAZY_BLACKHOLING */
#endif /* EAGER_BLACKHOLING */
UPD_IND(Su->updatee,obj);
Sp = stgCast(StgStackPtr,Su) + sizeofW(StgUpdateFrame);
Su = Su->link;
......
/* -----------------------------------------------------------------------------
* $Id: GC.c,v 1.58 1999/05/04 10:19:14 sof Exp $
* $Id: GC.c,v 1.59 1999/05/11 16:47:53 keithw Exp $
*
* (c) The GHC Team 1998-1999
*
......@@ -1189,6 +1189,8 @@ loop:
return copy(q,sizeW_fromITBL(info),step);
case CAF_BLACKHOLE:
case SE_CAF_BLACKHOLE:
case SE_BLACKHOLE:
case BLACKHOLE:
return copyPart(q,BLACKHOLE_sizeW(),sizeofW(StgHeader),step);
......@@ -1271,6 +1273,8 @@ loop:
/* aargh - do recursively???? */
case CAF_UNENTERED:
case CAF_BLACKHOLE:
case SE_CAF_BLACKHOLE:
case SE_BLACKHOLE:
case BLACKHOLE:
case BLACKHOLE_BQ:
/* not evaluated yet */
......@@ -1722,6 +1726,8 @@ scavenge(step *step)
break;
case CAF_BLACKHOLE:
case SE_CAF_BLACKHOLE:
case SE_BLACKHOLE:
case BLACKHOLE:
p += BLACKHOLE_sizeW();
break;
......@@ -1919,6 +1925,8 @@ scavenge_one(StgClosure *p)
}
case CAF_BLACKHOLE:
case SE_CAF_BLACKHOLE:
case SE_BLACKHOLE:
case BLACKHOLE:
break;
......@@ -2402,6 +2410,8 @@ scavenge_stack(StgPtr p, StgPtr stack_end)
recordMutable((StgMutClosure *)to);
continue;
default:
/* will never be SE_{,CAF_}BLACKHOLE, since we
don't push an update frame for single-entry thunks. KSW 1999-01. */
barf("scavenge_stack: UPDATE_FRAME updatee");
}
}
......@@ -2734,6 +2744,9 @@ threadLazyBlackHole(StgTSO *tso)
if (bh->header.info != &BLACKHOLE_BQ_info &&
bh->header.info != &CAF_BLACKHOLE_info) {
#if (!defined(LAZY_BLACKHOLING)) && defined(DEBUG)
fprintf(stderr,"Unexpected lazy BHing required at 0x%04x\n",(int)bh);
#endif
SET_INFO(bh,&BLACKHOLE_info);
}
......@@ -2857,7 +2870,12 @@ threadSqueezeStack(StgTSO *tso)
* slower --SDM
*/
#if 0 /* do it properly... */
if (GET_INFO(updatee_bypass) == BLACKHOLE_BQ_info) {
# if (!defined(LAZY_BLACKHOLING)) && defined(DEBUG)
# error Unimplemented lazy BH warning. (KSW 1999-01)
# endif
if (GET_INFO(updatee_bypass) == BLACKHOLE_BQ_info
|| GET_INFO(updatee_bypass) == CAF_BLACKHOLE_info
) {
/* Sigh. It has one. Don't lose those threads! */
if (GET_INFO(updatee_keep) == BLACKHOLE_BQ_info) {
/* Urgh. Two queues. Merge them. */
......@@ -2882,6 +2900,9 @@ threadSqueezeStack(StgTSO *tso)
#endif
TICK_UPD_SQUEEZED();
/* wasn't there something about update squeezing and ticky to be sorted out?
* oh yes: we aren't counting each enter properly in this case. See the log somewhere.
* KSW 1999-04-21 */
UPD_IND(updatee_bypass, updatee_keep); /* this wakes the threads up */
sp = (P_)frame - 1; /* sp = stuff to slide */
......@@ -2897,6 +2918,9 @@ threadSqueezeStack(StgTSO *tso)
StgBlockingQueue *bh = (StgBlockingQueue *)frame->updatee;
if (bh->header.info != &BLACKHOLE_BQ_info &&
bh->header.info != &CAF_BLACKHOLE_info) {
#if (!defined(LAZY_BLACKHOLING)) && defined(DEBUG)
fprintf(stderr,"Unexpected lazy BHing required at 0x%04x\n",(int)bh);
#endif
SET_INFO(bh,&BLACKHOLE_info);
}
}
......
/* -----------------------------------------------------------------------------
* $Id: Printer.c,v 1.12 1999/05/04 10:19:17 sof Exp $
* $Id: Printer.c,v 1.13 1999/05/11 16:47:54 keithw Exp $
*
* Copyright (c) 1994-1999.
*
......@@ -179,6 +179,14 @@ void printClosure( StgClosure *obj )
fprintf(stderr,")\n");
break;
case SE_BLACKHOLE:
fprintf(stderr,"SE_BH\n");
break;
case SE_CAF_BLACKHOLE:
fprintf(stderr,"SE_CAF_BH\n");
break;
case BLACKHOLE:
fprintf(stderr,"BH\n");
break;
......
/* -----------------------------------------------------------------------------
* $Id: RtsFlags.c,v 1.12 1999/03/25 13:14:07 simonm Exp $
* $Id: RtsFlags.c,v 1.13 1999/05/11 16:47:55 keithw Exp $
*
* (c) The AQUA Project, Glasgow University, 1994-1997
* (c) The GHC Team, 1998-1999
......@@ -193,8 +193,8 @@ void initRtsFlagsDefaults(void)
#endif
#ifdef TICKY_TICKY
RtsFlags.TickyFlags.showTickyStats = rtsFalse;
RtsFlags.TickyFlags.tickyFile = NULL;
RtsFlags.TickyFlags.showTickyStats = rtsFalse;
RtsFlags.TickyFlags.tickyFile = NULL;
#endif
}
......