Skip to content

Commit ef4076d

Browse files
committed
Print thread dump in truffle native unit test builds on timeout.
1 parent c3fc9c4 commit ef4076d

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

truffle/mx.truffle/mx_truffle.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -877,6 +877,7 @@ def truffle_native_context_preinitialization_tests(build_args=None):
877877

878878

879879
def truffle_native_unit_tests_gate(use_optimized_runtime=True, build_args=None):
880+
jdk = mx.get_jdk(tag='graalvm')
880881
build_args = build_args if build_args else []
881882
is_libc_musl = '--libc=musl' in build_args
882883
is_static = '--static' in build_args
@@ -913,11 +914,13 @@ def truffle_native_unit_tests_gate(use_optimized_runtime=True, build_args=None):
913914
'-R:MaxHeapSize=2g',
914915
'-H:MaxRuntimeCompileMethods=5000',
915916
'--enable-url-protocols=http,jar',
917+
'--enable-monitoring=jvmstat',
916918
'-H:+AddAllCharsets',
917919
'--add-exports=org.graalvm.polyglot/org.graalvm.polyglot.impl=ALL-UNNAMED',
918920
'--add-exports=org.graalvm.truffle/com.oracle.truffle.api.impl.asm=ALL-UNNAMED',
919921
'--enable-native-access=org.graalvm.truffle',
920-
]
922+
] + (mx_sdk_vm_impl.svm_experimental_options(['-H:+DumpThreadStacksOnSignal']) if jdk.version < mx.VersionSpec("24") else
923+
['--enable-monitoring=threaddump'])
921924
run_args = run_truffle_runtime_args + (['-Xss1m'] if is_libc_musl else []) + [
922925
mx_subst.path_substitutions.substitute('-Dnative.test.path=<path:truffle:TRUFFLE_TEST_NATIVE>'),
923926
]

0 commit comments

Comments
 (0)