[erlang-questions] beginner: Help needed - Erts overview and map to subsystem to source
Mon Nov 19 08:23:48 CET 2007
G Bulmer <> writes:
> Can someone point me at any documents which describes the internal
> architecture of erts? Ideally it would help me navigate the code too.
> For example is there a document which gives an overview of erts
> subsystems? (ideally also a "table of contents" mapping the
> subsystems to the files which contain the corresponding code, but if
> the names are consistent, I can use grep.)
As far as I know, there are no such documents. (Though some architectual
overviews can be found in some the papers from the HiPE group.)
> I guess I need to find the code for the garbage collector, erts
> function tracing (which I would try to use for the DTrace function
> call probes), the scheduler, and the module loader/unloader. I'll
> also need to discover approximately how they work !-)
Very brief overview:
The garbage collector is in erl_gc.c in R12B (ggc.c in R11B; that file
is gone in R12B).
(Local) call trace works by replacing the first instruction in function
with a breakpoint instruction. The breakpoint instruction is called
"call_traced_function" in beam_emu.c. Most of the other code for tracing
is in erl_trace.c and erl_bif_trace.c. (beam_emu.c contains the
virtual machine for BEAM.)
The scheduler is in the function schedule() in erl_process.c.
The loader is in beam_bif_load.c (the loader BIFs) and beam_load.c
(the bulk of the code).
Björn Gustavsson, Erlang/OTP, Ericsson AB
More information about the erlang-questions