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_decl.c
          +++ new/usr/src/lib/libdtrace/common/dt_decl.c
↓ open down ↓ 13 lines elided ↑ open up ↑
  14   14   * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  15   15   * If applicable, add the following below this CDDL HEADER, with the
  16   16   * fields enclosed by brackets "[]" replaced with your own identifying
  17   17   * information: Portions Copyright [yyyy] [name of copyright owner]
  18   18   *
  19   19   * CDDL HEADER END
  20   20   */
  21   21  
  22   22  /*
  23   23   * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
  24      - * Copyright (c) 2012 by Delphix. All rights reserved.
       24 + * Copyright (c) 2013 by Delphix. All rights reserved.
       25 + * Copyright (c) 2013 Joyent, Inc. All rights reserved.
  25   26   */
  26   27  
  27   28  #include <strings.h>
  28   29  #include <stdlib.h>
  29   30  #include <limits.h>
  30   31  #include <alloca.h>
  31   32  #include <assert.h>
  32   33  
  33   34  #include <dt_decl.h>
  34   35  #include <dt_parser.h>
↓ open down ↓ 733 lines elided ↑ open up ↑
 768  769              &dt_idops_inline, NULL, dtp->dt_gen);
 769  770  
 770  771          if (idp == NULL)
 771  772                  longjmp(yypcb->pcb_jmpbuf, EDT_NOMEM);
 772  773  
 773  774          yyintprefix = 0;
 774  775          yyintsuffix[0] = '\0';
 775  776          yyintdecimal = 0;
 776  777  
 777  778          dnp = dt_node_int(value);
 778      -        dt_node_type_assign(dnp, dsp->ds_ctfp, dsp->ds_type);
      779 +        dt_node_type_assign(dnp, dsp->ds_ctfp, dsp->ds_type, B_FALSE);
 779  780  
 780  781          if ((inp = malloc(sizeof (dt_idnode_t))) == NULL)
 781  782                  longjmp(yypcb->pcb_jmpbuf, EDT_NOMEM);
 782  783  
 783  784          /*
 784  785           * Remove the INT node from the node allocation list and store it in
 785  786           * din_list and din_root so it persists with and is freed by the ident.
 786  787           */
 787  788          assert(yypcb->pcb_list == dnp);
 788  789          yypcb->pcb_list = dnp->dn_link;
↓ open down ↓ 21 lines elided ↑ open up ↑
 810  811  
 811  812          dt_module_t *dmp;
 812  813          ctf_arinfo_t r;
 813  814          ctf_id_t type;
 814  815  
 815  816          char n[DT_TYPE_NAMELEN];
 816  817          uint_t flag;
 817  818          char *name;
 818  819          int rv;
 819  820  
      821 +        tip->dtt_flags = 0;
      822 +
 820  823          /*
 821  824           * Based on our current #include depth and decl stack depth, determine
 822  825           * which dynamic CTF module and scope to use when adding any new types.
 823  826           */
 824  827          dmp = yypcb->pcb_idepth ? dtp->dt_cdefs : dtp->dt_ddefs;
 825  828          flag = yypcb->pcb_dstack.ds_next ? CTF_ADD_NONROOT : CTF_ADD_ROOT;
 826  829  
      830 +        if (ddp->dd_attr & DT_DA_USER)
      831 +                tip->dtt_flags = DTT_FL_USER;
      832 +
 827  833          /*
 828  834           * If we have already cached a CTF type for this decl, then we just
 829  835           * return the type information for the cached type.
 830  836           */
 831  837          if (ddp->dd_ctfp != NULL &&
 832  838              (dmp = dt_module_lookup_by_ctf(dtp, ddp->dd_ctfp)) != NULL) {
 833  839                  tip->dtt_object = dmp->dm_name;
 834  840                  tip->dtt_ctfp = ddp->dd_ctfp;
 835  841                  tip->dtt_type = ddp->dd_type;
 836  842                  return (0);
↓ open down ↓ 283 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX