[project @ 2004-08-13 13:04:50 by simonmar]
[ghc-hetmet.git] / ghc / rts / FrontPanel.c
index 78675c6..85faeeb 100644 (file)
@@ -1,5 +1,5 @@
 /* -----------------------------------------------------------------------------
- * $Id: FrontPanel.c,v 1.5 2001/08/14 13:40:09 sewardj Exp $
+ * $Id: FrontPanel.c,v 1.9 2004/08/13 13:09:49 simonmar Exp $
  *
  * (c) The GHC Team 2000
  *
@@ -17,7 +17,6 @@
 #include "MBlock.h"
 #include "FrontPanel.h"
 #include "Storage.h"
-#include "StoragePriv.h"
 #include "Stats.h"
 #include "RtsFlags.h"
 #include "Schedule.h"
@@ -397,6 +396,7 @@ updateFrontPanel( void )
                            block_width, block_height, blocks_per_line );
            }
            
+#if 0 /* Segfaults because bd appears to be bogus but != NULL. stolz, 2003-06-24 */
            /* color each block */
            for (; a <= LAST_BLOCK(m); (char *)a += BLOCK_SIZE) {
                bd = Bdescr((P_)a);
@@ -404,22 +404,12 @@ updateFrontPanel( void )
                if (bd->free == (void *)-1) {
                    colorBlock( a, &free_color, 
                                block_width, block_height, blocks_per_line );
-               } else if (bd->gen != NULL) {
-                   colorBlock( a, &gen_colors[bd->gen->no],
+               } else {
+                   colorBlock( a, &gen_colors[bd->gen_no],
                                block_width, block_height, blocks_per_line );
-               } else if (bd->link != NULL) {
-                   if (bd->link->free == (void *)-1) {
-                       colorBlock( a, &free_color, 
-                                   block_width, block_height, blocks_per_line );
-                       
-                   } else if (bd->link->gen != NULL) {
-                       colorBlock( a, &gen_colors[bd->link->gen->no],
-                                   block_width, block_height, blocks_per_line );
-                   } else {
-                       belch("block at %p: can't indentify", bd->start);
-                   }
                }
            }
+#endif
        }
 
        
@@ -616,7 +606,7 @@ residencyCensus( void )
                g == 0 && s == 0) continue;
 
            if (RtsFlags.GcFlags.generations == 1) {
-               bd = generations[g].steps[s].to_space;
+               bd = generations[g].steps[s].to_blocks;
            } else {
                bd = generations[g].steps[s].blocks;
            }
@@ -684,7 +674,7 @@ residencyCensus( void )
                        type = BlackHole;
                        break;
 
-                   case AP_UPD:
+                   case AP:
                        size = pap_sizeW((StgPAP *)p);
                        type = Thunk;
                        break;
@@ -715,6 +705,7 @@ residencyCensus( void )
                    case STABLE_NAME:
                    case MVAR:
                    case MUT_VAR:
+                   case MUT_CONS:
                    case IND_PERM:
                    case IND_OLDGEN_PERM:
                        size = sizeW_fromITBL(info);