diff options
Diffstat (limited to 'checksums.c')
-rw-r--r-- | checksums.c | 43 |
1 files changed, 1 insertions, 42 deletions
diff --git a/checksums.c b/checksums.c index 3af11a19..3fd7d878 100644 --- a/checksums.c +++ b/checksums.c @@ -17,9 +17,6 @@ /* This is debugging code intended to verify the results of dirty bit */ /* computations. Works only in a single threaded environment. */ -/* We assume that stubborn objects are changed only when they are */ -/* enabled for writing. (Certain kinds of writing are actually */ -/* safe under other conditions.) */ #define NSUMS 10000 #define OFFSET 0x10000 @@ -73,26 +70,8 @@ STATIC word GC_checksum(struct hblk *h) return(result | 0x80000000 /* doesn't look like pointer */); } -#ifdef STUBBORN_ALLOC - /* Check whether a stubborn object from the given block appears on */ - /* the appropriate free list. */ - STATIC GC_bool GC_on_free_list(struct hblk *h) - { - hdr * hhdr = HDR(h); - word sz = BYTES_TO_WORDS(hhdr -> hb_sz); - ptr_t p; - - if (sz > MAXOBJWORDS) return(FALSE); - for (p = GC_sobjfreelist[sz]; p != 0; p = obj_link(p)) { - if (HBLKPTR(p) == h) return(TRUE); - } - return(FALSE); - } -#endif - int GC_n_dirty_errors = 0; int GC_n_faulted_dirty_errors = 0; -int GC_n_changed_errors = 0; unsigned long GC_n_clean = 0; unsigned long GC_n_dirty = 0; @@ -128,16 +107,6 @@ STATIC void GC_update_check_page(struct hblk *h, int index) /* Set breakpoint here */GC_n_dirty_errors++; if (was_faulted) GC_n_faulted_dirty_errors++; } -# ifdef STUBBORN_ALLOC - if (!HBLK_IS_FREE(hhdr) - && hhdr -> hb_obj_kind == STUBBORN - && !GC_page_was_changed(h) - && !GC_on_free_list(h)) { - /* if GC_on_free_list(h) then reclaim may have touched it */ - /* without any allocations taking place. */ - /* Set breakpoint here */GC_n_changed_errors++; - } -# endif } pe -> new_valid = TRUE; pe -> block = h + OFFSET; @@ -168,7 +137,7 @@ STATIC void GC_check_blocks(void) } } -/* Should be called immediately after GC_read_dirty and GC_read_changed. */ +/* Should be called immediately after GC_read_dirty. */ void GC_check_dirty(void) { int index; @@ -180,7 +149,6 @@ void GC_check_dirty(void) GC_n_dirty_errors = 0; GC_n_faulted_dirty_errors = 0; - GC_n_changed_errors = 0; GC_n_clean = 0; GC_n_dirty = 0; @@ -201,15 +169,6 @@ out: GC_err_printf("Found %d dirty bit errors (%d were faulted)\n", GC_n_dirty_errors, GC_n_faulted_dirty_errors); } - if (GC_n_changed_errors > 0) { - GC_err_printf("Found %d changed bit errors\n", GC_n_changed_errors); - GC_err_printf( - "These may be benign (provoked by nonpointer changes)\n"); -# ifdef THREADS - GC_err_printf( - "Also expect 1 per thread currently allocating a stubborn obj\n"); -# endif - } for (i = 0; i < GC_n_faulted; ++i) { GC_faulted[i] = 0; /* Don't expose block pointers to GC */ } |