Print this page
4474 DTrace Userland CTF Support
4475 DTrace userland Keyword
4476 DTrace tests should be better citizens
4479 pid provider types
4480 dof emulation missing checks
Reviewed by: Bryan Cantrill <bryan@joyent.com>

*** 19,28 **** --- 19,30 ---- * CDDL HEADER END */ /* * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013 by Delphix. All rights reserved. + * Copyright (c) 2013 Joyent, Inc. All rights reserved. */ #include <sys/sysmacros.h> #include <strings.h> #include <stdlib.h>
*** 93,103 **** iskey ? "key" : "argument", dt_node_type_name(args, n2, sizeof (n2))); } } ! dt_node_type_assign(dnp, idp->di_ctfp, idp->di_type); } /* * Cook an associative array identifier. If this is the first time we are * cooking this array, create its signature based on the argument list. --- 95,105 ---- iskey ? "key" : "argument", dt_node_type_name(args, n2, sizeof (n2))); } } ! dt_node_type_assign(dnp, idp->di_ctfp, idp->di_type, B_FALSE); } /* * Cook an associative array identifier. If this is the first time we are * cooking this array, create its signature based on the argument list.
*** 152,162 **** } if (argc != 0) isp->dis_args[argc - 1].dn_list = NULL; ! dt_node_type_assign(dnp, idp->di_ctfp, idp->di_type); } else { dt_idcook_sign(dnp, idp, argc, args, idp->di_kind == DT_IDENT_AGG ? "@" : "", "[ ]"); } --- 154,164 ---- } if (argc != 0) isp->dis_args[argc - 1].dn_list = NULL; ! dt_node_type_assign(dnp, idp->di_ctfp, idp->di_type, B_FALSE); } else { dt_idcook_sign(dnp, idp, argc, args, idp->di_kind == DT_IDENT_AGG ? "@" : "", "[ ]"); }
*** 292,302 **** "%s arg#%d (%s): %s\n", idp->di_name, i + 1, p1, dtrace_errmsg(dtp, dtrace_errno(dtp))); } dt_node_type_assign(&isp->dis_args[i], ! dtt.dtt_ctfp, dtt.dtt_type); } } dt_idcook_sign(dnp, idp, argc, args, "", "( )"); } --- 294,304 ---- "%s arg#%d (%s): %s\n", idp->di_name, i + 1, p1, dtrace_errmsg(dtp, dtrace_errno(dtp))); } dt_node_type_assign(&isp->dis_args[i], ! dtt.dtt_ctfp, dtt.dtt_type, B_FALSE); } } dt_idcook_sign(dnp, idp, argc, args, "", "( )"); }
*** 379,389 **** if (dnp->dn_ident == NULL) longjmp(yypcb->pcb_jmpbuf, EDT_NOMEM); dt_node_type_assign(dnp, prp->pr_argv[ap->dn_value].dtt_ctfp, ! prp->pr_argv[ap->dn_value].dtt_type); } else if ((dxp = dt_xlator_lookup(dtp, nnp, xnp, DT_XLATE_FUZZY)) != NULL || ( dxp = dt_xlator_lookup(dtp, dt_probe_tag(prp, ap->dn_value, &tag), xnp, DT_XLATE_EXACT | DT_XLATE_EXTERN)) != NULL) { --- 381,393 ---- if (dnp->dn_ident == NULL) longjmp(yypcb->pcb_jmpbuf, EDT_NOMEM); dt_node_type_assign(dnp, prp->pr_argv[ap->dn_value].dtt_ctfp, ! prp->pr_argv[ap->dn_value].dtt_type, ! prp->pr_argv[ap->dn_value].dtt_flags & DTT_FL_USER ? ! B_TRUE : B_FALSE); } else if ((dxp = dt_xlator_lookup(dtp, nnp, xnp, DT_XLATE_FUZZY)) != NULL || ( dxp = dt_xlator_lookup(dtp, dt_probe_tag(prp, ap->dn_value, &tag), xnp, DT_XLATE_EXACT | DT_XLATE_EXTERN)) != NULL) {
*** 407,417 **** */ dnp->dn_ident->di_data = xidp->di_data; dnp->dn_ident->di_ctfp = xidp->di_ctfp; dnp->dn_ident->di_type = xidp->di_type; ! dt_node_type_assign(dnp, DT_DYN_CTFP(dtp), DT_DYN_TYPE(dtp)); } else { xyerror(D_ARGS_XLATOR, "translator for %s[%lld] from %s to %s " "is not defined\n", idp->di_name, (longlong_t)ap->dn_value, dt_node_type_name(nnp, n1, sizeof (n1)), --- 411,422 ---- */ dnp->dn_ident->di_data = xidp->di_data; dnp->dn_ident->di_ctfp = xidp->di_ctfp; dnp->dn_ident->di_type = xidp->di_type; ! dt_node_type_assign(dnp, DT_DYN_CTFP(dtp), DT_DYN_TYPE(dtp), ! B_FALSE); } else { xyerror(D_ARGS_XLATOR, "translator for %s[%lld] from %s to %s " "is not defined\n", idp->di_name, (longlong_t)ap->dn_value, dt_node_type_name(nnp, n1, sizeof (n1)),
*** 453,463 **** } idp->di_ctfp = dtt.dtt_ctfp; idp->di_type = dtt.dtt_type; ! dt_node_type_assign(dnp, idp->di_ctfp, idp->di_type); } /*ARGSUSED*/ static void dt_idcook_type(dt_node_t *dnp, dt_ident_t *idp, int argc, dt_node_t *args) --- 458,468 ---- } idp->di_ctfp = dtt.dtt_ctfp; idp->di_type = dtt.dtt_type; ! dt_node_type_assign(dnp, idp->di_ctfp, idp->di_type, B_FALSE); } /*ARGSUSED*/ static void dt_idcook_type(dt_node_t *dnp, dt_ident_t *idp, int argc, dt_node_t *args)
*** 475,493 **** idp->di_ctfp = dtt.dtt_ctfp; idp->di_type = dtt.dtt_type; } ! dt_node_type_assign(dnp, idp->di_ctfp, idp->di_type); } /*ARGSUSED*/ static void dt_idcook_thaw(dt_node_t *dnp, dt_ident_t *idp, int argc, dt_node_t *args) { if (idp->di_ctfp != NULL && idp->di_type != CTF_ERR) ! dt_node_type_assign(dnp, idp->di_ctfp, idp->di_type); } static void dt_idcook_inline(dt_node_t *dnp, dt_ident_t *idp, int argc, dt_node_t *args) { --- 480,498 ---- idp->di_ctfp = dtt.dtt_ctfp; idp->di_type = dtt.dtt_type; } ! dt_node_type_assign(dnp, idp->di_ctfp, idp->di_type, B_FALSE); } /*ARGSUSED*/ static void dt_idcook_thaw(dt_node_t *dnp, dt_ident_t *idp, int argc, dt_node_t *args) { if (idp->di_ctfp != NULL && idp->di_type != CTF_ERR) ! dt_node_type_assign(dnp, idp->di_ctfp, idp->di_type, B_FALSE); } static void dt_idcook_inline(dt_node_t *dnp, dt_ident_t *idp, int argc, dt_node_t *args) {