Changeset 11523


Ignore:
Timestamp:
Dec 15, 2008, 10:28:35 AM (11 years ago)
Author:
gb
Message:

x86 support for FLASH-FREEZE.
Use signed_natural in x86 gc-like functions.
RECURSIVE-LOCK-WHOSTATE and the RWLOCK-WHOSTATE functions: use
WITH-STANDARD-IO-SYNTAX when consing up the string. Do that in
higher-level code, to avoid early refs to CL-USER pacjage.
(In general, other things similar to RECURSIVE-LOCK-WHOSTATE are
suspect, in that they call (FORMAT NIL ...) in a random environment
where things like *PRINT-READABLY* may be in effect. There are
probably other cases of this.)

Location:
trunk/source
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/level-0/X86/X8632/x8632-utils.lisp

    r11521 r11523  
    386386  (jmp-subprim .SPmakeu32))
    387387
     388(defx8632lapfunction flash-freeze ()
     389  "Like FREEZE, without the GC."
     390  (movl ($ arch::gc-trap-function-flash-freeze) (% imm0))
     391  (uuo-gc-trap)
     392  (jmp-subprim .SPmakeu32))
     393
    388394(defx8632lapfunction %allocate-list ((initial-element arg_y) (nconses arg_z))
    389395  (check-nargs 2)
  • trunk/source/level-0/X86/x86-utils.lisp

    r11521 r11523  
    435435(defx86lapfunction freeze ()
    436436  "Do a full GC, then consider all heap-allocated objects which survive to be non-relocatable."
    437   (movq ($ arch::gc-trap-function-freeze) (% imm0))
     437  (movl ($ arch::gc-trap-function-freeze) (% imm0.l))
     438  (uuo-gc-trap)
     439  (jmp-subprim .SPmakeu64))
     440
     441(defx86lapfunction flash-freeze ()
     442  "Like FREEZE, without the GC."
     443  (movl ($ arch::gc-trap-function-flash-freeze) (% imm0.l))
    438444  (uuo-gc-trap)
    439445  (jmp-subprim .SPmakeu64))
  • trunk/source/level-0/l0-aprims.lisp

    r10453 r11523  
    155155    (or (%svref r target::lock.whostate-cell)
    156156        (setf (%svref r target::lock.whostate-cell)
    157               (format nil "Lock ~s wait" r)))
     157              (%lock-whostate-string "Lock wait" r)))
    158158    (report-bad-arg r 'recursive-lock)))
    159159
     
    175175    (or (%svref rw target::lock.whostate-cell)
    176176        (setf (%svref rw target::lock.whostate-cell)
    177               (format nil "Read lock ~s wait" rw)))
     177              (%lock-whostate-string "Read lock wait" rw)))
    178178    (report-bad-arg rw 'read-write-lock)))
    179179
     
    183183    (or (%svref rw target::lock.whostate-2-cell)
    184184        (setf (%svref rw target::lock.whostate-2-cell)
    185               (format nil "Read lock ~s wait" rw)))
     185              (%lock-whostate-string "Write lock wait" rw)))
    186186    (report-bad-arg rw 'read-write-lock)))
    187187 
  • trunk/source/lib/misc.lisp

    r11373 r11523  
    976976            0))
    977977  name)
     978
     979(defun %lock-whostate-string (string lock)
     980  (with-standard-io-syntax
     981      (format nil "~a for ~a ~@[~a ~]@ #x~x"
     982              string
     983              (%svref lock target::lock.kind-cell)
     984              (lock-name lock)
     985              (%ptr-to-int (%svref lock target::lock._value-cell)))))
  • trunk/source/lisp-kernel/ppc-exceptions.c

    r11522 r11523  
    841841gc_from_xp(ExceptionInformation *xp, signed_natural param)
    842842{
    843   int status = gc_like_from_xp(xp, gc_from_tcr, param);
     843  signed_natural status = gc_like_from_xp(xp, gc_from_tcr, param);
    844844
    845845  freeGCptrs();
  • trunk/source/lisp-kernel/x86-exceptions.c

    r11521 r11523  
    158158natural gc_deferred = 0, full_gc_deferred = 0;
    159159
     160signed_natural
     161flash_freeze(TCR *tcr, signed_natural param)
     162{
     163  return 0;
     164}
     165
     166
    160167Boolean
    161168handle_gc_trap(ExceptionInformation *xp, TCR *tcr)
     
    212219    }
    213220    xpGPR(xp, Iimm0) = lisp_heap_gc_threshold;
     221    break;
     222
     223  case GC_TRAP_FUNCTION_FLASH_FREEZE: /* Like freeze below, but no GC */
     224    untenure_from_area(tenured_area);
     225    gc_like_from_xp(xp,flash_freeze,0);
     226    a->active = (BytePtr) align_to_power_of_2(a->active, log2_page_size);
     227    tenured_area->static_dnodes = area_dnode(a->active, a->low);
     228    if (egc_was_enabled) {
     229      tenure_to_area(tenured_area);
     230    }
     231    xpGPR(xp, Iimm0) = tenured_area->static_dnodes << dnode_shift;
    214232    break;
    215233
     
    25962614
    25972615
    2598 int
     2616signed_natural
    25992617gc_like_from_xp(ExceptionInformation *xp,
    2600                 int(*fun)(TCR *, signed_natural),
     2618                signed_natural(*fun)(TCR *, signed_natural),
    26012619                signed_natural param)
    26022620{
     
    26622680}
    26632681
    2664 int
     2682signed_natural
    26652683purify_from_xp(ExceptionInformation *xp, signed_natural param)
    26662684{
     
    26682686}
    26692687
    2670 int
     2688signed_natural
    26712689impurify_from_xp(ExceptionInformation *xp, signed_natural param)
    26722690{
     
    26762694/* Returns #bytes freed by invoking GC */
    26772695
    2678 int
     2696signed_natural
    26792697gc_from_tcr(TCR *tcr, signed_natural param)
    26802698{
     
    26982716}
    26992717
    2700 int
     2718signed_natural
    27012719gc_from_xp(ExceptionInformation *xp, signed_natural param)
    27022720{
    2703   int status = gc_like_from_xp(xp, gc_from_tcr, param);
     2721  signed_natural status = gc_like_from_xp(xp, gc_from_tcr, param);
    27042722
    27052723  freeGCptrs();
  • trunk/source/lisp-kernel/x86-gc.c

    r11501 r11523  
    24162416
    24172417
    2418 int
     2418signed_natural
    24192419purify(TCR *tcr, signed_natural param)
    24202420{
     
    27002700}
    27012701
    2702 int
     2702signed_natural
    27032703impurify(TCR *tcr, signed_natural param)
    27042704{
Note: See TracChangeset for help on using the changeset viewer.