summaryrefslogtreecommitdiff
path: root/ghc/rts
diff options
context:
space:
mode:
authorhwloidl <unknown>2000-01-14 13:17:16 +0000
committerhwloidl <unknown>2000-01-14 13:17:16 +0000
commit80e3fcf33425c5bc9164694df2dec7c79730f076 (patch)
tree36f7303ccccab4c72a32a37ec9e0977061d94c7a /ghc/rts
parent3769b3fa2b729b1974acdc1a67217316c3a76fe3 (diff)
downloadhaskell-80e3fcf33425c5bc9164694df2dec7c79730f076.tar.gz
[project @ 2000-01-14 13:17:15 by hwloidl]
Minor cleanup to get rid of warnings.
Diffstat (limited to 'ghc/rts')
-rw-r--r--ghc/rts/GC.c26
-rw-r--r--ghc/rts/Main.c4
-rw-r--r--ghc/rts/RtsStartup.c4
-rw-r--r--ghc/rts/Schedule.c18
4 files changed, 13 insertions, 39 deletions
diff --git a/ghc/rts/GC.c b/ghc/rts/GC.c
index 3665034b15..22e3a9cd01 100644
--- a/ghc/rts/GC.c
+++ b/ghc/rts/GC.c
@@ -1,5 +1,5 @@
/* -----------------------------------------------------------------------------
- * $Id: GC.c,v 1.69 2000/01/13 14:34:02 hwloidl Exp $
+ * $Id: GC.c,v 1.70 2000/01/14 13:17:15 hwloidl Exp $
*
* (c) The GHC Team 1998-1999
*
@@ -937,15 +937,6 @@ MarkRoot(StgClosure *root)
return evacuate(root);
}
-//@cindex MarkRootHWL
-StgClosure *
-MarkRootHWL(StgClosure *root)
-{
- StgClosure *new = evacuate(root);
- upd_evacuee(root, new);
- return new;
-}
-
//@cindex addBlock
static void addBlock(step *step)
{
@@ -1189,9 +1180,6 @@ evacuate(StgClosure *q)
step *step;
const StgInfoTable *info;
- nat size, ptrs, nonptrs, vhs;
- char str[80];
-
loop:
if (HEAP_ALLOCED(q)) {
bd = Bdescr((P_)q);
@@ -2724,17 +2712,15 @@ scavenge_stack(StgPtr p, StgPtr stack_end)
case CATCH_FRAME:
case SEQ_FRAME:
{
- StgPtr old_p = p; // debugging only -- HWL
+ // StgPtr old_p = p; // debugging only -- HWL
/* stack frames like these are ordinary closures and therefore may
contain setup-specific fixed-header words (as in GranSim!);
therefore, these cases should not use p++ but &(p->payload) -- HWL */
- IF_DEBUG(gran, IF_DEBUG(sanity, printObj(p)));
+ // IF_DEBUG(gran, IF_DEBUG(sanity, printObj(p)));
bitmap = info->layout.bitmap;
p = (StgPtr)&(((StgClosure *)p)->payload);
- IF_DEBUG(sanity,
- belch("HWL: scavenge_stack: (STOP|CATCH|SEQ)_FRAME adjusting p from %p to %p (instead of %p)",
- old_p, p, old_p+1));
+ // IF_DEBUG(sanity, belch("HWL: scavenge_stack: (STOP|CATCH|SEQ)_FRAME adjusting p from %p to %p (instead of %p)", old_p, p, old_p+1));
goto small_bitmap;
}
case RET_BCO:
@@ -3148,7 +3134,7 @@ threadSqueezeStack(StgTSO *tso)
frame = prev_frame;
#if DEBUG
IF_DEBUG(sanity,
- if (!(frame>=top_frame && frame<=bottom)) {
+ if (!(frame>=top_frame && frame<=(StgUpdateFrame *)bottom)) {
printObj((StgClosure *)prev_frame);
barf("threadSqueezeStack: current frame is rubbish %p; previous was %p\n",
frame, prev_frame);
@@ -3356,7 +3342,6 @@ threadPaused(StgTSO *tso)
void
printMutOnceList(generation *gen)
{
- const StgInfoTable *info;
StgMutClosure *p, *next, *new_list;
p = gen->mut_once_list;
@@ -3378,7 +3363,6 @@ printMutOnceList(generation *gen)
void
printMutableList(generation *gen)
{
- const StgInfoTable *info;
StgMutClosure *p, *next;
p = gen->saved_mut_list;
diff --git a/ghc/rts/Main.c b/ghc/rts/Main.c
index 1c721b795c..8dc044aed6 100644
--- a/ghc/rts/Main.c
+++ b/ghc/rts/Main.c
@@ -1,5 +1,5 @@
/* -----------------------------------------------------------------------------
- * $Id: Main.c,v 1.14 2000/01/13 14:34:03 hwloidl Exp $
+ * $Id: Main.c,v 1.15 2000/01/14 13:17:16 hwloidl Exp $
*
* (c) The GHC Team 1998-1999
*
@@ -67,7 +67,7 @@ int main(int argc, char *argv[])
{ /* a wait loop to allow attachment of gdb to UNIX threads */
nat i, j, s;
- for (i=0, s=0; i<RtsFlags.ParFlags.wait; i++)
+ for (i=0, s=0; i<(nat)RtsFlags.ParFlags.wait; i++)
for (j=0; j<1000000; j++)
s += j % 65536;
}
diff --git a/ghc/rts/RtsStartup.c b/ghc/rts/RtsStartup.c
index a589b18f1a..a1a29954ed 100644
--- a/ghc/rts/RtsStartup.c
+++ b/ghc/rts/RtsStartup.c
@@ -1,5 +1,5 @@
/* -----------------------------------------------------------------------------
- * $Id: RtsStartup.c,v 1.26 2000/01/13 14:34:04 hwloidl Exp $
+ * $Id: RtsStartup.c,v 1.27 2000/01/14 13:17:15 hwloidl Exp $
*
* (c) The GHC Team, 1998-1999
*
@@ -20,7 +20,7 @@
#include "Weak.h"
#include "Ticky.h"
-#if defined(PROFILING)
+#if defined(PROFILING) || defined(DEBUG)
# include "ProfRts.h"
# include "ProfHeap.h"
#endif
diff --git a/ghc/rts/Schedule.c b/ghc/rts/Schedule.c
index 9b7cdf49e8..9fa7f6a5c4 100644
--- a/ghc/rts/Schedule.c
+++ b/ghc/rts/Schedule.c
@@ -1,5 +1,5 @@
/* ---------------------------------------------------------------------------
- * $Id: Schedule.c,v 1.42 2000/01/14 11:45:21 hwloidl Exp $
+ * $Id: Schedule.c,v 1.43 2000/01/14 13:17:16 hwloidl Exp $
*
* (c) The GHC Team, 1998-1999
*
@@ -1545,9 +1545,10 @@ run_queue_len(void)
static void GetRoots(void)
{
StgMainThread *m;
- nat i;
#if defined(GRAN)
+ nat i;
+
for (i=0; i<=RtsFlags.GranFlags.proc; i++) {
if ((run_queue_hds[i] != END_TSO_QUEUE) && ((run_queue_hds[i] != NULL)))
run_queue_hds[i] = (StgTSO *)MarkRoot((StgClosure *)run_queue_hds[i]);
@@ -2798,7 +2799,7 @@ print_bq (StgClosure *node)
tso=tso->link) {
ASSERT(tso!=(StgTSO*)NULL && tso!=END_TSO_QUEUE); // sanity check
ASSERT(get_itbl(tso)->type == TSO); // guess what, sanity check
- fprintf(stderr," TSO %d (%x),", tso->id, tso);
+ fprintf(stderr," TSO %d (%p),", tso->id, tso);
}
fputc('\n', stderr);
}
@@ -2807,17 +2808,6 @@ print_bq (StgClosure *node)
/* A debugging function used all over the place in GranSim and GUM.
Dummy function in other setups.
*/
-# if !defined(GRAN) && !defined(PAR)
-char *
-info_type(StgClosure *closure){
- return "petaQ";
-}
-
-char *
-info_type_by_ip(StgInfoTable *ip){
- return "petaQ";
-}
-#endif
static void
sched_belch(char *s, ...)