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:
committed by
Dániel Bátyai
parent
3b73562fa5
commit
48f34adea5
@@ -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)
|
||||
|
||||
|
||||
+12
-8
@@ -38,6 +38,7 @@ OPTIONS_PROFILE_MIN = ['--profile=minimal']
|
||||
OPTIONS_PROFILE_ES51 = [] # NOTE: same as ['--profile=es5.1']
|
||||
OPTIONS_PROFILE_ES2015 = ['--profile=es2015-subset']
|
||||
OPTIONS_STACK_LIMIT = ['--stack-limit=96']
|
||||
OPTIONS_GC_MARK_LIMIT = ['--gc-mark-limit=16']
|
||||
OPTIONS_DEBUG = ['--debug']
|
||||
OPTIONS_SNAPSHOT = ['--snapshot-save=on', '--snapshot-exec=on', '--jerry-cmdline-snapshot=on']
|
||||
OPTIONS_UNITTESTS = ['--unittests=on', '--jerry-cmdline=off', '--error-messages=on',
|
||||
@@ -75,22 +76,23 @@ JERRY_UNITTESTS_OPTIONS = [
|
||||
# Test options for jerry-tests
|
||||
JERRY_TESTS_OPTIONS = [
|
||||
Options('jerry_tests-es2015_subset-debug',
|
||||
OPTIONS_COMMON + OPTIONS_PROFILE_ES2015 + OPTIONS_DEBUG + OPTIONS_STACK_LIMIT),
|
||||
OPTIONS_COMMON + OPTIONS_PROFILE_ES2015 + OPTIONS_DEBUG + OPTIONS_STACK_LIMIT + OPTIONS_GC_MARK_LIMIT),
|
||||
Options('jerry_tests-es5.1',
|
||||
OPTIONS_COMMON + OPTIONS_PROFILE_ES51 + OPTIONS_STACK_LIMIT),
|
||||
OPTIONS_COMMON + OPTIONS_PROFILE_ES51 + OPTIONS_STACK_LIMIT + OPTIONS_GC_MARK_LIMIT),
|
||||
Options('jerry_tests-es5.1-snapshot',
|
||||
OPTIONS_COMMON + OPTIONS_PROFILE_ES51 + OPTIONS_SNAPSHOT + OPTIONS_STACK_LIMIT,
|
||||
OPTIONS_COMMON + OPTIONS_PROFILE_ES51 + OPTIONS_SNAPSHOT + OPTIONS_STACK_LIMIT + OPTIONS_GC_MARK_LIMIT,
|
||||
['--snapshot']),
|
||||
Options('jerry_tests-es5.1-debug',
|
||||
OPTIONS_COMMON + OPTIONS_PROFILE_ES51 + OPTIONS_DEBUG + OPTIONS_STACK_LIMIT),
|
||||
OPTIONS_COMMON + OPTIONS_PROFILE_ES51 + OPTIONS_DEBUG + OPTIONS_STACK_LIMIT + OPTIONS_GC_MARK_LIMIT),
|
||||
Options('jerry_tests-es5.1-debug-snapshot',
|
||||
OPTIONS_COMMON + OPTIONS_PROFILE_ES51 + OPTIONS_SNAPSHOT + OPTIONS_DEBUG + OPTIONS_STACK_LIMIT,
|
||||
['--snapshot']),
|
||||
OPTIONS_COMMON + OPTIONS_PROFILE_ES51 + OPTIONS_SNAPSHOT + OPTIONS_DEBUG + OPTIONS_STACK_LIMIT
|
||||
+ OPTIONS_GC_MARK_LIMIT, ['--snapshot']),
|
||||
Options('jerry_tests-es5.1-debug-cpointer_32bit',
|
||||
OPTIONS_COMMON + OPTIONS_PROFILE_ES51 + OPTIONS_DEBUG + OPTIONS_STACK_LIMIT
|
||||
OPTIONS_COMMON + OPTIONS_PROFILE_ES51 + OPTIONS_DEBUG + OPTIONS_STACK_LIMIT + OPTIONS_GC_MARK_LIMIT
|
||||
+ ['--cpointer-32bit=on', '--mem-heap=1024']),
|
||||
Options('jerry_tests-es5.1-debug-external_context',
|
||||
OPTIONS_COMMON + OPTIONS_PROFILE_ES51 + OPTIONS_DEBUG + OPTIONS_STACK_LIMIT + ['--external-context=on']),
|
||||
OPTIONS_COMMON + OPTIONS_PROFILE_ES51 + OPTIONS_DEBUG + OPTIONS_STACK_LIMIT + OPTIONS_GC_MARK_LIMIT
|
||||
+ ['--external-context=on']),
|
||||
]
|
||||
|
||||
# Test options for jerry-test-suite
|
||||
@@ -169,6 +171,8 @@ JERRY_BUILDOPTIONS = [
|
||||
['--jerry-cmdline-snapshot=on']),
|
||||
Options('buildoption_test-recursion_limit',
|
||||
OPTIONS_STACK_LIMIT),
|
||||
Options('buildoption_test-gc-mark_limit',
|
||||
OPTIONS_GC_MARK_LIMIT),
|
||||
Options('buildoption_test-single-source',
|
||||
['--cmake-param=-DENABLE_ALL_IN_ONE_SOURCE=ON']),
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user