SSADUMP(1)

πŸ’– SSADUMP πŸ’–

ok so bestie, meet ssadump β€” she's a whole tool for showing you and interpreting the SSA form of Go programs. yes. the SSA form. the ✨vibes✨ version of your code. she lives in the General Commands Manual, section 1, and she is so iconic for it.


✨ SYNOPSIS ✨

ssadump [flags] args ...

πŸ¦‹ DESCRIPTION πŸ¦‹

She's an SSA builder and interpreter, periodt. like that's the job, that's the whole thing, and she ate.

When -run is specified, ssadump will find the first package that defines a main function and run it in the interpreter πŸƒβ™€οΈπŸ’¨. If none is found, the tests of each package will be run instead. no main? no problem, we're running tests, we move πŸŽ€


πŸ‘‘ OPTIONS πŸ‘‘

  • -build β€” options controlling the SSA builder. the value is a sequence of zero or more of these letters, and you just vibe them together:
    • C β€” perform sanity [C]hecking of the SSA form βœ…
    • D β€” include [D]ebug info for every function πŸ›
    • P β€” log [P]ackage inventory πŸ“¦
    • F β€” log [F]unction SSA code 🧾
    • S β€” log [S]ource locations as the SSA builder progresses πŸ“
    • G β€” use binary object files from gc to provide imports (no code) πŸ”₯
    • L β€” build distinct packages seria[L]ly instead of in parallel 🐌
    • N β€” build [N]aive SSA form: don't replace local loads/stores with registers πŸ™ˆ
  • -cpuprofile β€” write cpu profile to file πŸ“Š
  • -interp β€” options controlling the SSA test interpreter. the value is a sequence of zero or more of these letters (yes the original says "zero or more more", she's a little chaotic, we love her):
    • R β€” disable [R]ecover()` from panic; show interpreter crash instead πŸ’€
    • T β€” [T]race execution of the program. Best for single-threaded programs! 🧡
  • -run β€” invokes the SSA interpreter on the program πŸƒβ™€οΈ

🌈 EXAMPLES 🌈

Quickly dump SSA form of a single package, no thoughts head empty:

ssadump -build=FPG hello.go

Interpret a program, with tracing, because we're nosy πŸ‘€:

ssadump -run -interp=T hello.go

Interpret the unicode package's tests, verbosely, main character energy only:

ssadump -run unicode -- -test.v

🫢 AUTHOR 🫢

This manual page was written by Michael Stapelberg <stapelberg@debian.org>, for the Debian project (and may be used by others). shoutout to Michael, fr fr πŸ’œ


ok that's the whole page bestie, you're officially an SSA girlie now πŸ’…

and that's a wrap!! this one's from the General Commands Manual, dated 2013-12-02 β€” oldie but a goodie, still serving looks, mwah 😘✨🌸