diff options
author | Patrik Nyblom <[email protected]> | 2012-03-09 17:20:49 +0100 |
---|---|---|
committer | Patrik Nyblom <[email protected]> | 2012-03-22 18:16:14 +0100 |
commit | 326e098659de187099451bf20a33c3e6181b4141 (patch) | |
tree | 7cad8f20c6e3e734c2221c56c77744cae057c7a9 /erts/emulator/sys/common | |
parent | 0889c9860f5d07fc87db6bfc287b9a3ddc764aa1 (diff) | |
download | otp-326e098659de187099451bf20a33c3e6181b4141.tar.gz otp-326e098659de187099451bf20a33c3e6181b4141.tar.bz2 otp-326e098659de187099451bf20a33c3e6181b4141.zip |
Ifdef all dynamic trace code
Diffstat (limited to 'erts/emulator/sys/common')
-rw-r--r-- | erts/emulator/sys/common/erl_check_io.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/erts/emulator/sys/common/erl_check_io.c b/erts/emulator/sys/common/erl_check_io.c index cb7ef95f00..1d173a758a 100644 --- a/erts/emulator/sys/common/erl_check_io.c +++ b/erts/emulator/sys/common/erl_check_io.c @@ -498,7 +498,9 @@ ERTS_CIO_EXPORT(driver_select)(ErlDrvPort ix, ErtsDrvEventState *state; int wake_poller; int ret; +#ifdef USE_VM_PROBES DTRACE_CHARBUF(name, 64); +#endif ERTS_SMP_LC_ASSERT(erts_drvport2port(ix) && erts_lc_is_port_locked(erts_drvport2port(ix))); @@ -528,8 +530,10 @@ ERTS_CIO_EXPORT(driver_select)(ErlDrvPort ix, if (IS_FD_UNKNOWN(state)) { /* fast track to stop_select callback */ stop_select_fn = erts_drvport2port(ix)->drv_ptr->stop_select; +#ifdef USE_VM_PROBES strncpy(name, erts_drvport2port(ix)->drv_ptr->name, sizeof(name)-1); name[sizeof(name)-1] = '\0'; +#endif ret = 0; goto done_unknown; } @@ -666,8 +670,10 @@ ERTS_CIO_EXPORT(driver_select)(ErlDrvPort ix, /* Safe to close fd now as it is not in pollset or there was no need to eject fd (kernel poll) */ stop_select_fn = drv_ptr->stop_select; +#ifdef USE_VM_PROBES strncpy(name, erts_drvport2port(ix)->drv_ptr->name, sizeof(name)-1); name[sizeof(name)-1] = '\0'; +#endif } else { /* Not safe to close fd, postpone stop_select callback. */ |