General GC optimizations (#3221)

- Enable recursive GC marking with a limited recursion count (this option is configurable)
- No need to decrease the reference count of the gray objects anymore
- Bound function object marking is seperated into a helper function

JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
This commit is contained in:
Robert Fancsik
2019-10-24 14:49:47 +02:00
committed by Dániel Bátyai
parent 3b73562fa5
commit 48f34adea5
10 changed files with 176 additions and 92 deletions
+5
View File
@@ -128,6 +128,8 @@ def get_arguments():
help='memory usage limit to trigger garbage collection (in bytes)')
coregrp.add_argument('--stack-limit', metavar='SIZE', type=int,
help='maximum stack usage (in kilobytes)')
coregrp.add_argument('--gc-mark-limit', metavar='SIZE', type=int,
help='maximum depth of recursion during GC mark phase')
coregrp.add_argument('--mem-stats', metavar='X', choices=['ON', 'OFF'], type=str.upper,
help=devhelp('enable memory statistics (%(choices)s)'))
coregrp.add_argument('--mem-stress-test', metavar='X', choices=['ON', 'OFF'], type=str.upper,
@@ -215,6 +217,9 @@ def generate_build_options(arguments):
build_options_append('JERRY_VALGRIND', arguments.valgrind)
build_options_append('JERRY_VM_EXEC_STOP', arguments.vm_exec_stop)
if arguments.gc_mark_limit is not None:
build_options.append('-D%s=%s' % ('JERRY_GC_MARK_LIMIT', arguments.gc_mark_limit))
# jerry-main options
build_options_append('ENABLE_LINK_MAP', arguments.link_map)