[Proposal] Trace functions when they are inlined

40 views
Skip to first unread message

Mitchell Hanberg

unread,
Sep 10, 2023, 7:55:34 PM9/10/23
to elixir-lang-core
Currently, by the time *_function and *_macro traces are emitted, I believe that inlined functions have already been inlined.

For example, if you call `Atom.to_string/1`, the `:remote_function` tracer will be emitted for `:erlang.atom_to_binary/1`.

My end goal is to know where references to inlined functions are in the code, and the least intrusive way to accomplish that I think would be emitting a `:inlined_function` (name subject to bikeshed) that includes some similar metadata to the `*_function` traces.

Let me know what you think, and please correct me if this is already possible and I just totally missed something in the docs.

Thank you,
Mitch

José Valim

unread,
Sep 12, 2023, 9:07:56 AM9/12/23
to elixir-l...@googlegroups.com
This is a bug. We should emit the trace before they are inlined. Can you please do a bug report?

--
You received this message because you are subscribed to the Google Groups "elixir-lang-core" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elixir-lang-co...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elixir-lang-core/c3175efa-6e88-41ba-b2eb-d91d18f453b8n%40googlegroups.com.

Mitchell Hanberg

unread,
Sep 12, 2023, 9:09:56 AM9/12/23
to elixir-lang-core
I will after work today, thank you José!

- Mitch
Reply all
Reply to author
Forward
0 new messages