BEAM-style Execution Tracing for Perl
summary
Compares how BEAM execution tracing uses breakpoints, atomic injection and match specs to instrument only targeted functions with minimal impact versus a Perl prototype that overwrites the interpreter’s nextstate opcode to attach probes at runtime. Reconstructs how Erlang’s erl_trace and trace_pattern cooperate, builds a native Perl extension that calls back into Perl for data extraction, and measures about ~10% overhead when probes are checked per request; lacks BEAM’s match-specs and interactive control so operational delivery remains unresolved.
AI-written summary · about
chapters (16)
- 0:00Intro
- 0:21Context
- 1:53Debugging
- 3:21Logs!
- 5:38Static & Dynamic Instrumentation
- 6:38BEAM tracing: capabilities
- 7:17BEAM: Call tracing in action
- 8:46erlang:trace/3
- 10:13erlang: trace_pattern/3
- 11:38Breakpoint injection
- 16:00Perl (guts)
- 16:50Perl: hooking nextstate
- 17:39Perl: probe_nextstate Call the original opcode
- 18:27Perl: other stuff
- 20:28Conclusion
- 21:54Links & Citations
related talks
48mGetting to Know the Erlang Virtual Machine, the BEAM
19mErlang/OTP Update
26mTest Automation – Get the BEAM into an Organization
47mPurescript on the BEAM; Typed OTP for greatness
42mIntroduction to Elixir for Rubyists
32mElixir for the rubyist
26mseL4 and BEAM: A match made in Erlang
01h 07mInside memory management on the BEAM
