[erlang-questions] Beams dependency tool
Robert Raschke
rtrlists@REDACTED
Tue Apr 21 15:56:13 CEST 2009
On Tue, Apr 21, 2009 at 1:58 PM, Maxim Treskin <zerthurd@REDACTED> wrote:
> Hello
>
> How I can get list of beams which used by my application?
> I need smallest system to deploy on embedded hardware (ARM) and do not want to
> take unused beams. I know that there may be implicit module usage, like
>
> Mod = list_to_atom("somemodule"),
> Mod:somefun()
>
> but it is not big problem.
> So, is there any tool for this? May be some actions with dialyzer?
>
> Thank you
>
> --
> Maxim Treskin
The low tech approach would be to use the function code:all_loaded()
to give you a list of all the beams that have been loaded. If you
start erl in interactive mode (see Section 1.4 of
http://www.erlang.org/doc/system_principles/part_frame.html) and make
sure your app is fully running (has touched all the functions it'll
ever use, which might be tricky in practice) then code:all_loaded()
should give you all the beams that are actually used.
Robby
More information about the erlang-questions
mailing list