X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Frts%2FFrontPanel.c;h=579b75bab3c261b0b885ad7209377a96136a5895;hb=7f24ae51ed36c5c0308a2d0de23e243f32a0043c;hp=9f857255a63577853e1a8c04a57ef53e97e6fdb4;hpb=35ccc96f5fb6dd6849eb7f62b2a0ba4f6562fa6c;p=ghc-hetmet.git diff --git a/ghc/rts/FrontPanel.c b/ghc/rts/FrontPanel.c index 9f85725..579b75b 100644 --- a/ghc/rts/FrontPanel.c +++ b/ghc/rts/FrontPanel.c @@ -1,5 +1,4 @@ /* ----------------------------------------------------------------------------- - * $Id: FrontPanel.c,v 1.3 2001/01/19 11:06:20 simonmar Exp $ * * (c) The GHC Team 2000 * @@ -9,20 +8,21 @@ #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 "StoragePriv.h" +#include "Storage.h" #include "Stats.h" #include "RtsFlags.h" #include "Schedule.h" -#include -#include #include +#include +#include #include "VisSupport.h" #include "VisWindow.h" @@ -101,7 +101,7 @@ configure_event( GtkWidget *widget, GdkEventConfigure *event STG_UNUSED, widget->allocation.width, widget->allocation.height); - fprintf(stderr, "configure!\n"); + debugBelch("configure!\n"); updateFrontPanel(); return TRUE; } @@ -395,29 +395,20 @@ 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); ASSERT(bd->start == a); - if (bd->free == (void *)-1) { + if (bd->flags & BF_FREE) { 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 +605,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; FIXME to_blocks does not exist */ } else { bd = generations[g].steps[s].blocks; } @@ -628,12 +619,9 @@ residencyCensus( void ) type = Other; switch (info->type) { - case BCO: - size = bco_sizeW((StgBCO *)p); - type = Other; - break; - + case CONSTR: + case BCO: if (((StgClosure *)p)->header.info == &stg_DEAD_WEAK_info) { size = sizeofW(StgWeak); type = Other; @@ -680,12 +668,12 @@ residencyCensus( void ) case SE_CAF_BLACKHOLE: case SE_BLACKHOLE: case BLACKHOLE: - case BLACKHOLE_BQ: +/* case BLACKHOLE_BQ: FIXME: case does not exist */ size = sizeW_fromITBL(info); type = BlackHole; break; - case AP_UPD: + case AP: size = pap_sizeW((StgPAP *)p); type = Thunk; break; @@ -712,10 +700,10 @@ residencyCensus( void ) break; case WEAK: - case FOREIGN: case STABLE_NAME: case MVAR: case MUT_VAR: +/* case MUT_CONS: FIXME: case does not exist */ case IND_PERM: case IND_OLDGEN_PERM: size = sizeW_fromITBL(info);