X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Frts%2FFrontPanel.c;h=477fce0ffdd31e0e6080b7384d4d9d7fe4e5300c;hb=788897b6bdcc4d3275a7e72d501d60eddf8abe49;hp=b87fce28b37c1e57df49d89f740d525a1813fe89;hpb=ece274b642d9edd5a90de78a432898509d87209d;p=ghc-hetmet.git diff --git a/ghc/rts/FrontPanel.c b/ghc/rts/FrontPanel.c index b87fce2..477fce0 100644 --- a/ghc/rts/FrontPanel.c +++ b/ghc/rts/FrontPanel.c @@ -1,5 +1,5 @@ /* ----------------------------------------------------------------------------- - * $Id: FrontPanel.c,v 1.2 2000/11/01 11:57:29 simonmar Exp $ + * $Id: FrontPanel.c,v 1.8 2003/06/24 08:49:55 stolz Exp $ * * (c) The GHC Team 2000 * @@ -9,12 +9,14 @@ #ifdef RTS_GTK_FRONTPANEL -#define NON_POSIX_SOURCE +/* Alas, not Posix. */ +/* #include "PosixSource.h" */ #include "Rts.h" #include "RtsUtils.h" #include "MBlock.h" #include "FrontPanel.h" +#include "Storage.h" #include "StoragePriv.h" #include "Stats.h" #include "RtsFlags.h" @@ -395,6 +397,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); @@ -402,22 +405,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 } @@ -614,7 +607,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; } @@ -628,13 +621,10 @@ residencyCensus( void ) type = Other; switch (info->type) { - case BCO: - size = bco_sizeW((StgBCO *)p); - type = Other; - break; - + case CONSTR: - if (((StgClosure *)p)->header.info == &DEAD_WEAK_info) { + case BCO: + if (((StgClosure *)p)->header.info == &stg_DEAD_WEAK_info) { size = sizeofW(StgWeak); type = Other; break; @@ -685,7 +675,7 @@ residencyCensus( void ) type = BlackHole; break; - case AP_UPD: + case AP: size = pap_sizeW((StgPAP *)p); type = Thunk; break; @@ -716,6 +706,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);