aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam/io.c
diff options
context:
space:
mode:
authorRickard Green <[email protected]>2018-03-23 14:12:52 +0100
committerRickard Green <[email protected]>2018-03-23 14:12:52 +0100
commit5c2acbd35150da5e6d3afba1f61bb8bb995bb80f (patch)
tree9250351fba7a64b5b1f9ff11fff7da8563ec3155 /erts/emulator/beam/io.c
parentbe2bdf8c8c0bd3d110277fcbe8dc3611163087cc (diff)
parent83a289d4dff156f2c7203843a1437256545f5580 (diff)
downloadotp-5c2acbd35150da5e6d3afba1f61bb8bb995bb80f.tar.gz
otp-5c2acbd35150da5e6d3afba1f61bb8bb995bb80f.tar.bz2
otp-5c2acbd35150da5e6d3afba1f61bb8bb995bb80f.zip
Merge branch 'rickard/signals/OTP-14589'
* rickard/signals/OTP-14589: Fix VM probes compilation Fix lock counting Fix signal order for is_process_alive Fix signal handling priority elevation
Diffstat (limited to 'erts/emulator/beam/io.c')
-rw-r--r--erts/emulator/beam/io.c27
1 files changed, 15 insertions, 12 deletions
diff --git a/erts/emulator/beam/io.c b/erts/emulator/beam/io.c
index b2afdc6bf2..9f87285b71 100644
--- a/erts/emulator/beam/io.c
+++ b/erts/emulator/beam/io.c
@@ -2361,6 +2361,21 @@ set_port_connected(int bang_op,
trace_port(prt, am_getting_linked, connect);
}
+#ifdef USE_VM_PROBES
+ if (DTRACE_ENABLED(port_connect)) {
+ Eterm old_connected = ERTS_PORT_GET_CONNECTED(prt);
+ DTRACE_CHARBUF(process_str, DTRACE_TERM_BUF_SIZE);
+ DTRACE_CHARBUF(port_str, DTRACE_TERM_BUF_SIZE);
+ DTRACE_CHARBUF(newprocess_str, DTRACE_TERM_BUF_SIZE);
+
+ dtrace_pid_str(old_connected, process_str);
+ erts_snprintf(port_str, sizeof(DTRACE_CHARBUF_NAME(port_str)),
+ "%T", prt->common.id);
+ dtrace_pid_str(connect, newprocess_str);
+ DTRACE4(port_connect, process_str, port_str, prt->name, newprocess_str);
+ }
+#endif
+
ERTS_PORT_SET_CONNECTED(prt, connect);
if (IS_TRACED_FL(prt, F_TRACE_RECEIVE))
@@ -2370,18 +2385,6 @@ set_port_connected(int bang_op,
trace_port_send(prt, from, TUPLE2(hp, prt->common.id, am_connected), 1);
}
-#ifdef USE_VM_PROBES
- if (DTRACE_ENABLED(port_connect)) {
- DTRACE_CHARBUF(process_str, DTRACE_TERM_BUF_SIZE);
- DTRACE_CHARBUF(port_str, DTRACE_TERM_BUF_SIZE);
- DTRACE_CHARBUF(newprocess_str, DTRACE_TERM_BUF_SIZE);
-
- dtrace_pid_str(connect, process_str);
- erts_snprintf(port_str, sizeof(DTRACE_CHARBUF_NAME(port_str)), "%T", prt->common.id);
- dtrace_proc_str(rp, newprocess_str);
- DTRACE4(port_connect, process_str, port_str, prt->name, newprocess_str);
- }
-#endif
}
return ERTS_PORT_OP_DONE;