Change object marking routines to minimize stack usage.
authorDmitry Antipov <dmantipov@yandex.ru>
Sun, 8 Jun 2014 15:06:03 +0000 (19:06 +0400)
committerDmitry Antipov <dmantipov@yandex.ru>
Sun, 8 Jun 2014 15:06:03 +0000 (19:06 +0400)
commit83f1450065c55a3e5dce5db0da737cb7a6a4d60c
tree92d118deaa0a9a24d48aa22353c5c413377267d7
parent36cf8493aff99b652b2ad8c9e4d55a18688e8484
Change object marking routines to minimize stack usage.
This change moves a few cold paths from mark_object to NO_INLINE
functions and adjusts symbol marking loop.  According to GCC 4.8.2
-Wstack-usage, this reduces mark_object's stack usage from 80 to
48 bytes on a 64-bit system.  For a long byte-force-recompile runs,
stack usage at the mark phase is reduced up to 28%.  Surprisingly,
it also gains up to 3% in speed (with default '-O2 -g3' flags).
* alloc.c (mark_compiled, mark_localized_symbol): New functions,
refactored out from ...
(mark_object): ... adjusted user.  Also mark symbols in a tight
inner loop.
(mark_face_cache): Add NO_INLINE.
src/ChangeLog
src/alloc.c