aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam/erl_trace.c
diff options
context:
space:
mode:
authorSverker Eriksson <[email protected]>2016-03-31 21:20:24 +0200
committerSverker Eriksson <[email protected]>2016-05-04 19:53:37 +0200
commitda75310ce8973221ac90fd34f6375bfc17ae751b (patch)
tree8992cfaadf83c44810d7dc64aaeb876dd9b8940c /erts/emulator/beam/erl_trace.c
parent9627711cc39fd311a573a172e6d0e8a6b55dbd17 (diff)
downloadotp-da75310ce8973221ac90fd34f6375bfc17ae751b.tar.gz
otp-da75310ce8973221ac90fd34f6375bfc17ae751b.tar.bz2
otp-da75310ce8973221ac90fd34f6375bfc17ae751b.zip
erts: Change receive matchspec to [NodeOrOther, Pid, Msg]
Diffstat (limited to 'erts/emulator/beam/erl_trace.c')
-rw-r--r--erts/emulator/beam/erl_trace.c17
1 files changed, 13 insertions, 4 deletions
diff --git a/erts/emulator/beam/erl_trace.c b/erts/emulator/beam/erl_trace.c
index 682f08f667..be0d2f0939 100644
--- a/erts/emulator/beam/erl_trace.c
+++ b/erts/emulator/beam/erl_trace.c
@@ -871,14 +871,23 @@ trace_receive(Process* receiver,
if (!te->on)
return;
}
+ else ASSERT(te->on);
if (te->match_spec) {
- Eterm args[2];
+ Eterm args[3];
Uint32 return_flags;
- args[0] = from;
- args[1] = msg;
+ if (is_pid(from)) {
+ args[0] = pid_node_name(from);
+ args[1] = from;
+ }
+ else {
+ ASSERT(is_atom(from));
+ args[0] = from; /* node name or other atom (e.g 'system') */
+ args[1] = am_undefined;
+ }
+ args[2] = msg;
pam_result = erts_match_set_run(NULL, receiver,
- te->match_spec, args, 2,
+ te->match_spec, args, 3,
ERTS_PAM_TMP_RESULT, &return_flags);
if (is_non_value(pam_result)
|| pam_result == am_false