dbg suspend of traced process

Lukas Larsson lukas@REDACTED
Mon Jun 15 10:16:43 CEST 2020

On Fri, Jun 12, 2020 at 11:07 PM Peti Gömöri <gomoripeti@REDACTED> wrote:

> Hi,


I noticed that dbg suspends the traced process, when it receives a
> function-called trace from it.
> https://github.com/erlang/otp/blob/master/lib/runtime_tools/src/dbg.erl#L875
> I kind of feel what could have been the original intent behind this, but
> isn't this something, similar to sender punishment for long message queues,
> that was more relevant in non-SMP mode, and could be removed?
> Even so, as it only happens for "trace" messages, and not when timestamp
> is enabled ("trace_ts"), which sounds like an accidental asymmetry.
> I am curious what are the details and history behind this selective
> suspend?

I don't remember exactly why, but I do believe that you are correct that is
a mechanism that is no longer useful when running in an SMP system. In
fact, this pr https://github.com/erlang/otp/pull/2475, which I worked on a
while ago, removes that backpressure mechanism and instead uses the
logger_olp module.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20200615/a4707c04/attachment.htm>

More information about the erlang-questions mailing list