diff options
Diffstat (limited to 'erts/emulator/drivers/common/efile_drv.c')
-rw-r--r-- | erts/emulator/drivers/common/efile_drv.c | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/erts/emulator/drivers/common/efile_drv.c b/erts/emulator/drivers/common/efile_drv.c index 53cdb13db0..b33a8d210b 100644 --- a/erts/emulator/drivers/common/efile_drv.c +++ b/erts/emulator/drivers/common/efile_drv.c @@ -2711,9 +2711,15 @@ file_output(ErlDrvData e, char* buf, ErlDrvSizeT count) return; } #ifdef USE_VM_PROBES - DTRACE11(efile_drv_entry, dt_priv->thread_num, dt_priv->tag++, + if (dt_utag != NULL && dt_utag[0] == '\0') { + dt_utag = NULL; + } + + DTRACE11(efile_drv_entry, dt_priv->thread_num, dt_priv->tag, dt_utag, command, name, dt_s2, dt_i1, dt_i2, dt_i3, dt_i4, desc->port_str); + DTRACE6(efile_drv_return, dt_priv->thread_num, dt_priv->tag++, + dt_utag, command, 1, 0); #endif TRACE_C('R'); driver_output2(desc->port, resbuf, 1, NULL, 0); @@ -3806,8 +3812,6 @@ file_outputv(ErlDrvData e, ErlIOVec *ev) { ; dt_s1 = d->b; dt_utag = EV_CHAR_P(ev, p, q); - if (*dt_utag != 0) - fprintf(stderr,"dt_utag = %s\r\n",dt_utag); } #endif d->c.read_file.binp = NULL; @@ -4108,8 +4112,12 @@ file_outputv(ErlDrvData e, ErlIOVec *ev) { d->sched_i2 = dt_priv->tag; d->sched_utag[0] = '\0'; if (dt_utag != NULL) { - strncpy(d->sched_utag, dt_utag, sizeof(d->sched_utag) - 1); - d->sched_utag[sizeof(d->sched_utag) - 1] = '\0'; + if (dt_utag[0] == '\0') { + dt_utag = NULL; + } else { + strncpy(d->sched_utag, dt_utag, sizeof(d->sched_utag) - 1); + d->sched_utag[sizeof(d->sched_utag) - 1] = '\0'; + } } DTRACE11(efile_drv_entry, dt_priv->thread_num, dt_priv->tag++, dt_utag, command, dt_s1, NULL, dt_i1, dt_i2, dt_i3, dt_i4, |