gencgc: Reduce conservatism for pointers to unboxed pages.
authorAlastair Bridgewater <nyef@kana.lisphacker.com>
Mon, 30 Dec 2013 22:37:04 +0000 (17:37 -0500)
committerAlastair Bridgewater <nyef@kana.lisphacker.com>
Mon, 30 Dec 2013 22:37:04 +0000 (17:37 -0500)
commit0cd4731bb43b3f79d33e85300407031f808763f0
treee2af38ca932e039e498eb90737017ab0fe4d6d21
parentba008a77f32b2ef30e8492757afb8b54731c76cf
gencgc: Reduce conservatism for pointers to unboxed pages.

  * Because return addresses are unmarked, unboxed interior
pointers must be allowed to pin if they point within a code object.
Assuming that code objects are only allocated to CODE_PAGE_FLAG
pages, preserve_pointer() will allow any code_page_p() true page
to be pinned by any pointer to within its body.

  * But code_page_p() was broken, being an alternate version of
page_allocated_p() in implementation, with no warning or comment.
The net effect is extra conservatism: Any pointer to allocated
space will pin whatever page it points to.

  * Code pages aren't always allocated to CODE_PAGE_FLAG pages,
for a couple of reasons.  Until we can maintain such an invariant,
we can only use the weaker version (which DOES hold): code objects
are always allocated to boxed pages (either BOXED_PAGE_FLAG or
CODE_PAGE_FLAG, never FREE_PAGE_FLAG or UNBOXED_PAGE_FLAG).

  * Reduce conservatism in the GC by making code_page_p() delegate
to page_boxed_p(), thus tightening up the test for pinning unboxed
pages.

  * Also leave the "correct" logic for code_page_p() in place but
disabled (and make it actually BE correct), and add a comment
explaining part of what's going on.
NEWS
src/runtime/gencgc.c