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>

Split Close
Expand all
Collapse all
          --- old/usr/src/lib/libdtrace/common/dt_xlator.c
          +++ new/usr/src/lib/libdtrace/common/dt_xlator.c
↓ open down ↓ 15 lines elided ↑ open up ↑
  16   16   * If applicable, add the following below this CDDL HEADER, with the
  17   17   * fields enclosed by brackets "[]" replaced with your own identifying
  18   18   * information: Portions Copyright [yyyy] [name of copyright owner]
  19   19   *
  20   20   * CDDL HEADER END
  21   21   */
  22   22  /*
  23   23   * Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
  24   24   * Use is subject to license terms.
  25   25   */
  26      -
  27      -#pragma ident   "%Z%%M% %I%     %E% SMI"
       26 +/*
       27 + * Copyright (c) 2013 by Delphix. All rights reserved.
       28 + * Copyright (c) 2013 Joyent, Inc. All rights reserved.
       29 + */
  28   30  
  29   31  #include <strings.h>
  30   32  #include <assert.h>
  31   33  
  32   34  #include <dt_xlator.h>
  33   35  #include <dt_parser.h>
  34   36  #include <dt_grammar.h>
  35   37  #include <dt_module.h>
  36   38  #include <dt_impl.h>
  37   39  
↓ open down ↓ 24 lines elided ↑ open up ↑
  62   64          dxp->dx_nodes = mnp;
  63   65  
  64   66          /*
  65   67           * For the member expression, we use a DT_NODE_XLATOR/TOK_XLATE whose
  66   68           * xlator refers back to the translator and whose dn_xmember refers to
  67   69           * the current member.  These refs will be used by dt_cg.c and dt_as.c.
  68   70           */
  69   71          enp->dn_op = DT_TOK_XLATE;
  70   72          enp->dn_xlator = dxp;
  71   73          enp->dn_xmember = mnp;
  72      -        dt_node_type_assign(enp, dxp->dx_dst_ctfp, type);
       74 +        dt_node_type_assign(enp, dxp->dx_dst_ctfp, type, B_FALSE);
  73   75  
  74   76          /*
  75   77           * For the member itself, we use a DT_NODE_MEMBER as usual with the
  76   78           * appropriate name, output type, and member expression set to 'enp'.
  77   79           */
  78   80          if (dxp->dx_members != NULL) {
  79   81                  assert(enp->dn_link->dn_kind == DT_NODE_MEMBER);
  80   82                  enp->dn_link->dn_list = mnp;
  81   83          } else
  82   84                  dxp->dx_members = mnp;
  83   85  
  84   86          mnp->dn_membname = strdup(name);
  85   87          mnp->dn_membexpr = enp;
  86      -        dt_node_type_assign(mnp, dxp->dx_dst_ctfp, type);
       88 +        dt_node_type_assign(mnp, dxp->dx_dst_ctfp, type, B_FALSE);
  87   89  
  88   90          if (mnp->dn_membname == NULL)
  89   91                  return (dt_set_errno(dtp, EDT_NOMEM));
  90   92  
  91   93          return (0);
  92   94  }
  93   95  
  94   96  dt_xlator_t *
  95   97  dt_xlator_create(dtrace_hdl_t *dtp,
  96   98      const dtrace_typeinfo_t *src, const dtrace_typeinfo_t *dst,
↓ open down ↓ 214 lines elided ↑ open up ↑
 311  313              dxp = dt_list_next(dxp)) {
 312  314                  if (ctf_type_compat(dxp->dx_src_ctfp, dxp->dx_src_base,
 313  315                      src_ctfp, src_type) &&
 314  316                      ctf_type_compat(dxp->dx_dst_ctfp, dxp->dx_dst_base,
 315  317                      dst_ctfp, dst_base))
 316  318                          goto out;
 317  319          }
 318  320  
 319  321          for (dxp = dt_list_next(&dtp->dt_xlators); dxp != NULL;
 320  322              dxp = dt_list_next(dxp)) {
 321      -                dt_node_type_assign(&xn, dxp->dx_src_ctfp, dxp->dx_src_type);
      323 +                dt_node_type_assign(&xn, dxp->dx_src_ctfp, dxp->dx_src_type,
      324 +                    B_FALSE);
 322  325                  if (ctf_type_compat(dxp->dx_dst_ctfp, dxp->dx_dst_base,
 323  326                      dst_ctfp, dst_base) && dt_node_is_argcompat(src, &xn))
 324  327                          goto out;
 325  328          }
 326  329  
 327  330  out:
 328  331          if (ptr && dxp != NULL && dxp->dx_ptrid.di_type == CTF_ERR)
 329  332                  return (NULL);  /* no translation available to pointer type */
 330  333  
 331  334          if (dxp != NULL || !(flags & DT_XLATE_EXTERN) ||
↓ open down ↓ 52 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX