aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam
diff options
context:
space:
mode:
authorPatrik Nyblom <pan@erlang.org>2012-03-02 18:41:17 +0100
committerPatrik Nyblom <pan@erlang.org>2012-03-22 18:16:14 +0100
commitcca350ef2206a81c0f8969071f412f07b87413a1 (patch)
tree1e6a1f5a07940a3e3d39ef7b4d6a7b8010002e06 /erts/emulator/beam
parentc15f94e7922040b63f3abf8680cd77d5548fecf3 (diff)
downloadotp-cca350ef2206a81c0f8969071f412f07b87413a1.tar.gz
otp-cca350ef2206a81c0f8969071f412f07b87413a1.tar.bz2
otp-cca350ef2206a81c0f8969071f412f07b87413a1.zip
Change to more specific configure options for dtrace
Diffstat (limited to 'erts/emulator/beam')
-rw-r--r--erts/emulator/beam/beam_emu.c35
-rw-r--r--erts/emulator/beam/bif.c60
-rw-r--r--erts/emulator/beam/dist.c10
-rw-r--r--erts/emulator/beam/dtrace-wrapper.h6
-rw-r--r--erts/emulator/beam/erl_alloc.c2
-rw-r--r--erts/emulator/beam/erl_bif_ddll.c2
-rw-r--r--erts/emulator/beam/erl_bif_info.c2
-rw-r--r--erts/emulator/beam/erl_bif_timer.c2
-rw-r--r--erts/emulator/beam/erl_bif_trace.c12
-rw-r--r--erts/emulator/beam/erl_db_util.c4
-rw-r--r--erts/emulator/beam/erl_gc.c6
-rw-r--r--erts/emulator/beam/erl_lock_check.c2
-rw-r--r--erts/emulator/beam/erl_message.c70
-rw-r--r--erts/emulator/beam/erl_message.h6
-rw-r--r--erts/emulator/beam/erl_nif.c2
-rw-r--r--erts/emulator/beam/erl_process.c12
-rw-r--r--erts/emulator/beam/erl_process.h4
-rw-r--r--erts/emulator/beam/erl_trace.c16
-rw-r--r--erts/emulator/beam/io.c10
-rw-r--r--erts/emulator/beam/utils.c2
20 files changed, 148 insertions, 117 deletions
diff --git a/erts/emulator/beam/beam_emu.c b/erts/emulator/beam/beam_emu.c
index deeb7357d6..763d15e101 100644
--- a/erts/emulator/beam/beam_emu.c
+++ b/erts/emulator/beam/beam_emu.c
@@ -1051,7 +1051,7 @@ init_emulator(void)
# define REG_tmp_arg2
#endif
-#ifdef HAVE_DTRACE
+#ifdef USE_VM_PROBES
#define DTRACE_CALL(p, m, f, a) \
if (DTRACE_ENABLED(function_entry)) { \
@@ -1111,7 +1111,7 @@ init_emulator(void)
DTRACE2(nif_return, process_name, mfa); \
}
-#else /* HAVE_DTRACE */
+#else /* USE_VM_PROBES */
#define DTRACE_CALL(p, m, f, a) do {} while (0)
#define DTRACE_RETURN(p, m, f, a) do {} while (0)
@@ -1120,7 +1120,7 @@ init_emulator(void)
#define DTRACE_NIF_ENTRY(p, m, f, a) do {} while (0)
#define DTRACE_NIF_RETURN(p, m, f, a) do {} while (0)
-#endif /* HAVE_DTRACE */
+#endif /* USE_VM_PROBES */
void
dtrace_drvport_str(ErlDrvPort drvport, char *port_buf)
@@ -1892,34 +1892,49 @@ void process_main(void)
save_calls(c_p, &exp_receive);
}
if (ERL_MESSAGE_TOKEN(msgp) == NIL) {
-#ifdef HAVE_DTRACE
+#ifdef USE_VM_PROBES
if (DT_UTAG(c_p) != NIL) {
if (DT_UTAG_FLAGS(c_p) & DT_UTAG_PERMANENT) {
SEQ_TRACE_TOKEN(c_p) = am_have_dt_utag;
+#ifdef DTRACE_TAG_HARDDEBUG
if (DT_UTAG_FLAGS(c_p) & DT_UTAG_SPREADING)
- erts_fprintf(stderr,"XXX: PaN: Dtrace -> (%T) stop spreading tag %T with message %T\r\n",c_p->id,DT_UTAG(c_p),ERL_MESSAGE_TERM(msgp));
+ erts_fprintf(stderr,
+ "Dtrace -> (%T) stop spreading "
+ "tag %T with message %T\r\n",
+ c_p->id,DT_UTAG(c_p),ERL_MESSAGE_TERM(msgp));
+#endif
} else {
- erts_fprintf(stderr,"XXX: PaN: Dtrace -> (%T) kill tag %T with message %T\r\n",c_p->id,DT_UTAG(c_p),ERL_MESSAGE_TERM(msgp));
+#ifdef DTRACE_TAG_HARDDEBUG
+ erts_fprintf(stderr,
+ "Dtrace -> (%T) kill tag %T with "
+ "message %T\r\n",
+ c_p->id,DT_UTAG(c_p),ERL_MESSAGE_TERM(msgp));
+#endif
DT_UTAG(c_p) = NIL;
SEQ_TRACE_TOKEN(c_p) = NIL;
}
} else {
#endif
SEQ_TRACE_TOKEN(c_p) = NIL;
-#ifdef HAVE_DTRACE
+#ifdef USE_VM_PROBES
}
DT_UTAG_FLAGS(c_p) &= ~DT_UTAG_SPREADING;
#endif
} else if (ERL_MESSAGE_TOKEN(msgp) != am_undefined) {
Eterm msg;
SEQ_TRACE_TOKEN(c_p) = ERL_MESSAGE_TOKEN(msgp);
-#ifdef HAVE_DTRACE
+#ifdef USE_VM_PROBES
if (ERL_MESSAGE_TOKEN(msgp) == am_have_dt_utag) {
if (DT_UTAG(c_p) == NIL) {
DT_UTAG(c_p) = ERL_MESSAGE_DT_UTAG(msgp);
}
DT_UTAG_FLAGS(c_p) |= DT_UTAG_SPREADING;
- erts_fprintf(stderr,"XXX: PaN: Dtrace -> (%T) receive tag (%T) with message %T\r\n",c_p->id, DT_UTAG(c_p), ERL_MESSAGE_TERM(msgp));
+#ifdef DTRACE_TAG_HARDDEBUG
+ erts_fprintf(stderr,
+ "Dtrace -> (%T) receive tag (%T) "
+ "with message %T\r\n",
+ c_p->id, DT_UTAG(c_p), ERL_MESSAGE_TERM(msgp));
+#endif
} else {
#endif
ASSERT(is_tuple(SEQ_TRACE_TOKEN(c_p)));
@@ -1935,7 +1950,7 @@ void process_main(void)
msg = ERL_MESSAGE_TERM(msgp);
seq_trace_output(SEQ_TRACE_TOKEN(c_p), msg, SEQ_TRACE_RECEIVE,
c_p->id, c_p);
-#ifdef HAVE_DTRACE
+#ifdef USE_VM_PROBES
}
#endif
}
diff --git a/erts/emulator/beam/bif.c b/erts/emulator/beam/bif.c
index 6478e54996..2adc713959 100644
--- a/erts/emulator/beam/bif.c
+++ b/erts/emulator/beam/bif.c
@@ -564,7 +564,7 @@ erts_queue_monitor_message(Process *p,
tup = TUPLE5(hp, am_DOWN, ref_copy, type, item_copy, reason_copy);
erts_queue_message(p, p_locksp, bp, tup, NIL
-#ifdef HAVE_DTRACE
+#ifdef USE_VM_PROBES
, NIL
#endif
);
@@ -1949,7 +1949,7 @@ do_send(Process *p, Eterm to, Eterm msg, int suspend) {
save_calls(p, &exp_send);
if (SEQ_TRACE_TOKEN(p) != NIL
-#ifdef HAVE_DTRACE
+#ifdef USE_VM_PROBES
&& SEQ_TRACE_TOKEN(p) != am_have_dt_utag
#endif
) {
@@ -4234,7 +4234,7 @@ BIF_RETTYPE system_flag_2(BIF_ALIST_2)
for (i = 0; i < erts_max_processes; i++) {
if (process_tab[i] != (Process*) 0) {
Process* p = process_tab[i];
-#ifdef HAVE_DTRACE
+#ifdef USE_VM_PROBES
p->seq_trace_token = (p->dt_utag != NIL) ? am_have_dt_utag : NIL;
#else
p->seq_trace_token = NIL;
@@ -4244,7 +4244,7 @@ BIF_RETTYPE system_flag_2(BIF_ALIST_2)
ERTS_SMP_MSGQ_MV_INQ2PRIVQ(p);
mp = p->msg.first;
while(mp != NULL) {
-#ifdef HAVE_DTRACE
+#ifdef USE_VM_PROBES
ERL_MESSAGE_TOKEN(mp) = (ERL_MESSAGE_DT_UTAG(mp) != NIL) ? am_have_dt_utag : NIL;
#else
ERL_MESSAGE_TOKEN(mp) = NIL;
@@ -4649,7 +4649,7 @@ BIF_RETTYPE get_module_info_2(BIF_ALIST_2)
BIF_RETTYPE put_utag_1(BIF_ALIST_1)
{
-#ifdef HAVE_DTRACE
+#ifdef USE_VM_PROBES
Eterm otag;
if (BIF_ARG_1 == am_undefined) {
otag = (DT_UTAG(BIF_P) == NIL) ? am_undefined : DT_UTAG(BIF_P);
@@ -4677,7 +4677,7 @@ BIF_RETTYPE put_utag_1(BIF_ALIST_1)
BIF_RETTYPE get_utag_0(BIF_ALIST_0)
{
-#ifdef HAVE_DTRACE
+#ifdef USE_VM_PROBES
BIF_RET((DT_UTAG(BIF_P) == NIL || !(DT_UTAG_FLAGS(BIF_P) & DT_UTAG_PERMANENT)) ? am_undefined : DT_UTAG(BIF_P));
#else
BIF_RET(am_undefined);
@@ -4685,7 +4685,7 @@ BIF_RETTYPE get_utag_0(BIF_ALIST_0)
}
BIF_RETTYPE get_utag_data_0(BIF_ALIST_0)
{
-#ifdef HAVE_DTRACE
+#ifdef USE_VM_PROBES
BIF_RET((DT_UTAG(BIF_P) == NIL) ? am_undefined : DT_UTAG(BIF_P));
#else
BIF_RET(am_undefined);
@@ -4693,7 +4693,7 @@ BIF_RETTYPE get_utag_data_0(BIF_ALIST_0)
}
BIF_RETTYPE prepend_vm_utag_data_1(BIF_ALIST_1)
{
-#ifdef HAVE_DTRACE
+#ifdef USE_VM_PROBES
Eterm b;
Eterm *hp;
hp = HAlloc(BIF_P,2);
@@ -4720,7 +4720,7 @@ BIF_RETTYPE prepend_vm_utag_data_1(BIF_ALIST_1)
}
BIF_RETTYPE append_vm_utag_data_1(BIF_ALIST_1)
{
-#ifdef HAVE_DTRACE
+#ifdef USE_VM_PROBES
Eterm b;
Eterm *hp;
hp = HAlloc(BIF_P,2);
@@ -4747,23 +4747,31 @@ BIF_RETTYPE append_vm_utag_data_1(BIF_ALIST_1)
}
BIF_RETTYPE spread_utag_1(BIF_ALIST_1)
{
-#ifdef HAVE_DTRACE
+#ifdef USE_VM_PROBES
Eterm ret;
Eterm *hp;
#endif
if (BIF_ARG_1 != am_true && BIF_ARG_1 != am_false) {
BIF_ERROR(BIF_P,BADARG);
}
-#ifdef HAVE_DTRACE
+#ifdef USE_VM_PROBES
hp = HAlloc(BIF_P,3);
ret = TUPLE2(hp,make_small(DT_UTAG_FLAGS(BIF_P)),DT_UTAG(BIF_P));
if (DT_UTAG(BIF_P) != NIL) {
if (BIF_ARG_1 == am_true) {
DT_UTAG_FLAGS(BIF_P) |= DT_UTAG_SPREADING;
- erts_fprintf(stderr,"XXX: PaN: Dtrace -> (%T) start spreading tag %T\r\n",BIF_P->id,DT_UTAG(BIF_P));
+#ifdef DTRACE_TAG_HARDDEBUG
+ erts_fprintf(stderr,
+ "Dtrace -> (%T) start spreading tag %T\r\n",
+ BIF_P->id,DT_UTAG(BIF_P));
+#endif
} else {
DT_UTAG_FLAGS(BIF_P) &= ~DT_UTAG_SPREADING;
- erts_fprintf(stderr,"XXX: PaN: Dtrace -> (%T) stop spreading tag %T\r\n",BIF_P->id,DT_UTAG(BIF_P));
+#ifdef DTRACE_TAG_HARDDEBUG
+ erts_fprintf(stderr,
+ "Dtrace -> (%T) stop spreading tag %T\r\n",
+ BIF_P->id,DT_UTAG(BIF_P));
+#endif
}
}
BIF_RET(ret);
@@ -4773,7 +4781,7 @@ BIF_RETTYPE spread_utag_1(BIF_ALIST_1)
}
BIF_RETTYPE restore_utag_1(BIF_ALIST_1)
{
-#ifdef HAVE_DTRACE
+#ifdef USE_VM_PROBES
Eterm *tpl;
Uint x;
if (is_not_tuple(BIF_ARG_1)) {
@@ -4785,7 +4793,11 @@ BIF_RETTYPE restore_utag_1(BIF_ALIST_1)
}
if (tpl[2] == NIL) {
if (DT_UTAG(BIF_P) != NIL) {
- erts_fprintf(stderr,"XXX: PaN: Dtrace -> (%T) restore Killing tag!\r\n",BIF_P->id);
+#ifdef DTRACE_TAG_HARDDEBUG
+ erts_fprintf(stderr,
+ "Dtrace -> (%T) restore Killing tag!\r\n",
+ BIF_P->id);
+#endif
}
DT_UTAG(BIF_P) = NIL;
if (SEQ_TRACE_TOKEN(BIF_P) == am_have_dt_utag) {
@@ -4794,11 +4806,21 @@ BIF_RETTYPE restore_utag_1(BIF_ALIST_1)
DT_UTAG_FLAGS(BIF_P) = 0;
} else {
x = unsigned_val(tpl[1]) & (DT_UTAG_SPREADING | DT_UTAG_PERMANENT);
- if (!(x & DT_UTAG_SPREADING) && (DT_UTAG_FLAGS(BIF_P) & DT_UTAG_SPREADING)) {
- erts_fprintf(stderr,"XXX: PaN: Dtrace -> (%T) restore stop spreading tag %T\r\n",BIF_P->id,tpl[2]);
- } else if ((x & DT_UTAG_SPREADING) && !(DT_UTAG_FLAGS(BIF_P) & DT_UTAG_SPREADING)) {
- erts_fprintf(stderr,"XXX: PaN: Dtrace -> (%T) restore start spreading tag %T\r\n",BIF_P->id,tpl[2]);
+#ifdef DTRACE_TAG_HARDDEBUG
+
+ if (!(x & DT_UTAG_SPREADING) && (DT_UTAG_FLAGS(BIF_P) &
+ DT_UTAG_SPREADING)) {
+ erts_fprintf(stderr,
+ "Dtrace -> (%T) restore stop spreading "
+ "tag %T\r\n",
+ BIF_P->id, tpl[2]);
+ } else if ((x & DT_UTAG_SPREADING) &&
+ !(DT_UTAG_FLAGS(BIF_P) & DT_UTAG_SPREADING)) {
+ erts_fprintf(stderr,
+ "Dtrace -> (%T) restore start spreading "
+ "tag %T\r\n",BIF_P->id,tpl[2]);
}
+#endif
DT_UTAG_FLAGS(BIF_P) = x;
DT_UTAG(BIF_P) = tpl[2];
if (SEQ_TRACE_TOKEN(BIF_P) == NIL) {
diff --git a/erts/emulator/beam/dist.c b/erts/emulator/beam/dist.c
index 43fc910054..a44caa36db 100644
--- a/erts/emulator/beam/dist.c
+++ b/erts/emulator/beam/dist.c
@@ -383,7 +383,7 @@ static void doit_node_link_net_exits(ErtsLink *lnk, void *vnecp)
Eterm *hp = erts_alloc_message_heap(3,&bp,&ohp,rp,&rp_locks);
tup = TUPLE2(hp, am_nodedown, name);
erts_queue_message(rp, &rp_locks, bp, tup, NIL
-#ifdef HAVE_DTRACE
+#ifdef USE_VM_PROBES
, NIL
#endif
);
@@ -755,7 +755,7 @@ erts_dsig_send_msg(ErtsDSigData *dsdp, Eterm remote, Eterm message)
UseTmpHeapNoproc(5);
if (SEQ_TRACE_TOKEN(sender) != NIL
-#ifdef HAVE_DTRACE
+#ifdef USE_VM_PROBES
&& SEQ_TRACE_TOKEN(sender) != am_have_dt_utag
#endif
) {
@@ -808,7 +808,7 @@ erts_dsig_send_reg_msg(ErtsDSigData *dsdp, Eterm remote_name, Eterm message)
UseTmpHeapNoproc(6);
if (SEQ_TRACE_TOKEN(sender) != NIL
-#ifdef HAVE_DTRACE
+#ifdef USE_VM_PROBES
&& SEQ_TRACE_TOKEN(sender) != am_have_dt_utag
#endif
) {
@@ -864,7 +864,7 @@ erts_dsig_send_exit_tt(ErtsDSigData *dsdp, Eterm local, Eterm remote,
UseTmpHeapNoproc(6);
if (token != NIL
-#ifdef HAVE_DTRACE
+#ifdef USE_VM_PROBES
&& token != am_have_dt_utag
#endif
) {
@@ -3111,7 +3111,7 @@ send_nodes_mon_msg(Process *rp,
ASSERT(hend == hp);
erts_queue_message(rp, rp_locksp, bp, msg, NIL
-#ifdef HAVE_DTRACE
+#ifdef USE_VM_PROBES
, NIL
#endif
);
diff --git a/erts/emulator/beam/dtrace-wrapper.h b/erts/emulator/beam/dtrace-wrapper.h
index b633058e90..9d1e55fc43 100644
--- a/erts/emulator/beam/dtrace-wrapper.h
+++ b/erts/emulator/beam/dtrace-wrapper.h
@@ -42,7 +42,7 @@
#define DTRACE_CHARBUF(name, size) \
char name##_BUFFER[size], *name = name##_BUFFER
-#ifdef HAVE_DTRACE
+#if defined(USE_DYNAMIC_TRACE) && defined(USE_VM_PROBES)
#include "erlang_dtrace.h"
@@ -87,7 +87,7 @@
STAP_PROBE10(provider,probe,(parm1),(parm2),(parm3),(parm4),(parm5),(parm6),(parm7),(parm8),(parm9),(parm10))
#endif /* STAP_PROBE_ADDR */
-#else /* HAVE_DTRACE */
+#else /* USE_DYNAMIC_TRACE && USE_VM_PROBES */
/* Render all macros to do nothing */
#define DTRACE_ENABLED(name) 0
@@ -104,6 +104,6 @@
#define DTRACE11(name, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10) \
do {} while (0)
-#endif /* HAVE_DTRACE */
+#endif /* USE_DYNAMIC_TRACE && USE_VM_PROBES */
#endif /* __DTRACE_WRAPPER_H */
diff --git a/erts/emulator/beam/erl_alloc.c b/erts/emulator/beam/erl_alloc.c
index d575e30092..8130d5c576 100644
--- a/erts/emulator/beam/erl_alloc.c
+++ b/erts/emulator/beam/erl_alloc.c
@@ -3002,7 +3002,7 @@ reply_alloc_info(void *vair)
}
erts_queue_message(rp, &rp_locks, bp, msg, NIL
-#ifdef HAVE_DTRACE
+#ifdef USE_VM_PROBES
, NIL
#endif
);
diff --git a/erts/emulator/beam/erl_bif_ddll.c b/erts/emulator/beam/erl_bif_ddll.c
index b58c5ab761..bcfdacb91c 100644
--- a/erts/emulator/beam/erl_bif_ddll.c
+++ b/erts/emulator/beam/erl_bif_ddll.c
@@ -1763,7 +1763,7 @@ static void notify_proc(Process *proc, Eterm ref, Eterm driver_name, Eterm type,
mess = TUPLE5(hp,type,r,am_driver,driver_name,tag);
}
erts_queue_message(proc, &rp_locks, bp, mess, am_undefined
-#ifdef HAVE_DTRACE
+#ifdef USE_VM_PROBES
, NIL
#endif
);
diff --git a/erts/emulator/beam/erl_bif_info.c b/erts/emulator/beam/erl_bif_info.c
index 90bbb34927..618acc5117 100644
--- a/erts/emulator/beam/erl_bif_info.c
+++ b/erts/emulator/beam/erl_bif_info.c
@@ -115,7 +115,7 @@ static char erts_system_version[] = ("Erlang " ERLANG_OTP_RELEASE
#ifdef VALGRIND
" [valgrind-compiled]"
#endif
-#ifdef HAVE_DTRACE
+#ifdef USE_VM_PROBES
" [dtrace]"
#endif
"\n");
diff --git a/erts/emulator/beam/erl_bif_timer.c b/erts/emulator/beam/erl_bif_timer.c
index fbc2f08c09..0002f8374f 100644
--- a/erts/emulator/beam/erl_bif_timer.c
+++ b/erts/emulator/beam/erl_bif_timer.c
@@ -374,7 +374,7 @@ bif_timer_timeout(ErtsBifTimer* btm)
}
erts_queue_message(rp, &rp_locks, bp, message, NIL
-#ifdef HAVE_DTRACE
+#ifdef USE_VM_PROBES
, NIL
#endif
);
diff --git a/erts/emulator/beam/erl_bif_trace.c b/erts/emulator/beam/erl_bif_trace.c
index c518aa6866..1ef4b07c24 100644
--- a/erts/emulator/beam/erl_bif_trace.c
+++ b/erts/emulator/beam/erl_bif_trace.c
@@ -1744,13 +1744,13 @@ Eterm erts_seq_trace(Process *p, Eterm arg1, Eterm arg2,
return THE_NON_VALUE;
}
if (build_result) {
-#ifdef HAVE_DTRACE
+#ifdef USE_VM_PROBES
old_value = (SEQ_TRACE_TOKEN(p) == am_have_dt_utag) ? NIL : SEQ_TRACE_TOKEN(p);
#else
old_value = SEQ_TRACE_TOKEN(p);
#endif
}
-#ifdef HAVE_DTRACE
+#ifdef USE_VM_PROBES
SEQ_TRACE_TOKEN(p) = (DT_UTAG(p) != NIL) ? am_have_dt_utag : NIL;
#else
SEQ_TRACE_TOKEN(p) = NIL;
@@ -1768,7 +1768,7 @@ new_seq_trace_token(Process* p)
Eterm* hp;
if (SEQ_TRACE_TOKEN(p) == NIL
-#ifdef HAVE_DTRACE
+#ifdef USE_VM_PROBES
|| SEQ_TRACE_TOKEN(p) == am_have_dt_utag
#endif
) {
@@ -1792,7 +1792,7 @@ BIF_RETTYPE erl_seq_trace_info(Process *p, Eterm item)
}
if (SEQ_TRACE_TOKEN(p) == NIL
-#ifdef HAVE_DTRACE
+#ifdef USE_VM_PROBES
|| SEQ_TRACE_TOKEN(p) == am_have_dt_utag
#endif
) {
@@ -1853,7 +1853,7 @@ BIF_RETTYPE seq_trace_info_1(BIF_ALIST_1)
BIF_RETTYPE seq_trace_print_1(BIF_ALIST_1)
{
if (SEQ_TRACE_TOKEN(BIF_P) == NIL
-#ifdef HAVE_DTRACE
+#ifdef USE_VM_PROBES
|| SEQ_TRACE_TOKEN(BIF_P) == am_have_dt_utag
#endif
) {
@@ -1876,7 +1876,7 @@ BIF_RETTYPE seq_trace_print_1(BIF_ALIST_1)
BIF_RETTYPE seq_trace_print_2(BIF_ALIST_2)
{
if (SEQ_TRACE_TOKEN(BIF_P) == NIL
-#ifdef HAVE_DTRACE
+#ifdef USE_VM_PROBES
|| SEQ_TRACE_TOKEN(BIF_P) == am_have_dt_utag
#endif
) {
diff --git a/erts/emulator/beam/erl_db_util.c b/erts/emulator/beam/erl_db_util.c
index eb05ceaaf1..be345e7c9b 100644
--- a/erts/emulator/beam/erl_db_util.c
+++ b/erts/emulator/beam/erl_db_util.c
@@ -2204,7 +2204,7 @@ restart:
break;
case matchIsSeqTrace:
if (SEQ_TRACE_TOKEN(c_p) != NIL
-#ifdef HAVE_DTRACE
+#ifdef USE_VM_PROBES
&& SEQ_TRACE_TOKEN(c_p) != am_have_dt_utag
#endif
)
@@ -2232,7 +2232,7 @@ restart:
break;
case matchGetSeqToken:
if (SEQ_TRACE_TOKEN(c_p) == NIL
-#ifdef HAVE_DTRACE
+#ifdef USE_VM_PROBES
|| SEQ_TRACE_TOKEN(c_p) == am_have_dt_utag
#endif
)
diff --git a/erts/emulator/beam/erl_gc.c b/erts/emulator/beam/erl_gc.c
index 6dfccfe52f..2e340a7ef1 100644
--- a/erts/emulator/beam/erl_gc.c
+++ b/erts/emulator/beam/erl_gc.c
@@ -1935,7 +1935,7 @@ setup_rootset(Process *p, Eterm *objv, int nobj, Rootset *rootset)
roots[n].sz = 1;
n++;
}
-#ifdef HAVE_DTRACE
+#ifdef USE_VM_PROBES
if (is_not_immed(p->dt_utag)) {
roots[n].v = &p->dt_utag;
roots[n].sz = 1;
@@ -2478,7 +2478,7 @@ offset_mqueue(Process *p, Sint offs, char* area, Uint area_size)
if (is_boxed(mesg) && in_area(ptr_val(mesg), area, area_size)) {
ERL_MESSAGE_TOKEN(mp) = offset_ptr(mesg, offs);
}
-#ifdef HAVE_DTRACE
+#ifdef USE_VM_PROBES
mesg = ERL_MESSAGE_DT_UTAG(mp);
if (is_boxed(mesg) && in_area(ptr_val(mesg), area, area_size)) {
ERL_MESSAGE_DT_UTAG(mp) = offset_ptr(mesg, offs);
@@ -2504,7 +2504,7 @@ offset_one_rootset(Process *p, Sint offs, char* area, Uint area_size,
offset_heap_ptr(&p->fvalue, 1, offs, area, area_size);
offset_heap_ptr(&p->ftrace, 1, offs, area, area_size);
offset_heap_ptr(&p->seq_trace_token, 1, offs, area, area_size);
-#ifdef HAVE_DTRACE
+#ifdef USE_VM_PROBES
offset_heap_ptr(&p->dt_utag, 1, offs, area, area_size);
#endif
offset_heap_ptr(&p->group_leader, 1, offs, area, area_size);
diff --git a/erts/emulator/beam/erl_lock_check.c b/erts/emulator/beam/erl_lock_check.c
index 561570c30e..5eb2a69242 100644
--- a/erts/emulator/beam/erl_lock_check.c
+++ b/erts/emulator/beam/erl_lock_check.c
@@ -183,7 +183,7 @@ static erts_lc_lock_order_t erts_lock_order[] = {
{ "save_ops_lock", NULL },
#endif
#endif
-#ifdef HAVE_DTRACE
+#ifdef USE_VM_PROBES
{ "efile_drv dtrace mutex", NULL },
#endif
{ "mtrace_buf", NULL },
diff --git a/erts/emulator/beam/erl_message.c b/erts/emulator/beam/erl_message.c
index dc59b9c2c4..5d4dcaef6d 100644
--- a/erts/emulator/beam/erl_message.c
+++ b/erts/emulator/beam/erl_message.c
@@ -394,7 +394,7 @@ erts_queue_dist_message(Process *rcvr,
tok_label, tok_lastcnt, tok_serial);
}
erts_queue_message(rcvr, rcvr_locks, mbuf, msg, token
-#ifdef HAVE_DTRACE
+#ifdef USE_VM_PROBES
, NIL
#endif
);
@@ -403,14 +403,14 @@ erts_queue_dist_message(Process *rcvr,
/* Enqueue message on external format */
ERL_MESSAGE_TERM(mp) = THE_NON_VALUE;
-#ifdef HAVE_DTRACE
+#ifdef USE_VM_PROBES
ERL_MESSAGE_DT_UTAG(mp) = NIL;
if (token == am_have_dt_utag) {
ERL_MESSAGE_TOKEN(mp) = NIL;
} else {
#endif
ERL_MESSAGE_TOKEN(mp) = token;
-#ifdef HAVE_DTRACE
+#ifdef USE_VM_PROBES
}
#endif
mp->next = NULL;
@@ -445,7 +445,7 @@ erts_queue_message(Process* receiver,
ErlHeapFragment* bp,
Eterm message,
Eterm seq_trace_token
-#ifdef HAVE_DTRACE
+#ifdef USE_VM_PROBES
, Eterm dt_utag
#endif
)
@@ -489,7 +489,7 @@ erts_queue_message(Process* receiver,
ERL_MESSAGE_TERM(mp) = message;
ERL_MESSAGE_TOKEN(mp) = seq_trace_token;
-#ifdef HAVE_DTRACE
+#ifdef USE_VM_PROBES
ERL_MESSAGE_DT_UTAG(mp) = dt_utag;
#endif
mp->next = NULL;
@@ -567,7 +567,7 @@ erts_move_msg_mbuf_to_heap(Eterm** hpp, ErlOffHeap* off_heap, ErlMessage *msg)
Sint offs;
Uint sz;
ErlHeapFragment *bp;
-#ifdef HAVE_DTRACE
+#ifdef USE_VM_PROBES
Eterm utag;
#endif
@@ -579,7 +579,7 @@ erts_move_msg_mbuf_to_heap(Eterm** hpp, ErlOffHeap* off_heap, ErlMessage *msg)
ErlHeapFragment *dbg_bp;
Uint *dbg_hp, *dbg_thp_start;
Uint dbg_term_sz, dbg_token_sz;
-#ifdef HAVE_DTRACE
+#ifdef USE_VM_PROBES
Eterm dbg_utag;
Uint dbg_utag_sz;
#endif
@@ -588,11 +588,11 @@ erts_move_msg_mbuf_to_heap(Eterm** hpp, ErlOffHeap* off_heap, ErlMessage *msg)
bp = msg->data.heap_frag;
term = ERL_MESSAGE_TERM(msg);
token = ERL_MESSAGE_TOKEN(msg);
-#ifdef HAVE_DTRACE
+#ifdef USE_VM_PROBES
utag = ERL_MESSAGE_DT_UTAG(msg);
#endif
if (!bp) {
-#ifdef HAVE_DTRACE
+#ifdef USE_VM_PROBES
ASSERT(is_immed(term) && is_immed(token) && is_immed(utag));
#else
ASSERT(is_immed(term) && is_immed(token));
@@ -604,7 +604,7 @@ erts_move_msg_mbuf_to_heap(Eterm** hpp, ErlOffHeap* off_heap, ErlMessage *msg)
dbg_term_sz = size_object(term);
dbg_token_sz = size_object(token);
dbg_bp = new_message_buffer(dbg_term_sz + dbg_token_sz);
-#ifdef HAVE_DTRACE
+#ifdef USE_VM_PROBES
dbg_utag_sz = size_object(utag);
dbg_bp = new_message_buffer(dbg_term_sz + dbg_token_sz + dbg_utag_sz );
#endif
@@ -615,7 +615,7 @@ erts_move_msg_mbuf_to_heap(Eterm** hpp, ErlOffHeap* off_heap, ErlMessage *msg)
dbg_hp = dbg_bp->mem;
dbg_term = copy_struct(term, dbg_term_sz, &dbg_hp, &dbg_bp->off_heap);
dbg_token = copy_struct(token, dbg_token_sz, &dbg_hp, &dbg_bp->off_heap);
-#ifdef HAVE_DTRACE
+#ifdef USE_VM_PROBES
dbg_utag = copy_struct(utag, dbg_utag_sz, &dbg_hp, &dbg_bp->off_heap);
#endif
dbg_thp_start = *hpp;
@@ -623,7 +623,7 @@ erts_move_msg_mbuf_to_heap(Eterm** hpp, ErlOffHeap* off_heap, ErlMessage *msg)
if (bp->next != NULL) {
move_multi_frags(hpp, off_heap, bp, msg->m,
-#ifdef HAVE_DTRACE
+#ifdef USE_VM_PROBES
3
#else
2
@@ -730,7 +730,7 @@ erts_move_msg_mbuf_to_heap(Eterm** hpp, ErlOffHeap* off_heap, ErlMessage *msg)
ASSERT(hp > ptr_val(ERL_MESSAGE_TERM(msg)));
#endif
}
-#ifdef HAVE_DTRACE
+#ifdef USE_VM_PROBES
if (is_not_immed(utag)) {
ASSERT(in_heapfrag(ptr_val(utag), bp));
ERL_MESSAGE_DT_UTAG(msg) = offset_ptr(utag, offs);
@@ -806,7 +806,7 @@ copy_done:
#ifdef HARD_DEBUG
ASSERT(eq(ERL_MESSAGE_TERM(msg), dbg_term));
ASSERT(eq(ERL_MESSAGE_TOKEN(msg), dbg_token));
-#ifdef HAVE_DTRACE
+#ifdef USE_VM_PROBES
ASSERT(eq(ERL_MESSAGE_DT_UTAG(msg), dbg_utag));
#endif
free_message_buffer(dbg_bp);
@@ -903,7 +903,7 @@ erts_send_message(Process* sender,
Eterm* hp;
Eterm stoken = SEQ_TRACE_TOKEN(sender);
Uint seq_trace_size = 0;
-#ifdef HAVE_DTRACE
+#ifdef USE_VM_PROBES
Uint dt_utag_size = 0;
Eterm utag = NIL;
#endif
@@ -912,7 +912,7 @@ erts_send_message(Process* sender,
msize = size_object(message);
BM_SWAP_TIMER(size,send);
-#ifdef HAVE_DTRACE
+#ifdef USE_VM_PROBES
if (stoken != am_have_dt_utag) {
#endif
@@ -920,7 +920,7 @@ erts_send_message(Process* sender,
seq_trace_output(stoken, message, SEQ_TRACE_SEND,
receiver->id, sender);
seq_trace_size = 6; /* TUPLE5 */
-#ifdef HAVE_DTRACE
+#ifdef USE_VM_PROBES
}
if (DT_UTAG_FLAGS(sender) & DT_UTAG_SPREADING) {
dt_utag_size = size_object(DT_UTAG(sender));
@@ -930,7 +930,7 @@ erts_send_message(Process* sender,
#endif
bp = new_message_buffer(msize + seq_trace_size
-#ifdef HAVE_DTRACE
+#ifdef USE_VM_PROBES
+ dt_utag_size
#endif
);
@@ -943,21 +943,15 @@ erts_send_message(Process* sender,
&bp->off_heap);
message = copy_struct(message, msize, &hp, &bp->off_heap);
-#ifdef HAVE_DTRACE
+#ifdef USE_VM_PROBES
if (DT_UTAG_FLAGS(sender) & DT_UTAG_SPREADING) {
utag = copy_struct(DT_UTAG(sender), dt_utag_size, &hp, &bp->off_heap);
- erts_fprintf(stderr,"XXX: PaN: Dtrace -> (%T) Spreading tag (%T) with message %T!\r\n",sender->id, utag, message);
- }
-#if 0
- DT_UTAG_FLAGS(sender) &= ~DT_UTAG_SPREADING;
- if (!(DT_UTAG_FLAGS(sender) & DT_UTAG_PERMANENT)) {
- erts_fprintf(stderr,"XXX: PaN: Dtrace -> (%T) Killing tag!\r\n",sender->id);
- DT_UTAG(sender) = NIL;
- if (SEQ_TRACE_TOKEN(sender) == am_have_dt_utag) {
- SEQ_TRACE_TOKEN(sender) = NIL;
- }
- }
+#ifdef DTRACE_TAG_HARDDEBUG
+ erts_fprintf(stderr,
+ "Dtrace -> (%T) Spreading tag (%T) with "
+ "message %T!\r\n",sender->id, utag, message);
#endif
+ }
#endif
BM_MESSAGE_COPIED(msize);
BM_SWAP_TIMER(copy,send);
@@ -976,7 +970,7 @@ erts_send_message(Process* sender,
bp,
message,
token
-#ifdef HAVE_DTRACE
+#ifdef USE_VM_PROBES
, utag
#endif
);
@@ -1012,7 +1006,7 @@ erts_send_message(Process* sender,
size_object(message)msize, tok_label, tok_lastcnt, tok_serial);
ERL_MESSAGE_TERM(mp) = message;
ERL_MESSAGE_TOKEN(mp) = NIL;
-#ifdef HAVE_DTRACE
+#ifdef USE_VM_PROBES
ERL_MESSAGE_DT_UTAG(mp) = NIL;
#endif
mp->next = NULL;
@@ -1057,7 +1051,7 @@ erts_send_message(Process* sender,
mp->data.attached = NULL;
ERL_MESSAGE_TERM(mp) = message;
ERL_MESSAGE_TOKEN(mp) = NIL;
-#ifdef HAVE_DTRACE
+#ifdef USE_VM_PROBES
ERL_MESSAGE_DT_UTAG(mp) = NIL;
#endif
mp->next = NULL;
@@ -1094,7 +1088,7 @@ erts_send_message(Process* sender,
DTRACE6(message_send, sender_name, receiver_name,
msize, tok_label, tok_lastcnt, tok_serial);
erts_queue_message(receiver, receiver_locks, bp, message, token
-#ifdef HAVE_DTRACE
+#ifdef USE_VM_PROBES
, NIL
#endif
);
@@ -1121,7 +1115,7 @@ erts_send_message(Process* sender,
(uint32_t)msize, tok_label, tok_lastcnt, tok_serial);
ERL_MESSAGE_TERM(mp) = message;
ERL_MESSAGE_TOKEN(mp) = NIL;
-#ifdef HAVE_DTRACE
+#ifdef USE_VM_PROBES
ERL_MESSAGE_DT_UTAG(mp) = NIL;
#endif
mp->next = NULL;
@@ -1163,7 +1157,7 @@ erts_deliver_exit_message(Eterm from, Process *to, ErtsProcLocks *to_locksp,
ErlHeapFragment* bp = NULL;
if (token != NIL
-#ifdef HAVE_DTRACE
+#ifdef USE_VM_PROBES
&& token != am_have_dt_utag
#endif
) {
@@ -1182,7 +1176,7 @@ erts_deliver_exit_message(Eterm from, Process *to, ErtsProcLocks *to_locksp,
seq_trace_output(token, save, SEQ_TRACE_SEND, to->id, NULL);
temptoken = copy_struct(token, sz_token, &hp, &bp->off_heap);
erts_queue_message(to, to_locksp, bp, save, temptoken
-#ifdef HAVE_DTRACE
+#ifdef USE_VM_PROBES
, NIL
#endif
);
@@ -1203,7 +1197,7 @@ erts_deliver_exit_message(Eterm from, Process *to, ErtsProcLocks *to_locksp,
: copy_struct(from, sz_from, &hp, ohp));
save = TUPLE3(hp, am_EXIT, from_copy, mess);
erts_queue_message(to, to_locksp, bp, save, NIL
-#ifdef HAVE_DTRACE
+#ifdef USE_VM_PROBES
, NIL
#endif
);
diff --git a/erts/emulator/beam/erl_message.h b/erts/emulator/beam/erl_message.h
index 98321dd2c6..7678c7c753 100644
--- a/erts/emulator/beam/erl_message.h
+++ b/erts/emulator/beam/erl_message.h
@@ -70,7 +70,7 @@ typedef struct erl_mesg {
ErlHeapFragment *heap_frag;
void *attached;
} data;
-#ifdef HAVE_DTRACE
+#ifdef USE_VM_PROBES
Eterm m[3]; /* m[0] = message, m[1] = seq trace token, m[3] = dynamic trace user tag */
#else
Eterm m[2]; /* m[0] = message, m[1] = seq trace token */
@@ -79,7 +79,7 @@ typedef struct erl_mesg {
#define ERL_MESSAGE_TERM(mp) ((mp)->m[0])
#define ERL_MESSAGE_TOKEN(mp) ((mp)->m[1])
-#ifdef HAVE_DTRACE
+#ifdef USE_VM_PROBES
#define ERL_MESSAGE_DT_UTAG(mp) ((mp)->m[2])
#endif
@@ -229,7 +229,7 @@ ErlHeapFragment* erts_resize_message_buffer(ErlHeapFragment *, Uint,
void free_message_buffer(ErlHeapFragment *);
void erts_queue_dist_message(Process*, ErtsProcLocks*, ErtsDistExternal *, Eterm);
void erts_queue_message(Process*, ErtsProcLocks*, ErlHeapFragment*, Eterm, Eterm
-#ifdef HAVE_DTRACE
+#ifdef USE_VM_PROBES
, Eterm dt_utag
#endif
);
diff --git a/erts/emulator/beam/erl_nif.c b/erts/emulator/beam/erl_nif.c
index ebc771b016..156783d057 100644
--- a/erts/emulator/beam/erl_nif.c
+++ b/erts/emulator/beam/erl_nif.c
@@ -352,7 +352,7 @@ int enif_send(ErlNifEnv* env, const ErlNifPid* to_pid,
flush_env(env); /* Needed for ERTS_HOLE_CHECK */
}
erts_queue_message(rp, &rp_locks, frags, msg, am_undefined
-#ifdef HAVE_DTRACE
+#ifdef USE_VM_PROBES
, NIL
#endif
);
diff --git a/erts/emulator/beam/erl_process.c b/erts/emulator/beam/erl_process.c
index 6771e00c7e..f678d4159d 100644
--- a/erts/emulator/beam/erl_process.c
+++ b/erts/emulator/beam/erl_process.c
@@ -680,7 +680,7 @@ reply_sched_wall_time(void *vswtrp)
}
erts_queue_message(rp, &rp_locks, bp, msg, NIL
-#ifdef HAVE_DTRACE
+#ifdef USE_VM_PROBES
, NIL
#endif
);
@@ -7264,7 +7264,7 @@ erl_create_process(Process* parent, /* Parent of process (default group leader).
p->seq_trace_lastcnt = 0;
p->seq_trace_clock = 0;
SEQ_TRACE_TOKEN(p) = NIL;
-#ifdef HAVE_DTRACE
+#ifdef USE_VM_PROBES
DT_UTAG(p) = NIL;
DT_UTAG_FLAGS(p) = 0;
#endif
@@ -7860,7 +7860,7 @@ send_exit_message(Process *to, ErtsProcLocks *to_locksp,
Eterm exit_term, Uint term_size, Eterm token)
{
if (token == NIL
-#ifdef HAVE_DTRACE
+#ifdef USE_VM_PROBES
|| token == am_have_dt_utag
#endif
) {
@@ -7872,7 +7872,7 @@ send_exit_message(Process *to, ErtsProcLocks *to_locksp,
hp = erts_alloc_message_heap(term_size, &bp, &ohp, to, to_locksp);
mess = copy_struct(exit_term, term_size, &hp, ohp);
erts_queue_message(to, to_locksp, bp, mess, NIL
-#ifdef HAVE_DTRACE
+#ifdef USE_VM_PROBES
, NIL
#endif
);
@@ -7892,7 +7892,7 @@ send_exit_message(Process *to, ErtsProcLocks *to_locksp,
seq_trace_output(token, mess, SEQ_TRACE_SEND, to->id, NULL);
temp_token = copy_struct(token, sz_token, &hp, &bp->off_heap);
erts_queue_message(to, to_locksp, bp, mess, temp_token
-#ifdef HAVE_DTRACE
+#ifdef USE_VM_PROBES
, NIL
#endif
);
@@ -8002,7 +8002,7 @@ send_exit_signal(Process *c_p, /* current process if and only
if (ERTS_PROC_IS_TRAPPING_EXITS(rp)
&& (reason != am_kill || (flags & ERTS_XSIG_FLG_IGN_KILL))) {
if (is_not_nil(token)
-#ifdef HAVE_DTRACE
+#ifdef USE_VM_PROBES
&& token != am_have_dt_utag
#endif
&& token_update)
diff --git a/erts/emulator/beam/erl_process.h b/erts/emulator/beam/erl_process.h
index 35b31b1009..cff0783bc4 100644
--- a/erts/emulator/beam/erl_process.h
+++ b/erts/emulator/beam/erl_process.h
@@ -683,7 +683,7 @@ struct process {
Uint seq_trace_lastcnt;
Eterm seq_trace_token; /* Sequential trace token (tuple size 5 see below) */
-#ifdef HAVE_DTRACE
+#ifdef USE_VM_PROBES
Eterm dt_utag; /* Place to store the dynamc trace user tag */
Uint dt_utag_flags; /* flag field for the dt_utag */
#endif
@@ -1002,7 +1002,7 @@ extern struct erts_system_profile_flags_t erts_system_profile_flags;
#define SEQ_TRACE_PRINT (1 << 2)
#define SEQ_TRACE_TIMESTAMP (1 << 3)
-#ifdef HAVE_DTRACE
+#ifdef USE_VM_PROBES
#define DT_UTAG_PERMANENT (1 << 0)
#define DT_UTAG_SPREADING (1 << 1)
#define DT_UTAG(P) ((P)->dt_utag)
diff --git a/erts/emulator/beam/erl_trace.c b/erts/emulator/beam/erl_trace.c
index a4aed0122b..4261cd03be 100644
--- a/erts/emulator/beam/erl_trace.c
+++ b/erts/emulator/beam/erl_trace.c
@@ -125,7 +125,7 @@ do { \
enqueue_sys_msg_unlocked(SYS_MSG_TYPE_TRACE, (FPID), (TPID), (MSG), (BP)); \
} while(0)
#else
-#ifdef HAVE_DTRACE
+#ifdef USE_VM_PROBES
#define ERTS_ENQ_TRACE_MSG(FPID, TPROC, MSG, BP) \
erts_queue_message((TPROC), NULL, (BP), (MSG), NIL, NIL)
#else
@@ -589,7 +589,7 @@ profile_send(Eterm from, Eterm message) {
msg = copy_struct(message, sz, &hp, &bp->off_heap);
erts_queue_message(profile_p, NULL, bp, msg, NIL
-#ifdef HAVE_DTRACE
+#ifdef USE_VM_PROBES
, NIL
#endif
);
@@ -1004,7 +1004,7 @@ seq_trace_update_send(Process *p)
Eterm seq_tracer = erts_get_system_seq_tracer();
ASSERT((is_tuple(SEQ_TRACE_TOKEN(p)) || is_nil(SEQ_TRACE_TOKEN(p))));
if ( (p->id == seq_tracer) || (SEQ_TRACE_TOKEN(p) == NIL)
-#ifdef HAVE_DTRACE
+#ifdef USE_VM_PROBES
|| (SEQ_TRACE_TOKEN(p) == am_have_dt_utag)
#endif
) {
@@ -1192,7 +1192,7 @@ seq_trace_output_generic(Eterm token, Eterm msg, Uint type,
erts_smp_mtx_unlock(&smq_mtx);
#else
erts_queue_message(tracer, NULL, bp, mess, NIL
-#ifdef HAVE_DTRACE
+#ifdef USE_VM_PROBES
, NIL
#endif
); /* trace_token must be NIL here */
@@ -2487,7 +2487,7 @@ monitor_long_gc(Process *p, Uint time) {
enqueue_sys_msg(SYS_MSG_TYPE_SYSMON, p->id, NIL, msg, bp);
#else
erts_queue_message(monitor_p, NULL, bp, msg, NIL
-#ifdef HAVE_DTRACE
+#ifdef USE_VM_PROBES
, NIL
#endif
);
@@ -2563,7 +2563,7 @@ monitor_large_heap(Process *p) {
enqueue_sys_msg(SYS_MSG_TYPE_SYSMON, p->id, NIL, msg, bp);
#else
erts_queue_message(monitor_p, NULL, bp, msg, NIL
-#ifdef HAVE_DTRACE
+#ifdef USE_VM_PROBES
, NIL
#endif
);
@@ -2597,7 +2597,7 @@ monitor_generic(Process *p, Eterm type, Eterm spec) {
enqueue_sys_msg(SYS_MSG_TYPE_SYSMON, p->id, NIL, msg, bp);
#else
erts_queue_message(monitor_p, NULL, bp, msg, NIL
-#ifdef HAVE_DTRACE
+#ifdef USE_VM_PROBES
, NIL
#endif
);
@@ -3387,7 +3387,7 @@ sys_msg_dispatcher_func(void *unused)
else {
queue_proc_msg:
erts_queue_message(proc,&proc_locks,smqp->bp,smqp->msg,NIL
-#ifdef HAVE_DTRACE
+#ifdef USE_VM_PROBES
, NIL
#endif
);
diff --git a/erts/emulator/beam/io.c b/erts/emulator/beam/io.c
index 75ea53c2b7..9425576980 100644
--- a/erts/emulator/beam/io.c
+++ b/erts/emulator/beam/io.c
@@ -1565,7 +1565,7 @@ deliver_result(Eterm sender, Eterm pid, Eterm res)
res = copy_struct(res, sz_res, &hp, ohp);
tuple = TUPLE2(hp, sender, res);
erts_queue_message(rp, &rp_locks, bp, tuple, NIL
-#ifdef HAVE_DTRACE
+#ifdef USE_VM_PROBES
, NIL
#endif
);
@@ -1658,7 +1658,7 @@ static void deliver_read_message(Port* prt, Eterm to,
hp += 3;
erts_queue_message(rp, &rp_locks, bp, tuple, am_undefined
-#ifdef HAVE_DTRACE
+#ifdef USE_VM_PROBES
, NIL
#endif
);
@@ -1815,7 +1815,7 @@ deliver_vec_message(Port* prt, /* Port */
hp += 3;
erts_queue_message(rp, &rp_locks, bp, tuple, am_undefined
-#ifdef HAVE_DTRACE
+#ifdef USE_VM_PROBES
, NIL
#endif
);
@@ -2785,7 +2785,7 @@ void driver_report_exit(int ix, int status)
tuple = TUPLE2(hp, prt->id, tuple);
erts_queue_message(rp, &rp_locks, bp, tuple, am_undefined
-#ifdef HAVE_DTRACE
+#ifdef USE_VM_PROBES
, NIL
#endif
);
@@ -3339,7 +3339,7 @@ driver_deliver_term(ErlDrvPort port,
}
/* send message */
erts_queue_message(rp, &rp_locks, bp, mess, am_undefined
-#ifdef HAVE_DTRACE
+#ifdef USE_VM_PROBES
, NIL
#endif
);
diff --git a/erts/emulator/beam/utils.c b/erts/emulator/beam/utils.c
index 2efcd19162..5ab51fab50 100644
--- a/erts/emulator/beam/utils.c
+++ b/erts/emulator/beam/utils.c
@@ -1698,7 +1698,7 @@ static int do_send_to_logger(Eterm tag, Eterm gleader, char *buf, int len)
}
#else
erts_queue_message(p, NULL /* only used for smp build */, bp, tuple3, NIL
-#ifdef HAVE_DTRACE
+#ifdef USE_VM_PROBES
, NIL
#endif
);