Re: Erlang JIT and loaded code
Lukas Larsson <[email protected]> Tue, 26 Apr 2022 10:05:06 +0200
| Newsgroups | gmane.comp.lang.erlang.general |
|---|---|
| Message-ID | <CAP3zBqPnGhwqNufk58LcoKybjZKkP9YbbLhWHTS3fNWVNqyURg@mail.gmail.com> |
--0000000000003edd8205dd8a277e Content-Type: text/plain; charset="UTF-8" On Tue, Apr 26, 2022 at 8:11 AM Leo Liu <[email protected]> wrote: > On 2022-04-25 11:13 +0200, Lukas Larsson wrote: > > It is stored in memory of the VM. You can get a file dump of the native > > code by passing `+JDdump true` when starting `erl`. There is no way to > get > > the loaded memory size of a single module, but you can get a relatively > > close value by checking what `erlang:memory(code)` returns before and > after > > the module is loaded. > > +JDdump true is useful but last time I tried it it dumped asm for all > modules in current directory. Has there been any improvements? Thanks. > No, there has not been any improvements. One of the limiting factors here is that we must do the dump as the code is loaded, we cannot dump it after the fact. If you have any suggestions about what improvements we should make, please open an issue on github. > > Leo > > --0000000000003edd8205dd8a277e Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr"><div dir=3D"ltr"><br></div><br><div class=3D"gmail_quote">= <div dir=3D"ltr" class=3D"gmail_attr">On Tue, Apr 26, 2022 at 8:11 AM Leo L= iu <<a href=3D"mailto:[email protected]">[email protected]</a>> wrote= :<br></div><blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.= 8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On 2022-04-25 = 11:13 +0200, Lukas Larsson wrote:<br> > It is stored in memory of the VM. You can get a file dump of the nativ= e<br> > code by passing `+JDdump true` when starting `erl`. There is no way to= get<br> > the loaded memory size of a single module, but you can get a relativel= y<br> > close value by checking what `erlang:memory(code)` returns before and = after<br> > the module is loaded.<br> <br> +JDdump true is useful but last time I tried it it dumped asm for all<br> modules in current directory. Has there been any improvements? Thanks.<br><= /blockquote><div><br></div><div>No, there has not been any improvements. On= e of the limiting factors here is that we must do the dump as the code is l= oaded, we cannot dump it after the fact. If you have any suggestions about = what improvements we should make, please open an issue on github.</div><div= >=C2=A0</div><blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px = 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"> <br> Leo<br> <br> </blockquote></div></div> --0000000000003edd8205dd8a277e--