Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

Commit [37d382] Maximize Restore History

Support building without PSEUDO-ATOMIC on POSIX safepoints

- Mark Lisp signal handlers with a flag `synchronous' to indicate
whether we can (and must) handle them immediately. Conversely,
we understand this flag to imply a guarantee that the signal
does not occur during allocation.

- Any signal with a Lisp handler that is not synchronous is
implemented in the runtime using a trampoline, which (instead of
invoking Lisp code directly) first spawns a new pthread, which
only then calls back into Lisp to invoke the handler function
(with a fake signal context).

- Used in particular for SIGINT.

- For SIGPROF, introduce a second per-thread allocation region,
which gets swapped with the usual region around the call into
SIGPROF-HANDLER. This handler is a special case, because it is
careful not to trigger GC nor non-local unwinds, and we can
safely return to the original region afterwards.

- Add a new subclass SIGNAL-HANDLER-THREAD for this purpose,
making it easy to identify these threads (e.g. in the test
driver).

- Run sprof tests while building the contrib. Add a test stressing
time profiling of allocation sequences.

Enable using :SB-SAFEPOINT-STRICTLY on features.

Quite usable already on x86 and x86-64; PPC still has more prominent
issues, e.g. in threads.impure.lisp.

David Lichteblau David Lichteblau 2012-12-05

added contrib/sb-sprof/test.lisp
changed contrib/sb-sprof/Makefile
changed contrib/sb-sprof/sb-sprof.lisp
changed src/code/target-signal.lisp
changed src/code/thread.lisp
changed src/compiler/generic/objdef.lisp
changed src/compiler/generic/parms.lisp
changed src/compiler/ppc/macros.lisp
changed src/compiler/x86-64/macros.lisp
changed src/compiler/x86/macros.lisp
changed src/runtime/gencgc.c
changed src/runtime/interrupt.c
changed src/runtime/interrupt.h
changed src/runtime/runtime.c
changed src/runtime/safepoint.c
changed src/runtime/thread.c
changed src/runtime/thread.h
changed tests/signals.impure.lisp
changed tests/test-util.lisp
changed make-config.sh
changed package-data-list.lisp-expr
contrib/sb-sprof/test.lisp Diff Switch to side-by-side view
Loading...
contrib/sb-sprof/Makefile Diff Switch to side-by-side view
Loading...
contrib/sb-sprof/sb-sprof.lisp Diff Switch to side-by-side view
Loading...
src/code/target-signal.lisp Diff Switch to side-by-side view
Loading...
src/code/thread.lisp Diff Switch to side-by-side view
Loading...
src/compiler/generic/objdef.lisp Diff Switch to side-by-side view
Loading...
src/compiler/generic/parms.lisp Diff Switch to side-by-side view
Loading...
src/compiler/ppc/macros.lisp Diff Switch to side-by-side view
Loading...
src/compiler/x86-64/macros.lisp Diff Switch to side-by-side view
Loading...
src/compiler/x86/macros.lisp Diff Switch to side-by-side view
Loading...
src/runtime/gencgc.c Diff Switch to side-by-side view
Loading...
src/runtime/interrupt.c Diff Switch to side-by-side view
Loading...
src/runtime/interrupt.h Diff Switch to side-by-side view
Loading...
src/runtime/runtime.c Diff Switch to side-by-side view
Loading...
src/runtime/safepoint.c Diff Switch to side-by-side view
Loading...
src/runtime/thread.c Diff Switch to side-by-side view
Loading...
src/runtime/thread.h Diff Switch to side-by-side view
Loading...
tests/signals.impure.lisp Diff Switch to side-by-side view
Loading...
tests/test-util.lisp Diff Switch to side-by-side view
Loading...
make-config.sh Diff Switch to side-by-side view
Loading...
package-data-list.lisp-expr Diff Switch to side-by-side view
Loading...