aboutsummaryrefslogtreecommitdiff
path: root/lib/compilers/erlangasm.ts
Commit message (Collapse)AuthorAge
* View Erlang jitted assembly (#6104)gh-10610Andrea Tomasi2024-02-12
Hi, this PR adds a way to view the assemply code of Erlang code. Since OTP 24 inside the Erlang VM there is a jitter that runs while we load the code. The standard way to dump the asm code is to pass an option during the startup. The main issue is that this triggers the dump of all the modules we are loading (and it is slow). To avoid this I'm using some instrinsics of OTP 26 but at least we dump only what we need. (I'm planning to add it to `infra` and then to awmason Some references: - https://www.erlang.org/blog/otp-26-highlights/#improvements-in-the-erlang-compiler-and-jit - https://github.com/erlang/otp/blob/master/erts/emulator/beam/erl_bif_info.c#L5255 --------- Co-authored-by: Matt Godbolt <matt@godbolt.org>