Print this page
7085 add support for "if" and "else" statements in dtrace

Split Close
Expand all
Collapse all
          --- old/usr/src/lib/libdtrace/common/dtrace.h
          +++ new/usr/src/lib/libdtrace/common/dtrace.h
↓ open down ↓ 17 lines elided ↑ open up ↑
  18   18   *
  19   19   * CDDL HEADER END
  20   20   */
  21   21  
  22   22  /*
  23   23   * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
  24   24   * Use is subject to license terms.
  25   25   */
  26   26  
  27   27  /*
  28      - * Copyright (c) 2013 by Delphix. All rights reserved.
       28 + * Copyright (c) 2014 by Delphix. All rights reserved.
  29   29   * Copyright (c) 2013, Joyent, Inc. All rights reserved.
  30   30   */
  31   31  
  32   32  #ifndef _DTRACE_H
  33   33  #define _DTRACE_H
  34   34  
  35   35  #include <sys/dtrace.h>
  36   36  #include <stdarg.h>
  37   37  #include <stdio.h>
  38   38  #include <gelf.h>
↓ open down ↓ 9 lines elided ↑ open up ↑
  48   48   * Solaris system and DTrace subsystem and are subject to change at any time
  49   49   * without notice.  Applications and drivers using these interfaces will fail
  50   50   * to run on future releases.  These interfaces should not be used for any
  51   51   * purpose except those expressly outlined in dtrace(7D) and libdtrace(3LIB).
  52   52   * Please refer to the "Solaris Dynamic Tracing Guide" for more information.
  53   53   */
  54   54  
  55   55  #define DTRACE_VERSION  3               /* library ABI interface version */
  56   56  
  57   57  struct ps_prochandle;
       58 +struct dt_node;
  58   59  typedef struct dtrace_hdl dtrace_hdl_t;
  59   60  typedef struct dtrace_prog dtrace_prog_t;
  60   61  typedef struct dtrace_vector dtrace_vector_t;
  61   62  typedef struct dtrace_aggdata dtrace_aggdata_t;
  62   63  
  63   64  #define DTRACE_O_NODEV          0x01    /* do not open dtrace(7D) device */
  64   65  #define DTRACE_O_NOSYS          0x02    /* do not load /system/object modules */
  65   66  #define DTRACE_O_LP64           0x04    /* force D compiler to be LP64 */
  66   67  #define DTRACE_O_ILP32          0x08    /* force D compiler to be ILP32 */
  67   68  #define DTRACE_O_MASK           0x0f    /* mask of valid flags to dtrace_open */
↓ open down ↓ 36 lines elided ↑ open up ↑
 104  105          uint_t dpi_speculations; /* number of speculations specified in prog */
 105  106  } dtrace_proginfo_t;
 106  107  
 107  108  #define DTRACE_C_DIFV   0x0001  /* DIF verbose mode: show each compiled DIFO */
 108  109  #define DTRACE_C_EMPTY  0x0002  /* Permit compilation of empty D source files */
 109  110  #define DTRACE_C_ZDEFS  0x0004  /* Permit probe defs that match zero probes */
 110  111  #define DTRACE_C_EATTR  0x0008  /* Error if program attributes less than min */
 111  112  #define DTRACE_C_CPP    0x0010  /* Preprocess input file with cpp(1) utility */
 112  113  #define DTRACE_C_KNODEF 0x0020  /* Permit unresolved kernel symbols in DIFO */
 113  114  #define DTRACE_C_UNODEF 0x0040  /* Permit unresolved user symbols in DIFO */
 114      -#define DTRACE_C_PSPEC  0x0080  /* Intepret ambiguous specifiers as probes */
      115 +#define DTRACE_C_PSPEC  0x0080  /* Interpret ambiguous specifiers as probes */
 115  116  #define DTRACE_C_ETAGS  0x0100  /* Prefix error messages with error tags */
 116  117  #define DTRACE_C_ARGREF 0x0200  /* Do not require all macro args to be used */
 117  118  #define DTRACE_C_DEFARG 0x0800  /* Use 0/"" as value for unspecified args */
 118  119  #define DTRACE_C_NOLIBS 0x1000  /* Do not process D system libraries */
 119  120  #define DTRACE_C_CTL    0x2000  /* Only process control directives */
 120  121  #define DTRACE_C_MASK   0x3bff  /* mask of all valid flags to dtrace_*compile */
 121  122  
 122  123  extern dtrace_prog_t *dtrace_program_strcompile(dtrace_hdl_t *,
 123  124      const char *, dtrace_probespec_t, uint_t, int, char *const []);
 124  125  
↓ open down ↓ 387 lines elided ↑ open up ↑
 512  513  
 513  514  extern int dtrace_symbol_type(dtrace_hdl_t *, const GElf_Sym *,
 514  515      const dtrace_syminfo_t *, dtrace_typeinfo_t *);
 515  516  
 516  517  extern int dtrace_type_strcompile(dtrace_hdl_t *,
 517  518      const char *, dtrace_typeinfo_t *);
 518  519  
 519  520  extern int dtrace_type_fcompile(dtrace_hdl_t *,
 520  521      FILE *, dtrace_typeinfo_t *);
 521  522  
      523 +extern struct dt_node *dt_compile_sugar(dtrace_hdl_t *,
      524 +    struct dt_node *);
      525 +
      526 +
 522  527  /*
 523  528   * DTrace Probe Interface
 524  529   *
 525  530   * Library clients can use these functions to iterate over the set of available
 526  531   * probe definitions and inquire as to their attributes.  The probe iteration
 527  532   * interfaces report probes that are declared as well as those from dtrace(7D).
 528  533   */
 529  534  typedef struct dtrace_probeinfo {
 530  535          dtrace_attribute_t dtp_attr;            /* name attributes */
 531  536          dtrace_attribute_t dtp_arga;            /* arg attributes */
↓ open down ↓ 69 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX