Skip to content

Instantly share code, notes, and snippets.

@jevinskie
Last active April 4, 2026 20:18
Show Gist options
  • Select an option

  • Save jevinskie/8cb6c9ad98e9c0c6a2fe86cfa636e6a7 to your computer and use it in GitHub Desktop.

Select an option

Save jevinskie/8cb6c9ad98e9c0c6a2fe86cfa636e6a7 to your computer and use it in GitHub Desktop.
graal-macos-awt-notes-2026-04

Coverage

llvm-profdata merge -o default.profdata default.profraw

llvm-profdata show default.profdata --topn 128 | llvm-cxxfilt

llvm-cov export --instr-profile default.profdata BINARY

JDK

unpath() { path=("${(@)path:#$1}") }

unpath /opt/homebrew/opt/ccache/libexec

unpath /usr/libexec/ccache

bash configure --enable-native-coverage --enable-debug --with-native-debug-symbols=internal --enable-jvm-feature-jvmci --enable-ccache --with-toolchain-type=clang --disable-warnings-as-errors

make images

make exploded-image

make graal-builder-image

Graal

mx --primary-suite-path substratevm --components=ni,svmjdwp --force-bash-launchers=true --graalvm-skip-archive --disable-debuginfo-stripping --no-licenses native-image --future-defaults=all -g -Djava.awt.headless=false --native-image-info -O0 -g --diagnostics-mode --enable-preview -H:+UnlockExperimentalVMOptions -H:+ForeignAPISupport -Ddebug.jni.registration=true -Ddebug.jni.shims=true HelloWorldAWT

mx -v --env ni-ce -p vm build --all

mx --primary-suite-path substratevm --components=ni,svmjdwp,ni-agent --force-bash-launchers=true --graalvm-skip-archive --disable-debuginfo-stripping --no-licenses native-image --macro:native-image-agent-library --future-defaults=all

mx --primary-suite-path substratevm --components=ni,svmjdwp --force-bash-launchers=true --graalvm-skip-archive --disable-debuginfo-stripping --no-licenses build

native-image --future-defaults=all -g -O0 -H:+UnlockExperimentalVMOptions -H:Preserve=module=java.desktop --enable-preview -H:+ForeignAPISupport -Djava.awt.headless=false -Ddebug.jni.registration=true -Ddebug.jni.shims=true HelloWorldAWT

HelloWorldAWT

DYLD_PRINT_APIS=1 ./helloworldawt 2>&1 | grep -E -v '(dyld_objc_class_count|dyld_get_objc_selector|dyld_get_active_platform|dyld_get_base_platform|dyld_is_memory_immutable|dyld_get_objc_class|dyld_get_objc_protocol|dyld_image_header_containing_address|dyld_get_image_name|dyld_get_image_header|dyld_shared_cache_some_image_overridden|dyld_image_path_containing_address|dyld_get_image_slide)'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment