[erlang-questions] signal arrival time

Scott Lystig Fritchie fritchie@REDACTED
Mon May 7 22:07:56 CEST 2012


Ulf Wiger <ulf@REDACTED> wrote:

uw> Another way to do it is to use DTrace (not yet officially supported)

Hrm, perhaps it's "officially experimental"?  :-)

As of the R15B01 release, using "./configure --enable-vm-probes
--with-dynamic-trace=dtrace [... other configure options" will create a
VM that's instrumented to be able to fire probes on the following
events:

    probe message__send(char *sender, char *receiver, uint32_t size,
                        int token_label, int token_previous, int token_current);
    probe message__send__remote(char *sender, char *node_name, char *receiver,
                                uint32_t size,
                        int token_label, int token_previous, int token_current);
    probe message__queued(char *receiver, uint32_t size, uint32_t queue_len,
                        int token_label, int token_previous, int token_current);
    probe message__receive(char *receiver, uint32_t size, uint32_t queue_len,
                        int token_label, int token_previous, int token_current);

See the comments in erts/emulator/beam/erlang_dtrace.d for more
information on what each of those probes do.  It's worth noting that
none of these probes allow you to peek inside the message to see what it
looks like.

The message-queued probe is the one that Joszef is looking for.  I'm not
convinced that all possible queueing scenarios are actually covered by
probes: there are SMP-related code paths that are obscured by #ifdef
statements and remote-node-messaging-related paths that perhaps I missed
entirely.  As far as I know, the DTrace patches have only been reviewed
for bugginess, *not* thoroughness/correctness.

-Scott



More information about the erlang-questions mailing list