summaryrefslogtreecommitdiff
path: root/rts/sm
diff options
context:
space:
mode:
authorSimon Marlow <simonmar@microsoft.com>2006-10-25 11:11:14 +0000
committerSimon Marlow <simonmar@microsoft.com>2006-10-25 11:11:14 +0000
commitcb3cb473854e815784375ad23cc5081621a95ce8 (patch)
tree7d346bb9f0622f5acabf4aa3cb6b1f7518088c82 /rts/sm
parent432376bd11dc799121cbc0157780233bae248604 (diff)
downloadhaskell-cb3cb473854e815784375ad23cc5081621a95ce8.tar.gz
Remove PAR/GRAN code from the storage manager
Diffstat (limited to 'rts/sm')
-rw-r--r--rts/sm/Compact.c16
-rw-r--r--rts/sm/Evac.c49
-rw-r--r--rts/sm/GC.c39
-rw-r--r--rts/sm/Scav.c158
-rw-r--r--rts/sm/Storage.c9
5 files changed, 0 insertions, 271 deletions
diff --git a/rts/sm/Compact.c b/rts/sm/Compact.c
index f50c994da8..ef0aefc28e 100644
--- a/rts/sm/Compact.c
+++ b/rts/sm/Compact.c
@@ -398,10 +398,6 @@ thread_TSO (StgTSO *tso)
if ( tso->why_blocked == BlockedOnMVar
|| tso->why_blocked == BlockedOnBlackHole
|| tso->why_blocked == BlockedOnException
-#if defined(PAR)
- || tso->why_blocked == BlockedOnGA
- || tso->why_blocked == BlockedOnGA_NoSend
-#endif
) {
thread_(&tso->block_info.closure);
}
@@ -703,10 +699,6 @@ update_fwd( bdescr *blocks )
bd = blocks;
-#if defined(PAR)
- barf("update_fwd: ToDo");
-#endif
-
// cycle through all the blocks in the step
for (; bd != NULL; bd = bd->link) {
p = bd->start;
@@ -735,10 +727,6 @@ update_fwd_compact( bdescr *blocks )
free_bd = blocks;
free = free_bd->start;
-#if defined(PAR)
- barf("update_fwd: ToDo");
-#endif
-
// cycle through all the blocks in the step
for (; bd != NULL; bd = bd->link) {
p = bd->start;
@@ -818,10 +806,6 @@ update_bkwd_compact( step *stp )
free = free_bd->start;
free_blocks = 1;
-#if defined(PAR)
- barf("update_bkwd: ToDo");
-#endif
-
// cycle through all the blocks in the step
for (; bd != NULL; bd = bd->link) {
p = bd->start;
diff --git a/rts/sm/Evac.c b/rts/sm/Evac.c
index 9d1c4602ef..6ffe167776 100644
--- a/rts/sm/Evac.c
+++ b/rts/sm/Evac.c
@@ -287,9 +287,6 @@ evacuate_large(StgPtr p)
REGPARM1 StgClosure *
evacuate(StgClosure *q)
{
-#if defined(PAR)
- StgClosure *to;
-#endif
bdescr *bd = NULL;
step *stp;
const StgInfoTable *info;
@@ -634,43 +631,6 @@ loop:
}
}
-#if defined(PAR)
- case RBH:
- {
- //StgInfoTable *rip = get_closure_info(q, &size, &ptrs, &nonptrs, &vhs, str);
- to = copy(q,BLACKHOLE_sizeW(),stp);
- //ToDo: derive size etc from reverted IP
- //to = copy(q,size,stp);
- debugTrace(DEBUG_gc, "evacuate: RBH %p (%s) to %p (%s)",
- q, info_type(q), to, info_type(to));
- return to;
- }
-
- case BLOCKED_FETCH:
- ASSERT(sizeofW(StgBlockedFetch) >= MIN_PAYLOD_SIZE);
- to = copy(q,sizeofW(StgBlockedFetch),stp);
- debugTrace(DEBUG_gc, "evacuate: %p (%s) to %p (%s)",
- q, info_type(q), to, info_type(to));
- return to;
-
-# ifdef DIST
- case REMOTE_REF:
-# endif
- case FETCH_ME:
- ASSERT(sizeofW(StgBlockedFetch) >= MIN_PAYLOAD_SIZE);
- to = copy(q,sizeofW(StgFetchMe),stp);
- debugTrace(DEBUG_gc, "evacuate: %p (%s) to %p (%s)",
- q, info_type(q), to, info_type(to)));
- return to;
-
- case FETCH_ME_BQ:
- ASSERT(sizeofW(StgBlockedFetch) >= MIN_PAYLOAD_SIZE);
- to = copy(q,sizeofW(StgFetchMeBlockingQueue),stp);
- debugTrace(DEBUG_gc, "evacuate: %p (%s) to %p (%s)",
- q, info_type(q), to, info_type(to)));
- return to;
-#endif
-
case TREC_HEADER:
return copy(q,sizeofW(StgTRecHeader),stp);
@@ -927,15 +887,6 @@ selector_loop:
case SE_CAF_BLACKHOLE:
case SE_BLACKHOLE:
case BLACKHOLE:
-#if defined(PAR)
- case RBH:
- case BLOCKED_FETCH:
-# ifdef DIST
- case REMOTE_REF:
-# endif
- case FETCH_ME:
- case FETCH_ME_BQ:
-#endif
// not evaluated yet
break;
diff --git a/rts/sm/GC.c b/rts/sm/GC.c
index c181940ccf..0b08bc8d8e 100644
--- a/rts/sm/GC.c
+++ b/rts/sm/GC.c
@@ -28,15 +28,6 @@
#include "ParTicky.h" // ToDo: move into Rts.h
#include "RtsSignals.h"
#include "STM.h"
-#if defined(GRAN) || defined(PAR)
-# include "GranSimRts.h"
-# include "ParallelRts.h"
-# include "FetchMe.h"
-# if defined(DEBUG)
-# include "Printer.h"
-# include "ParallelDebug.h"
-# endif
-#endif
#include "HsFFI.h"
#include "Linker.h"
#if defined(RTS_GTK_FRONTPANEL)
@@ -235,9 +226,6 @@ GarbageCollect ( rtsBool force_major_gc )
mutlist_OTHERS = 0;
#endif
- // Init stats and print par specific (timing) info
- PAR_TICKY_PAR_START();
-
// attribute any costs to CCS_GC
#ifdef PROFILING
prev_CCS = CCCS;
@@ -273,9 +261,6 @@ GarbageCollect ( rtsBool force_major_gc )
#endif
// check stack sanity *before* GC (ToDo: check all threads)
-#if defined(GRAN)
- // ToDo!: check sanity IF_DEBUG(sanity, checkTSOsSanity());
-#endif
IF_DEBUG(sanity, checkFreeListSanity());
/* Initialise the static object lists
@@ -466,7 +451,6 @@ GarbageCollect ( rtsBool force_major_gc )
}
for (g = RtsFlags.GcFlags.generations-1; g > N; g--) {
- IF_PAR_DEBUG(verbose, printMutableList(&generations[g]));
scavenge_mutable_list(&generations[g]);
evac_gen = g;
for (st = generations[g].n_steps-1; st >= 0; st--) {
@@ -485,21 +469,6 @@ GarbageCollect ( rtsBool force_major_gc )
evac_gen = 0;
GetRoots(mark_root);
-#if defined(PAR)
- /* And don't forget to mark the TSO if we got here direct from
- * Haskell! */
- /* Not needed in a seq version?
- if (CurrentTSO) {
- CurrentTSO = (StgTSO *)MarkRoot((StgClosure *)CurrentTSO);
- }
- */
-
- // Mark the entries in the GALA table of the parallel system
- markLocalGAs(major_gc);
- // Mark all entries on the list of pending fetches
- markPendingFetches(major_gc);
-#endif
-
/* Mark the weak pointer list, and prepare to detect dead weak
* pointers.
*/
@@ -614,12 +583,6 @@ GarbageCollect ( rtsBool force_major_gc )
}
}
-#if defined(PAR)
- // Reconstruct the Global Address tables used in GUM
- rebuildGAtables(major_gc);
- IF_DEBUG(sanity, checkLAGAtable(rtsTrue/*check closures, too*/));
-#endif
-
// Now see which stable names are still alive.
gcStablePtrTable();
@@ -1057,8 +1020,6 @@ GarbageCollect ( rtsBool force_major_gc )
#endif
RELEASE_SM_LOCK;
-
- //PAR_TICKY_TP();
}
/* -----------------------------------------------------------------------------
diff --git a/rts/sm/Scav.c b/rts/sm/Scav.c
index 26b33f479e..dce83ede02 100644
--- a/rts/sm/Scav.c
+++ b/rts/sm/Scav.c
@@ -128,10 +128,6 @@ scavengeTSO (StgTSO *tso)
if ( tso->why_blocked == BlockedOnMVar
|| tso->why_blocked == BlockedOnBlackHole
|| tso->why_blocked == BlockedOnException
-#if defined(PAR)
- || tso->why_blocked == BlockedOnGA
- || tso->why_blocked == BlockedOnGA_NoSend
-#endif
) {
tso->block_info.closure = evacuate(tso->block_info.closure);
}
@@ -563,60 +559,6 @@ scavenge(step *stp)
break;
}
-#if defined(PAR)
- case RBH:
- {
-#if 0
- nat size, ptrs, nonptrs, vhs;
- char str[80];
- StgInfoTable *rip = get_closure_info(p, &size, &ptrs, &nonptrs, &vhs, str);
-#endif
- StgRBH *rbh = (StgRBH *)p;
- (StgClosure *)rbh->blocking_queue =
- evacuate((StgClosure *)rbh->blocking_queue);
- failed_to_evac = rtsTrue; // mutable anyhow.
- debugTrace(DEBUG_gc, "scavenge: RBH %p (%s) (new blocking_queue link=%p)",
- p, info_type(p), (StgClosure *)rbh->blocking_queue);
- // ToDo: use size of reverted closure here!
- p += BLACKHOLE_sizeW();
- break;
- }
-
- case BLOCKED_FETCH:
- {
- StgBlockedFetch *bf = (StgBlockedFetch *)p;
- // follow the pointer to the node which is being demanded
- (StgClosure *)bf->node =
- evacuate((StgClosure *)bf->node);
- // follow the link to the rest of the blocking queue
- (StgClosure *)bf->link =
- evacuate((StgClosure *)bf->link);
- debugTrace(DEBUG_gc, "scavenge: %p (%s); node is now %p; exciting, isn't it",
- bf, info_type((StgClosure *)bf),
- bf->node, info_type(bf->node)));
- p += sizeofW(StgBlockedFetch);
- break;
- }
-
-#ifdef DIST
- case REMOTE_REF:
-#endif
- case FETCH_ME:
- p += sizeofW(StgFetchMe);
- break; // nothing to do in this case
-
- case FETCH_ME_BQ:
- {
- StgFetchMeBlockingQueue *fmbq = (StgFetchMeBlockingQueue *)p;
- (StgClosure *)fmbq->blocking_queue =
- evacuate((StgClosure *)fmbq->blocking_queue);
- debugTrace(DEBUG_gc, "scavenge: %p (%s) exciting, isn't it",
- p, info_type((StgClosure *)p)));
- p += sizeofW(StgFetchMeBlockingQueue);
- break;
- }
-#endif
-
case TVAR_WATCH_QUEUE:
{
StgTVarWatchQueue *wq = ((StgTVarWatchQueue *) p);
@@ -978,55 +920,6 @@ linear_scan:
break;
}
-#if defined(PAR)
- case RBH:
- {
-#if 0
- nat size, ptrs, nonptrs, vhs;
- char str[80];
- StgInfoTable *rip = get_closure_info(p, &size, &ptrs, &nonptrs, &vhs, str);
-#endif
- StgRBH *rbh = (StgRBH *)p;
- bh->blocking_queue =
- (StgTSO *)evacuate((StgClosure *)bh->blocking_queue);
- failed_to_evac = rtsTrue; // mutable anyhow.
- debugTrace(DEBUG_gc, "scavenge: RBH %p (%s) (new blocking_queue link=%p)",
- p, info_type(p), (StgClosure *)rbh->blocking_queue));
- break;
- }
-
- case BLOCKED_FETCH:
- {
- StgBlockedFetch *bf = (StgBlockedFetch *)p;
- // follow the pointer to the node which is being demanded
- (StgClosure *)bf->node =
- evacuate((StgClosure *)bf->node);
- // follow the link to the rest of the blocking queue
- (StgClosure *)bf->link =
- evacuate((StgClosure *)bf->link);
- debugTrace(DEBUG_gc, "scavenge: %p (%s); node is now %p; exciting, isn't it",
- bf, info_type((StgClosure *)bf),
- bf->node, info_type(bf->node)));
- break;
- }
-
-#ifdef DIST
- case REMOTE_REF:
-#endif
- case FETCH_ME:
- break; // nothing to do in this case
-
- case FETCH_ME_BQ:
- {
- StgFetchMeBlockingQueue *fmbq = (StgFetchMeBlockingQueue *)p;
- (StgClosure *)fmbq->blocking_queue =
- evacuate((StgClosure *)fmbq->blocking_queue);
- debugTrace(DEBUG_gc, "scavenge: %p (%s) exciting, isn't it",
- p, info_type((StgClosure *)p)));
- break;
- }
-#endif /* PAR */
-
case TVAR_WATCH_QUEUE:
{
StgTVarWatchQueue *wq = ((StgTVarWatchQueue *) p);
@@ -1351,57 +1244,6 @@ scavenge_one(StgPtr p)
break;
}
-#if defined(PAR)
- case RBH:
- {
-#if 0
- nat size, ptrs, nonptrs, vhs;
- char str[80];
- StgInfoTable *rip = get_closure_info(p, &size, &ptrs, &nonptrs, &vhs, str);
-#endif
- StgRBH *rbh = (StgRBH *)p;
- (StgClosure *)rbh->blocking_queue =
- evacuate((StgClosure *)rbh->blocking_queue);
- failed_to_evac = rtsTrue; // mutable anyhow.
- debugTrace(DEBUG_gc, "scavenge: RBH %p (%s) (new blocking_queue link=%p)",
- p, info_type(p), (StgClosure *)rbh->blocking_queue));
- // ToDo: use size of reverted closure here!
- break;
- }
-
- case BLOCKED_FETCH:
- {
- StgBlockedFetch *bf = (StgBlockedFetch *)p;
- // follow the pointer to the node which is being demanded
- (StgClosure *)bf->node =
- evacuate((StgClosure *)bf->node);
- // follow the link to the rest of the blocking queue
- (StgClosure *)bf->link =
- evacuate((StgClosure *)bf->link);
- debugTrace(DEBUG_gc,
- "scavenge: %p (%s); node is now %p; exciting, isn't it",
- bf, info_type((StgClosure *)bf),
- bf->node, info_type(bf->node)));
- break;
- }
-
-#ifdef DIST
- case REMOTE_REF:
-#endif
- case FETCH_ME:
- break; // nothing to do in this case
-
- case FETCH_ME_BQ:
- {
- StgFetchMeBlockingQueue *fmbq = (StgFetchMeBlockingQueue *)p;
- (StgClosure *)fmbq->blocking_queue =
- evacuate((StgClosure *)fmbq->blocking_queue);
- debugTrace(DEBUG_gc, "scavenge: %p (%s) exciting, isn't it",
- p, info_type((StgClosure *)p)));
- break;
- }
-#endif
-
case TVAR_WATCH_QUEUE:
{
StgTVarWatchQueue *wq = ((StgTVarWatchQueue *) p);
diff --git a/rts/sm/Storage.c b/rts/sm/Storage.c
index a657ce8d3e..d131da9e1e 100644
--- a/rts/sm/Storage.c
+++ b/rts/sm/Storage.c
@@ -361,15 +361,6 @@ newCAF(StgClosure* caf)
}
RELEASE_SM_LOCK;
-
-#ifdef PAR
- /* If we are PAR or DIST then we never forget a CAF */
- { globalAddr *newGA;
- //debugBelch("<##> Globalising CAF %08x %s",caf,info_type(caf));
- newGA=makeGlobal(caf,rtsTrue); /*given full weight*/
- ASSERT(newGA);
- }
-#endif /* PAR */
}
// An alternate version of newCaf which is used for dynamically loaded