aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/drivers/common
diff options
context:
space:
mode:
authorPatrik Nyblom <[email protected]>2012-03-05 17:29:03 +0100
committerPatrik Nyblom <[email protected]>2012-03-22 18:16:14 +0100
commitdb4ddca4d9709965121fba9a1f9cc68226f35a0c (patch)
treef3a6719ac33760ed669b5c1d84aca67626cec4cb /erts/emulator/drivers/common
parentcca350ef2206a81c0f8969071f412f07b87413a1 (diff)
downloadotp-db4ddca4d9709965121fba9a1f9cc68226f35a0c.tar.gz
otp-db4ddca4d9709965121fba9a1f9cc68226f35a0c.tar.bz2
otp-db4ddca4d9709965121fba9a1f9cc68226f35a0c.zip
Correct some errors in the user tag spreading
Diffstat (limited to 'erts/emulator/drivers/common')
-rw-r--r--erts/emulator/drivers/common/efile_drv.c18
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,