local_irq_save(cookie);
+ dt_dbg_buf("Switch (CPU %d): tomax %p (%lld) <-> xamot %p (%lld)\n",
+ smp_processor_id(), tomax, buf->dtb_offset,
+ xamot, buf->dtb_xamot_offset );
+
buf->dtb_tomax = xamot;
buf->dtb_xamot = tomax;
buf->dtb_xamot_drops = buf->dtb_drops;
ASSERT(!((align - (offs & (align - 1))) &
(sizeof (uint32_t) - 1)));
DTRACE_STORE(uint32_t, tomax, offs, DTRACE_EPIDNONE);
+ dt_dbg_buf(" Store: %p[%ld .. %ld] <- EPIDNONE "
+ "(from %s::%d)\n",
+ buf, offs, offs + sizeof(uint32_t) - 1,
+ __FUNCTION__, __LINE__);
offs += sizeof (uint32_t);
}
return -1;
}
- if (mstate == NULL)
- return (offs);
+ if (mstate == NULL) {
+ dt_dbg_buf(" Reserve: %p[%ld .. %ld]\n",
+ buf, offs, offs + needed - 1);
+ return offs;
+ }
mstate->dtms_scratch_base = (uintptr_t)tomax + soffs;
mstate->dtms_scratch_size = buf->dtb_size - soffs;
mstate->dtms_scratch_ptr = mstate->dtms_scratch_base;
+ dt_dbg_buf(" Reserve: %p[%ld .. %ld]\n",
+ buf, offs, offs + needed - 1);
return offs;
}
ASSERT(!((align - (offs & (align - 1))) &
(sizeof (uint32_t) - 1)));
DTRACE_STORE(uint32_t, tomax, offs, DTRACE_EPIDNONE);
+ dt_dbg_buf(" Store: %p[%ld .. %ld] <- EPIDNONE "
+ "(from %s::%d)\n",
+ buf, offs, offs + sizeof(uint32_t) - 1,
+ __FUNCTION__, __LINE__);
offs += sizeof (uint32_t);
}
}
}
- if (mstate == NULL)
+ if (mstate == NULL) {
+ dt_dbg_buf(" Reserve: %p[%ld .. %ld]\n",
+ buf, offs, offs + needed - 1);
return offs;
+ }
/*
* For ring buffers and fill buffers, the scratch space is always
mstate->dtms_scratch_size = buf->dtb_size;
mstate->dtms_scratch_ptr = mstate->dtms_scratch_base;
+ dt_dbg_buf(" Reserve: %p[%ld .. %ld]\n",
+ buf, offs, offs + needed - 1);
return offs;
}
}
}
+ dt_dbg_probe("Probe (ID %d EPID %d) on CPU %d...\n",
+ id, ecb->dte_epid, cpuid);
if (ecb->dte_cond) {
/*
* If the dte_cond bits indicate that this
tomax = buf->dtb_tomax;
ASSERT(tomax != NULL);
- if (ecb->dte_size != 0)
+ if (ecb->dte_size != 0) {
DTRACE_STORE(uint32_t, tomax, offs, ecb->dte_epid);
+ dt_dbg_buf(" Store: %p[%ld .. %ld] <- %d [EPID] "
+ "(from %s::%d)\n",
+ buf, offs, offs + sizeof(uint32_t) - 1,
+ ecb->dte_epid, __FUNCTION__, __LINE__);
+ }
mstate.dtms_epid = ecb->dte_epid;
mstate.dtms_present |= DTRACE_MSTATE_EPID;
current->predcache = cid;
}
+ dt_dbg_probe("Probe (ID %d EPID %d) "
+ "Predicate not satisfied (%d)\n",
+ id, ecb->dte_epid, rval);
continue;
}
}
dtrace_difo_t *dp;
dtrace_recdesc_t *rec = &act->dta_rec;
+ dt_dbg_probe("Probe (ID %d EPID %d) Action %d...\n",
+ id, ecb->dte_epid, act->dta_kind);
+
size = rec->dtrd_size;
valoffs = offs + rec->dtrd_offset;
tomax = buf->dtb_tomax;
ASSERT(tomax != NULL);
- if (ecb->dte_size != 0)
+ if (ecb->dte_size != 0) {
DTRACE_STORE(uint32_t, tomax, offs,
ecb->dte_epid);
+ dt_dbg_buf(" Store: %p[%ld .. %ld] "
+ "<- %d [EPID] "
+ "(from %s::%d)\n",
+ buf, offs,
+ offs + sizeof(uint32_t) - 1,
+ ecb->dte_epid,
+ __FUNCTION__, __LINE__);
+ }
continue;
/*
* We need to commit our buffer state.
*/
- if (ecb->dte_size)
+ if (ecb->dte_size) {
buf->dtb_offset = offs + ecb->dte_size;
+ dt_dbg_buf(" Consume: %p[%ld .. "
+ "%lld]\n",
+ buf, offs,
+ buf->dtb_offset - 1);
+ }
buf = &state->dts_buffer[cpuid];
dtrace_speculation_commit(state, cpuid, val);
DTRACE_STORE(uint64_t, tomax, valoffs,
(uint64_t)pid);
+ dt_dbg_buf(" Store: %p[%ld .. %ld] <- %lld "
+ "[PID] (from %s::%d)\n",
+ buf, valoffs,
+ valoffs + sizeof(uint64_t) - 1,
+ (uint64_t)pid,
+ __FUNCTION__, __LINE__);
DTRACE_STORE(uint64_t, tomax,
valoffs + sizeof(uint64_t), val);
+ dt_dbg_buf(" Store: %p[%ld .. %ld] <- %lld "
+ "(from %s::%d)\n",
+ buf, valoffs + sizeof(uint64_t),
+ valoffs + 2 * sizeof(uint64_t) - 1,
+ val, __FUNCTION__, __LINE__);
continue;
}
DTRACE_STORE(uint8_t, tomax,
valoffs++, c);
+ dt_dbg_buf(" Store: %p[%ld]"
+ " <- %d (from "
+ "%s::%d)\n",
+ buf, valoffs, c,
+ __FUNCTION__,
+ __LINE__);
if (c == '\0' && intuple)
break;
continue;
}
- while (valoffs < end)
+ while (valoffs < end) {
DTRACE_STORE(uint8_t, tomax, valoffs++,
dtrace_load8(val++));
+ dt_dbg_buf(" Store: %p[%ld] <- ??? "
+ "(from %s::%d)\n",
+ buf, valoffs,
+ __FUNCTION__, __LINE__);
+ }
continue;
}
break;
case sizeof(uint8_t):
DTRACE_STORE(uint8_t, tomax, valoffs, val);
+ dt_dbg_buf(" Store: %p[%ld] <- %d "
+ "(from %s::%d)\n",
+ buf, valoffs, (uint8_t)val,
+ __FUNCTION__, __LINE__);
break;
case sizeof(uint16_t):
DTRACE_STORE(uint16_t, tomax, valoffs, val);
+ dt_dbg_buf(" Store: %p[%ld .. %ld] <- %d "
+ "(from %s::%d)\n",
+ buf, valoffs,
+ valoffs + sizeof(uint16_t) - 1,
+ (uint16_t)val,
+ __FUNCTION__, __LINE__);
break;
case sizeof(uint32_t):
DTRACE_STORE(uint32_t, tomax, valoffs, val);
+ dt_dbg_buf(" Store: %p[%ld] <- %d "
+ "(from %s::%d)\n",
+ buf, valoffs,
+ valoffs + sizeof(uint32_t) - 1,
+ (uint32_t)val,
+ __FUNCTION__, __LINE__);
break;
case sizeof(uint64_t):
DTRACE_STORE(uint64_t, tomax, valoffs, val);
+ dt_dbg_buf(" Store: %p[%ld] <- %d "
+ "(from %s::%d)\n",
+ buf, valoffs,
+ valoffs + sizeof(uint64_t) - 1, val,
+ __FUNCTION__, __LINE__);
break;
default:
/*
}
}
- if (*flags & CPU_DTRACE_DROP)
+ if (*flags & CPU_DTRACE_DROP) {
+ dt_dbg_probe("Probe (ID %d EPID %d) Dropped\n",
+ id, ecb->dte_epid);
continue;
+ }
if (*flags & CPU_DTRACE_FAULT) {
int ndx;
continue;
}
- if (!committed)
+ if (!committed) {
buf->dtb_offset = offs + ecb->dte_size;
+ dt_dbg_buf(" Consume: %p[%ld .. %lld]\n",
+ buf, offs, buf->dtb_offset);
+ }
}
if (vtime)