> You can see these decisions being made by passing -gcflags=-m to go build:

That's a very nice feature! I wonder if compilers for other languages have something similar.

In Java

    -XX:+PrintCompilation -XX:+UnlockDiagnosticVMOptions -XX:+PrintInlining
and

    -XX:+UnlockDiagnosticVMOptions -XX:+LogCompilation
The generated logs can be seen with JITWatch [1].

[1] https://github.com/AdoptOpenJDK/jitwatch