Jni And Ffm

Crossing into native code: JNI call overhead, critical sections and what they block, the FFM downcall and upcall path, `Linker` and method handles, why a native frame pins a virtual thread, and measuring the boundary cost. Use when a native call sits inside a tight loop, when someone proposes migrating JNI to Panama to fix pinning, when `Linker.Option.critical()` is applied without a measured duration, when `jdk.VirtualThreadPinned` events point at a `native` method or `MethodHandle.invokeExact`, when `WARNING: A restricted method ... has been called` appears after a JDK upgrade, when a runbook still references `-Djdk.tracePinnedThreads` or `--enable-preview` for FFM, when `jextract` is assumed to ship with the JDK, when a downcall fails with `WrongThreadException` on a confined arena, or when `GCLocker Initiated GC` appears as a cause in the GC log. Does not cover holding native memory (off-heap-memory), pinning as scheduling (virtual-threads-internals), or the native memory budget (jvm-memory-regions).

robsonkades Updated

File contents

robsonkades/agent-skills/tree/main/skills/jni-and-ffm commit 861b70f506

Frequently asked questions

npx skillmds@latest add robsonkades/jni-and-ffm