Changeset 15820


Ignore:
Timestamp:
May 24, 2013, 11:13:55 AM (8 years ago)
Author:
gb
Message:

split the refidx into dynamic, managed_static parts.
(Still need to handle lowering tenured area for static conses.)
Make check_refmap_consistency check the refidx.

Location:
trunk/source/lisp-kernel
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/lisp-kernel/arm-gc.c

    r15504 r15820  
    712712
    713713void
    714 check_refmap_consistency(LispObj *start, LispObj *end, bitvector refbits)
     714check_refmap_consistency(LispObj *start, LispObj *end, bitvector refbits, bitvector refidx)
    715715{
    716716  LispObj x1, *base = start, *prev = start;
     
    758758          Bug(NULL, "Missing memoization in doublenode at 0x" LISP "\n", start);
    759759          set_bit(refbits, ref_dnode);
     760          set_bit(refidx,ref_dnode>>8);
     761        } else {
     762          if (!ref_bit(refidx, ref_dnode>>8)) {
     763            Bug(NULL, "Memoization for doublenode at 0x" LISP " not indexed\n", start);
     764            set_bit(refidx,ref_dnode>>8);
     765          }
    760766        }
    761767      }
  • trunk/source/lisp-kernel/gc-common.c

    r15815 r15820  
    11061106  if (num_memo_dnodes) {
    11071107    if (GCDebug) {
    1108       check_refmap_consistency(p, p+(num_memo_dnodes << 1), refbits);
     1108      check_refmap_consistency(p, p+(num_memo_dnodes << 1), refbits, a->refidx);
    11091109    }
    11101110
     
    13071307  if (num_memo_dnodes) {
    13081308    if (GCDebug) {
    1309       check_refmap_consistency(p, p+(num_memo_dnodes << 1), refbits);
     1309      check_refmap_consistency(p, p+(num_memo_dnodes << 1), refbits, a->refidx);
    13101310    }
    13111311
     
    13481348    if (GCDebug) {
    13491349      p = (LispObj *) a->low;
    1350       check_refmap_consistency(p, p+(num_memo_dnodes << 1), refbits);
     1350      check_refmap_consistency(p, p+(num_memo_dnodes << 1), refbits, a->refidx);
    13511351    }
    13521352  }
     
    13661366  if (num_memo_dnodes) {
    13671367    if (GCDebug) {
    1368       check_refmap_consistency(p, p+(num_memo_dnodes << 1), refbits);
     1368      check_refmap_consistency(p, p+(num_memo_dnodes << 1), refbits, a->refidx);
    13691369    }
    13701370
     
    14841484    if (GCDebug) {
    14851485      p = (LispObj *) a->low;
    1486       check_refmap_consistency(p, p+(num_memo_dnodes << 1), refbits);
     1486      check_refmap_consistency(p, p+(num_memo_dnodes << 1), refbits, a->refidx);
    14871487    }
    14881488  }
  • trunk/source/lisp-kernel/gc.h

    r15816 r15820  
    214214LispObj dnode_forwarding_address(natural, int);
    215215LispObj locative_forwarding_address(LispObj);
    216 void check_refmap_consistency(LispObj *, LispObj *, bitvector);
     216void check_refmap_consistency(LispObj *, LispObj *, bitvector, bitvector);
    217217void check_all_areas(TCR *);
    218218void mark_tstack_area(area *);
  • trunk/source/lisp-kernel/pmcl-kernel.c

    r15816 r15820  
    136136
    137137LispObj lisp_nil = (LispObj) 0;
    138 bitvector global_mark_ref_bits = NULL, dynamic_mark_ref_bits = NULL, relocatable_mark_ref_bits = NULL, global_refidx = NULL;
     138bitvector global_mark_ref_bits = NULL, dynamic_mark_ref_bits = NULL, relocatable_mark_ref_bits = NULL, global_refidx = NULL, dynamic_refidx = NULL;
    139139
    140140
     
    648648    prefix_size = (prefix_dnodes+7)>>3,
    649649    markbits_size = (3*sizeof(LispObj))+((ndnodes+7)>>3),
     650    prefix_index_bits,
    650651    n;
    651652  low_markable_address = low;
    652653  high_markable_address = high;
    653654  dynamic_mark_ref_bits = (bitvector)(((BytePtr)global_mark_ref_bits)+prefix_size);
     655  if (prefix_dnodes & 255) {
     656    fprintf(dbgout, "warning: prefix_dnodes not a multiple of 256\n");
     657  }
     658  prefix_index_bits = prefix_dnodes>>8;
     659  if (prefix_index_bits & (WORD_SIZE-1)) {
     660    fprintf(dbgout, "warning: prefix_index_bits not a multiple of %d\n", WORD_SIZE);
     661  }
     662  dynamic_refidx = (bitvector)(((BytePtr)global_refidx)+(prefix_index_bits>>3));
    654663  relocatable_mark_ref_bits = dynamic_mark_ref_bits;
    655664  n = align_to_power_of_2(markbits_size,log2_page_size);
     
    17521761    tenured_area->younger = g2_area;
    17531762    tenured_area->refbits = dynamic_mark_ref_bits;
     1763    tenured_area->refidx = dynamic_refidx;
    17541764    managed_static_area->refbits = global_mark_ref_bits;
     1765    managed_static_area->refidx = global_refidx;
    17551766    a->markbits = dynamic_mark_ref_bits;
    17561767    tenured_area->static_dnodes = a->static_dnodes;
  • trunk/source/lisp-kernel/ppc-gc.c

    r15504 r15820  
    832832
    833833void
    834 check_refmap_consistency(LispObj *start, LispObj *end, bitvector refbits)
     834check_refmap_consistency(LispObj *start, LispObj *end, bitvector refbits, bitvector refidx)
    835835{
    836836  LispObj x1, *base = start, *prev = start;
     
    875875        Bug(NULL, "Missing memoization in doublenode at 0x" LISP "\n", start);
    876876        set_bit(refbits, ref_dnode);
     877        set_bit(refidx,ref_dnode>>8);
     878      } else {
     879        if (!ref_bit(refidx, ref_dnode>>8)) {
     880          Bug(NULL, "Memoization for doublenode at 0x" LISP " not indexed\n", start);
     881          set_bit(refidx,ref_dnode>>8);
     882        }
    877883      }
    878884    }
  • trunk/source/lisp-kernel/x86-gc.c

    r15786 r15820  
    12161216
    12171217void
    1218 check_refmap_consistency(LispObj *start, LispObj *end, bitvector refbits)
     1218check_refmap_consistency(LispObj *start, LispObj *end, bitvector refbits, bitvector refidx)
    12191219{
    12201220  LispObj x1, *base = start, *prev = start;
     
    12731273          Bug(NULL, "Missing memoization in doublenode at 0x" LISP "\n", start);
    12741274          set_bit(refbits, ref_dnode);
     1275          set_bit(refidx, ref_dnode>>8);
     1276        } else {
     1277          if (!ref_bit(refidx, ref_dnode>>8)) {
     1278            Bug(NULL, "Memoization for doublenode at 0x" LISP " not indexed\n", start);
     1279            set_bit(refidx,ref_dnode>>8);
     1280          }
    12751281        }
    12761282      }
Note: See TracChangeset for help on using the changeset viewer.