Lines Matching refs:dp
6787 dtrace_store_by_ref(dtrace_difo_t *dp, caddr_t tomax, size_t size,
6801 if (dp->dtdo_rtype.dtdt_kind == DIF_TYPE_STRING) {
7037 dtrace_difo_t *dp = pred->dtp_difo;
7040 rval = dtrace_dif_emulate(dp, &mstate, vstate, state);
7060 dtrace_difo_t *dp;
7072 if ((dp = act->dta_difo) != NULL)
7073 v = dtrace_dif_emulate(dp,
7183 dp = act->dta_difo;
7184 ASSERT(dp != NULL);
7186 val = dtrace_dif_emulate(dp, &mstate, vstate, state);
7335 if (dp->dtdo_rtype.dtdt_flags & DIF_TF_BYREF ||
7336 dp->dtdo_rtype.dtdt_flags & DIF_TF_BYUREF) {
7345 if (dp->dtdo_rtype.dtdt_flags & DIF_TF_BYREF &&
7347 &dp->dtdo_rtype, NULL, &mstate, vstate))
7350 dtrace_store_by_ref(dp, tomax, size, &valoffs,
7352 dp->dtdo_rtype.dtdt_flags & DIF_TF_BYREF ?
9190 dtrace_difo_validate(dtrace_difo_t *dp, dtrace_vstate_t *vstate, uint_t nregs,
9202 dp->dtdo_destructive = 0;
9204 for (pc = 0; pc < dp->dtdo_len && err == 0; pc++) {
9205 dif_instr_t instr = dp->dtdo_buf[pc];
9269 dp->dtdo_buf[pc] = DIF_INSTR_LOAD(op +
9343 if (label >= dp->dtdo_len) {
9365 if (DIF_INSTR_INTEGER(instr) >= dp->dtdo_intlen) {
9375 if (DIF_INSTR_STRING(instr) >= dp->dtdo_strlen) {
9427 dp->dtdo_destructive = 1;
9466 if (dp->dtdo_len != 0 &&
9467 DIF_INSTR_OP(dp->dtdo_buf[dp->dtdo_len - 1]) != DIF_OP_RET) {
9468 err += efunc(dp->dtdo_len - 1,
9472 if (!(dp->dtdo_rtype.dtdt_flags & (DIF_TF_BYREF | DIF_TF_BYUREF))) {
9477 switch (dp->dtdo_rtype.dtdt_size) {
9486 err += efunc(dp->dtdo_len - 1, "bad return size\n");
9490 for (i = 0; i < dp->dtdo_varlen && err == 0; i++) {
9491 dtrace_difv_t *v = &dp->dtdo_vartab[i], *existing = NULL;
9599 for (pc = 0; pc < dp->dtdo_len && err == 0; pc++) {
9600 dif_instr_t instr = dp->dtdo_buf[pc];
9646 dtrace_difo_validate_helper(dtrace_difo_t *dp)
9652 for (pc = 0; pc < dp->dtdo_len; pc++) {
9653 dif_instr_t instr = dp->dtdo_buf[pc];
9795 dtrace_difo_cacheable(dtrace_difo_t *dp)
9799 if (dp == NULL)
9802 for (i = 0; i < dp->dtdo_varlen; i++) {
9803 dtrace_difv_t *v = &dp->dtdo_vartab[i];
9826 for (i = 0; i < dp->dtdo_len; i++) {
9827 uint_t op = DIF_INSTR_OP(dp->dtdo_buf[i]);
9840 dtrace_difo_hold(dtrace_difo_t *dp)
9846 dp->dtdo_refcnt++;
9847 ASSERT(dp->dtdo_refcnt != 0);
9853 for (i = 0; i < dp->dtdo_varlen; i++) {
9854 dtrace_difv_t *v = &dp->dtdo_vartab[i];
9872 dtrace_difo_chunksize(dtrace_difo_t *dp, dtrace_vstate_t *vstate)
9876 const dif_instr_t *text = dp->dtdo_buf;
9882 for (pc = 0; pc < dp->dtdo_len; pc++) {
9894 sval = dp->dtdo_inttab[DIF_INSTR_INTEGER(instr)];
9986 for (i = 0; i < dp->dtdo_varlen; i++) {
9987 dtrace_difv_t *v = &dp->dtdo_vartab[i];
9995 if (i == dp->dtdo_varlen)
10023 dtrace_difo_init(dtrace_difo_t *dp, dtrace_vstate_t *vstate)
10029 ASSERT(dp->dtdo_buf != NULL && dp->dtdo_len != 0);
10031 for (i = 0; i < dp->dtdo_varlen; i++) {
10032 dtrace_difv_t *v = &dp->dtdo_vartab[i];
10131 dtrace_difo_chunksize(dp, vstate);
10132 dtrace_difo_hold(dp);
10136 dtrace_difo_duplicate(dtrace_difo_t *dp, dtrace_vstate_t *vstate)
10141 ASSERT(dp->dtdo_buf != NULL);
10142 ASSERT(dp->dtdo_refcnt != 0);
10146 ASSERT(dp->dtdo_buf != NULL);
10147 sz = dp->dtdo_len * sizeof (dif_instr_t);
10149 bcopy(dp->dtdo_buf, new->dtdo_buf, sz);
10150 new->dtdo_len = dp->dtdo_len;
10152 if (dp->dtdo_strtab != NULL) {
10153 ASSERT(dp->dtdo_strlen != 0);
10154 new->dtdo_strtab = kmem_alloc(dp->dtdo_strlen, KM_SLEEP);
10155 bcopy(dp->dtdo_strtab, new->dtdo_strtab, dp->dtdo_strlen);
10156 new->dtdo_strlen = dp->dtdo_strlen;
10159 if (dp->dtdo_inttab != NULL) {
10160 ASSERT(dp->dtdo_intlen != 0);
10161 sz = dp->dtdo_intlen * sizeof (uint64_t);
10163 bcopy(dp->dtdo_inttab, new->dtdo_inttab, sz);
10164 new->dtdo_intlen = dp->dtdo_intlen;
10167 if (dp->dtdo_vartab != NULL) {
10168 ASSERT(dp->dtdo_varlen != 0);
10169 sz = dp->dtdo_varlen * sizeof (dtrace_difv_t);
10171 bcopy(dp->dtdo_vartab, new->dtdo_vartab, sz);
10172 new->dtdo_varlen = dp->dtdo_varlen;
10180 dtrace_difo_destroy(dtrace_difo_t *dp, dtrace_vstate_t *vstate)
10184 ASSERT(dp->dtdo_refcnt == 0);
10186 for (i = 0; i < dp->dtdo_varlen; i++) {
10187 dtrace_difv_t *v = &dp->dtdo_vartab[i];
10234 kmem_free(dp->dtdo_buf, dp->dtdo_len * sizeof (dif_instr_t));
10235 kmem_free(dp->dtdo_inttab, dp->dtdo_intlen * sizeof (uint64_t));
10236 kmem_free(dp->dtdo_strtab, dp->dtdo_strlen);
10237 kmem_free(dp->dtdo_vartab, dp->dtdo_varlen * sizeof (dtrace_difv_t));
10239 kmem_free(dp, sizeof (dtrace_difo_t));
10243 dtrace_difo_release(dtrace_difo_t *dp, dtrace_vstate_t *vstate)
10248 ASSERT(dp->dtdo_refcnt != 0);
10250 for (i = 0; i < dp->dtdo_varlen; i++) {
10251 dtrace_difv_t *v = &dp->dtdo_vartab[i];
10261 if (--dp->dtdo_refcnt == 0)
10262 dtrace_difo_destroy(dp, vstate);
10356 dtrace_predicate_create(dtrace_difo_t *dp)
10361 ASSERT(dp->dtdo_refcnt != 0);
10364 pred->dtp_difo = dp;
10367 if (!dtrace_difo_cacheable(dp))
10400 dtrace_difo_t *dp = pred->dtp_difo;
10403 ASSERT(dp != NULL && dp->dtdo_refcnt != 0);
10445 dtrace_difo_t *dp;
10452 if ((dp = act->dtad_difo) != NULL)
10453 dtrace_difo_release(dp, vstate);
10885 dtrace_difo_t *dp = desc->dtad_difo;
10918 dp != NULL && dp->dtdo_destructive)) {
10947 if (dp == NULL)
10950 if ((size = dp->dtdo_rtype.dtdt_size) != 0)
10953 if (dp->dtdo_rtype.dtdt_kind == DIF_TYPE_STRING) {
10954 if (!(dp->dtdo_rtype.dtdt_flags & DIF_TF_BYREF))
11002 if (dp == NULL || ((size = dp->dtdo_rtype.dtdt_size) !=
11004 (dp->dtdo_rtype.dtdt_flags & DIF_TF_BYREF))
11011 if (dp == NULL ||
11012 (dp->dtdo_rtype.dtdt_size != sizeof (uint64_t)) ||
11013 (dp->dtdo_rtype.dtdt_flags & DIF_TF_BYREF))
11033 if (dp == NULL)
11038 if (dp == NULL ||
11039 (size = dp->dtdo_rtype.dtdt_size) != sizeof (int) ||
11040 (dp->dtdo_rtype.dtdt_flags & DIF_TF_BYREF))
11048 if (dp == NULL)
11062 if (dp == NULL)
11102 if ((action->dta_difo = dp) != NULL)
11103 dtrace_difo_hold(dp);
11130 dtrace_difo_t *dp;
11145 if ((dp = act->dta_difo) != NULL)
11146 dtrace_difo_release(dp, vstate);
12742 dtrace_difo_t *dp;
12795 dp = kmem_zalloc(sizeof (dtrace_difo_t), KM_SLEEP);
12796 dp->dtdo_rtype = dofd->dofd_rtype;
12828 bufp = (void **)((uintptr_t)dp + difo[i].bufoffs);
12829 lenp = (uint32_t *)((uintptr_t)dp + difo[i].lenoffs);
12869 if (dp->dtdo_buf == NULL) {
12885 for (i = 0; i < dp->dtdo_varlen; i++) {
12886 dtrace_difv_t *v = &dp->dtdo_vartab[i];
12896 if (dtrace_difo_validate(dp, vstate, DIF_DIR_NREGS, cr) != 0)
12899 dtrace_difo_init(dp, vstate);
12900 return (dp);
12903 kmem_free(dp->dtdo_buf, dp->dtdo_len * sizeof (dif_instr_t));
12904 kmem_free(dp->dtdo_inttab, dp->dtdo_intlen * sizeof (uint64_t));
12905 kmem_free(dp->dtdo_strtab, dp->dtdo_strlen);
12906 kmem_free(dp->dtdo_vartab, dp->dtdo_varlen * sizeof (dtrace_difv_t));
12908 kmem_free(dp, sizeof (dtrace_difo_t));
12916 dtrace_difo_t *dp;
12918 if ((dp = dtrace_dof_difo(dof, sec, vstate, cr)) == NULL)
12921 return (dtrace_predicate_create(dp));
14878 dtrace_difo_t *dp;
14880 if ((dp = helper->dtha_predicate) != NULL)
14881 err += dtrace_difo_validate_helper(dp);
15549 dtrace_difo_t *dp;
15576 if ((dp = helper->dtha_predicate) != NULL) {
15577 dp = dtrace_difo_duplicate(dp, vstate);
15578 new->dtha_predicate = dp;
15586 dtrace_difo_t *dp = helper->dtha_actions[j];
15588 ASSERT(dp != NULL);
15589 dp = dtrace_difo_duplicate(dp, vstate);
15590 new->dtha_actions[j] = dp;