Print this page
OS-1723 DTrace should speak JSON (review fixes)


 118 const dt_version_t _dtrace_versions[] = {
 119         DT_VERS_1_0,    /* D API 1.0.0 (PSARC 2001/466) Solaris 10 FCS */
 120         DT_VERS_1_1,    /* D API 1.1.0 Solaris Express 6/05 */
 121         DT_VERS_1_2,    /* D API 1.2.0 Solaris 10 Update 1 */
 122         DT_VERS_1_2_1,  /* D API 1.2.1 Solaris Express 4/06 */
 123         DT_VERS_1_2_2,  /* D API 1.2.2 Solaris Express 6/06 */
 124         DT_VERS_1_3,    /* D API 1.3 Solaris Express 10/06 */
 125         DT_VERS_1_4,    /* D API 1.4 Solaris Express 2/07 */
 126         DT_VERS_1_4_1,  /* D API 1.4.1 Solaris Express 4/07 */
 127         DT_VERS_1_5,    /* D API 1.5 Solaris Express 7/07 */
 128         DT_VERS_1_6,    /* D API 1.6 */
 129         DT_VERS_1_6_1,  /* D API 1.6.1 */
 130         DT_VERS_1_6_2,  /* D API 1.6.2 */
 131         DT_VERS_1_6_3,  /* D API 1.6.3 */
 132         DT_VERS_1_7,    /* D API 1.7 */
 133         DT_VERS_1_7_1,  /* D API 1.7.1 */
 134         DT_VERS_1_8,    /* D API 1.8 */
 135         DT_VERS_1_8_1,  /* D API 1.8.1 */
 136         DT_VERS_1_9,    /* D API 1.9 */
 137         DT_VERS_1_10,   /* D API 1.10 */
 138         DT_VERS_1_11,   /* D API 1.11 -- json(), strtoll() */
 139         0
 140 };
 141 
 142 /*
 143  * Table of global identifiers.  This is used to populate the global identifier
 144  * hash when a new dtrace client open occurs.  For more info see dt_ident.h.
 145  * The global identifiers that represent functions use the dt_idops_func ops
 146  * and specify the private data pointer as a prototype string which is parsed
 147  * when the identifier is first encountered.  These prototypes look like ANSI
 148  * C function prototypes except that the special symbol "@" can be used as a
 149  * wildcard to represent a single parameter of any type (i.e. any dt_node_t).
 150  * The standard "..." notation can also be used to represent varargs.  An empty
 151  * parameter list is taken to mean void (that is, no arguments are permitted).
 152  * A parameter enclosed in square brackets (e.g. "[int]") denotes an optional
 153  * argument.
 154  */
 155 static const dt_ident_t _dtrace_globals[] = {
 156 { "alloca", DT_IDENT_FUNC, 0, DIF_SUBR_ALLOCA, DT_ATTR_STABCMN, DT_VERS_1_0,
 157         &dt_idops_func, "void *(size_t)" },
 158 { "arg0", DT_IDENT_SCALAR, 0, DIF_VAR_ARG0, DT_ATTR_STABCMN, DT_VERS_1_0,




 118 const dt_version_t _dtrace_versions[] = {
 119         DT_VERS_1_0,    /* D API 1.0.0 (PSARC 2001/466) Solaris 10 FCS */
 120         DT_VERS_1_1,    /* D API 1.1.0 Solaris Express 6/05 */
 121         DT_VERS_1_2,    /* D API 1.2.0 Solaris 10 Update 1 */
 122         DT_VERS_1_2_1,  /* D API 1.2.1 Solaris Express 4/06 */
 123         DT_VERS_1_2_2,  /* D API 1.2.2 Solaris Express 6/06 */
 124         DT_VERS_1_3,    /* D API 1.3 Solaris Express 10/06 */
 125         DT_VERS_1_4,    /* D API 1.4 Solaris Express 2/07 */
 126         DT_VERS_1_4_1,  /* D API 1.4.1 Solaris Express 4/07 */
 127         DT_VERS_1_5,    /* D API 1.5 Solaris Express 7/07 */
 128         DT_VERS_1_6,    /* D API 1.6 */
 129         DT_VERS_1_6_1,  /* D API 1.6.1 */
 130         DT_VERS_1_6_2,  /* D API 1.6.2 */
 131         DT_VERS_1_6_3,  /* D API 1.6.3 */
 132         DT_VERS_1_7,    /* D API 1.7 */
 133         DT_VERS_1_7_1,  /* D API 1.7.1 */
 134         DT_VERS_1_8,    /* D API 1.8 */
 135         DT_VERS_1_8_1,  /* D API 1.8.1 */
 136         DT_VERS_1_9,    /* D API 1.9 */
 137         DT_VERS_1_10,   /* D API 1.10 */
 138         DT_VERS_1_11,   /* D API 1.11 */
 139         0
 140 };
 141 
 142 /*
 143  * Table of global identifiers.  This is used to populate the global identifier
 144  * hash when a new dtrace client open occurs.  For more info see dt_ident.h.
 145  * The global identifiers that represent functions use the dt_idops_func ops
 146  * and specify the private data pointer as a prototype string which is parsed
 147  * when the identifier is first encountered.  These prototypes look like ANSI
 148  * C function prototypes except that the special symbol "@" can be used as a
 149  * wildcard to represent a single parameter of any type (i.e. any dt_node_t).
 150  * The standard "..." notation can also be used to represent varargs.  An empty
 151  * parameter list is taken to mean void (that is, no arguments are permitted).
 152  * A parameter enclosed in square brackets (e.g. "[int]") denotes an optional
 153  * argument.
 154  */
 155 static const dt_ident_t _dtrace_globals[] = {
 156 { "alloca", DT_IDENT_FUNC, 0, DIF_SUBR_ALLOCA, DT_ATTR_STABCMN, DT_VERS_1_0,
 157         &dt_idops_func, "void *(size_t)" },
 158 { "arg0", DT_IDENT_SCALAR, 0, DIF_VAR_ARG0, DT_ATTR_STABCMN, DT_VERS_1_0,