This looks awesome, thanks for sharing!
I think that this comes from the fact that qemu doesn’t handle dual mapping which the erlang JIT relies on. You can try exporting the env var ERL_AFLAGS="+JPperf true"
during the build (enabling perf has a side effect of disabling the dual mapping), on master you could use +JMsingle true
instead (see https://github.com/erlang/otp/pull/6340)