Print this page
4477 DTrace should speak JSON
Reviewed by: Bryan Cantrill <bmc@joyent.com>


  95 #define DT_VERS_1_0     DT_VERSION_NUMBER(1, 0, 0)
  96 #define DT_VERS_1_1     DT_VERSION_NUMBER(1, 1, 0)
  97 #define DT_VERS_1_2     DT_VERSION_NUMBER(1, 2, 0)
  98 #define DT_VERS_1_2_1   DT_VERSION_NUMBER(1, 2, 1)
  99 #define DT_VERS_1_2_2   DT_VERSION_NUMBER(1, 2, 2)
 100 #define DT_VERS_1_3     DT_VERSION_NUMBER(1, 3, 0)
 101 #define DT_VERS_1_4     DT_VERSION_NUMBER(1, 4, 0)
 102 #define DT_VERS_1_4_1   DT_VERSION_NUMBER(1, 4, 1)
 103 #define DT_VERS_1_5     DT_VERSION_NUMBER(1, 5, 0)
 104 #define DT_VERS_1_6     DT_VERSION_NUMBER(1, 6, 0)
 105 #define DT_VERS_1_6_1   DT_VERSION_NUMBER(1, 6, 1)
 106 #define DT_VERS_1_6_2   DT_VERSION_NUMBER(1, 6, 2)
 107 #define DT_VERS_1_6_3   DT_VERSION_NUMBER(1, 6, 3)
 108 #define DT_VERS_1_7     DT_VERSION_NUMBER(1, 7, 0)
 109 #define DT_VERS_1_7_1   DT_VERSION_NUMBER(1, 7, 1)
 110 #define DT_VERS_1_8     DT_VERSION_NUMBER(1, 8, 0)
 111 #define DT_VERS_1_8_1   DT_VERSION_NUMBER(1, 8, 1)
 112 #define DT_VERS_1_9     DT_VERSION_NUMBER(1, 9, 0)
 113 #define DT_VERS_1_9_1   DT_VERSION_NUMBER(1, 9, 1)
 114 #define DT_VERS_1_10    DT_VERSION_NUMBER(1, 10, 0)
 115 #define DT_VERS_LATEST  DT_VERS_1_10
 116 #define DT_VERS_STRING  "Sun D 1.10"

 117 
 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_9_1,  /* D API 1.9.1 */
 138         DT_VERS_1_10,   /* D API 1.10 */

 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,


 248 { "htonll", DT_IDENT_FUNC, 0, DIF_SUBR_HTONLL, DT_ATTR_EVOLCMN, DT_VERS_1_3,
 249         &dt_idops_func, "uint64_t(uint64_t)" },
 250 { "htons", DT_IDENT_FUNC, 0, DIF_SUBR_HTONS, DT_ATTR_EVOLCMN, DT_VERS_1_3,
 251         &dt_idops_func, "uint16_t(uint16_t)" },
 252 { "getf", DT_IDENT_FUNC, 0, DIF_SUBR_GETF, DT_ATTR_STABCMN, DT_VERS_1_10,
 253         &dt_idops_func, "file_t *(int)" },
 254 { "gid", DT_IDENT_SCALAR, 0, DIF_VAR_GID, DT_ATTR_STABCMN, DT_VERS_1_0,
 255         &dt_idops_type, "gid_t" },
 256 { "id", DT_IDENT_SCALAR, 0, DIF_VAR_ID, DT_ATTR_STABCMN, DT_VERS_1_0,
 257         &dt_idops_type, "uint_t" },
 258 { "index", DT_IDENT_FUNC, 0, DIF_SUBR_INDEX, DT_ATTR_STABCMN, DT_VERS_1_1,
 259         &dt_idops_func, "int(const char *, const char *, [int])" },
 260 { "inet_ntoa", DT_IDENT_FUNC, 0, DIF_SUBR_INET_NTOA, DT_ATTR_STABCMN,
 261         DT_VERS_1_5, &dt_idops_func, "string(ipaddr_t *)" },
 262 { "inet_ntoa6", DT_IDENT_FUNC, 0, DIF_SUBR_INET_NTOA6, DT_ATTR_STABCMN,
 263         DT_VERS_1_5, &dt_idops_func, "string(in6_addr_t *)" },
 264 { "inet_ntop", DT_IDENT_FUNC, 0, DIF_SUBR_INET_NTOP, DT_ATTR_STABCMN,
 265         DT_VERS_1_5, &dt_idops_func, "string(int, void *)" },
 266 { "ipl", DT_IDENT_SCALAR, 0, DIF_VAR_IPL, DT_ATTR_STABCMN, DT_VERS_1_0,
 267         &dt_idops_type, "uint_t" },


 268 { "jstack", DT_IDENT_ACTFUNC, 0, DT_ACT_JSTACK, DT_ATTR_STABCMN, DT_VERS_1_0,
 269         &dt_idops_func, "stack(...)" },
 270 { "lltostr", DT_IDENT_FUNC, 0, DIF_SUBR_LLTOSTR, DT_ATTR_STABCMN, DT_VERS_1_0,
 271         &dt_idops_func, "string(int64_t, [int])" },
 272 { "llquantize", DT_IDENT_AGGFUNC, 0, DTRACEAGG_LLQUANTIZE, DT_ATTR_STABCMN,
 273         DT_VERS_1_7, &dt_idops_func,
 274         "void(@, int32_t, int32_t, int32_t, int32_t, ...)" },
 275 { "lquantize", DT_IDENT_AGGFUNC, 0, DTRACEAGG_LQUANTIZE,
 276         DT_ATTR_STABCMN, DT_VERS_1_0,
 277         &dt_idops_func, "void(@, int32_t, int32_t, ...)" },
 278 { "max", DT_IDENT_AGGFUNC, 0, DTRACEAGG_MAX, DT_ATTR_STABCMN, DT_VERS_1_0,
 279         &dt_idops_func, "void(@)" },
 280 { "min", DT_IDENT_AGGFUNC, 0, DTRACEAGG_MIN, DT_ATTR_STABCMN, DT_VERS_1_0,
 281         &dt_idops_func, "void(@)" },
 282 { "mod", DT_IDENT_ACTFUNC, 0, DT_ACT_MOD, DT_ATTR_STABCMN,
 283         DT_VERS_1_2, &dt_idops_func, "_symaddr(uintptr_t)" },
 284 { "msgdsize", DT_IDENT_FUNC, 0, DIF_SUBR_MSGDSIZE,
 285         DT_ATTR_STABCMN, DT_VERS_1_0,
 286         &dt_idops_func, "size_t(mblk_t *)" },
 287 { "msgsize", DT_IDENT_FUNC, 0, DIF_SUBR_MSGSIZE,


 362         &dt_idops_func, "stack(...)" },
 363 { "stackdepth", DT_IDENT_SCALAR, 0, DIF_VAR_STACKDEPTH,
 364         DT_ATTR_STABCMN, DT_VERS_1_0,
 365         &dt_idops_type, "uint32_t" },
 366 { "stddev", DT_IDENT_AGGFUNC, 0, DTRACEAGG_STDDEV, DT_ATTR_STABCMN,
 367         DT_VERS_1_6, &dt_idops_func, "void(@)" },
 368 { "stop", DT_IDENT_ACTFUNC, 0, DT_ACT_STOP, DT_ATTR_STABCMN, DT_VERS_1_0,
 369         &dt_idops_func, "void()" },
 370 { "strchr", DT_IDENT_FUNC, 0, DIF_SUBR_STRCHR, DT_ATTR_STABCMN, DT_VERS_1_1,
 371         &dt_idops_func, "string(const char *, char)" },
 372 { "strlen", DT_IDENT_FUNC, 0, DIF_SUBR_STRLEN, DT_ATTR_STABCMN, DT_VERS_1_0,
 373         &dt_idops_func, "size_t(const char *)" },
 374 { "strjoin", DT_IDENT_FUNC, 0, DIF_SUBR_STRJOIN, DT_ATTR_STABCMN, DT_VERS_1_0,
 375         &dt_idops_func, "string(const char *, const char *)" },
 376 { "strrchr", DT_IDENT_FUNC, 0, DIF_SUBR_STRRCHR, DT_ATTR_STABCMN, DT_VERS_1_1,
 377         &dt_idops_func, "string(const char *, char)" },
 378 { "strstr", DT_IDENT_FUNC, 0, DIF_SUBR_STRSTR, DT_ATTR_STABCMN, DT_VERS_1_1,
 379         &dt_idops_func, "string(const char *, const char *)" },
 380 { "strtok", DT_IDENT_FUNC, 0, DIF_SUBR_STRTOK, DT_ATTR_STABCMN, DT_VERS_1_1,
 381         &dt_idops_func, "string(const char *, const char *)" },


 382 { "substr", DT_IDENT_FUNC, 0, DIF_SUBR_SUBSTR, DT_ATTR_STABCMN, DT_VERS_1_1,
 383         &dt_idops_func, "string(const char *, int, [int])" },
 384 { "sum", DT_IDENT_AGGFUNC, 0, DTRACEAGG_SUM, DT_ATTR_STABCMN, DT_VERS_1_0,
 385         &dt_idops_func, "void(@)" },
 386 { "sym", DT_IDENT_ACTFUNC, 0, DT_ACT_SYM, DT_ATTR_STABCMN,
 387         DT_VERS_1_2, &dt_idops_func, "_symaddr(uintptr_t)" },
 388 { "system", DT_IDENT_ACTFUNC, 0, DT_ACT_SYSTEM, DT_ATTR_STABCMN, DT_VERS_1_0,
 389         &dt_idops_func, "void(@, ...)" },
 390 { "this", DT_IDENT_PTR, 0, 0, DT_ATTR_STABCMN, DT_VERS_1_0,
 391         &dt_idops_type, "void" },
 392 { "tid", DT_IDENT_SCALAR, 0, DIF_VAR_TID, DT_ATTR_STABCMN, DT_VERS_1_0,
 393         &dt_idops_type, "id_t" },
 394 { "timestamp", DT_IDENT_SCALAR, 0, DIF_VAR_TIMESTAMP,
 395         DT_ATTR_STABCMN, DT_VERS_1_0,
 396         &dt_idops_type, "uint64_t" },
 397 { "tolower", DT_IDENT_FUNC, 0, DIF_SUBR_TOLOWER, DT_ATTR_STABCMN, DT_VERS_1_8,
 398         &dt_idops_func, "string(const char *)" },
 399 { "toupper", DT_IDENT_FUNC, 0, DIF_SUBR_TOUPPER, DT_ATTR_STABCMN, DT_VERS_1_8,
 400         &dt_idops_func, "string(const char *)" },
 401 { "trace", DT_IDENT_ACTFUNC, 0, DT_ACT_TRACE, DT_ATTR_STABCMN, DT_VERS_1_0,




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


 250 { "htonll", DT_IDENT_FUNC, 0, DIF_SUBR_HTONLL, DT_ATTR_EVOLCMN, DT_VERS_1_3,
 251         &dt_idops_func, "uint64_t(uint64_t)" },
 252 { "htons", DT_IDENT_FUNC, 0, DIF_SUBR_HTONS, DT_ATTR_EVOLCMN, DT_VERS_1_3,
 253         &dt_idops_func, "uint16_t(uint16_t)" },
 254 { "getf", DT_IDENT_FUNC, 0, DIF_SUBR_GETF, DT_ATTR_STABCMN, DT_VERS_1_10,
 255         &dt_idops_func, "file_t *(int)" },
 256 { "gid", DT_IDENT_SCALAR, 0, DIF_VAR_GID, DT_ATTR_STABCMN, DT_VERS_1_0,
 257         &dt_idops_type, "gid_t" },
 258 { "id", DT_IDENT_SCALAR, 0, DIF_VAR_ID, DT_ATTR_STABCMN, DT_VERS_1_0,
 259         &dt_idops_type, "uint_t" },
 260 { "index", DT_IDENT_FUNC, 0, DIF_SUBR_INDEX, DT_ATTR_STABCMN, DT_VERS_1_1,
 261         &dt_idops_func, "int(const char *, const char *, [int])" },
 262 { "inet_ntoa", DT_IDENT_FUNC, 0, DIF_SUBR_INET_NTOA, DT_ATTR_STABCMN,
 263         DT_VERS_1_5, &dt_idops_func, "string(ipaddr_t *)" },
 264 { "inet_ntoa6", DT_IDENT_FUNC, 0, DIF_SUBR_INET_NTOA6, DT_ATTR_STABCMN,
 265         DT_VERS_1_5, &dt_idops_func, "string(in6_addr_t *)" },
 266 { "inet_ntop", DT_IDENT_FUNC, 0, DIF_SUBR_INET_NTOP, DT_ATTR_STABCMN,
 267         DT_VERS_1_5, &dt_idops_func, "string(int, void *)" },
 268 { "ipl", DT_IDENT_SCALAR, 0, DIF_VAR_IPL, DT_ATTR_STABCMN, DT_VERS_1_0,
 269         &dt_idops_type, "uint_t" },
 270 { "json", DT_IDENT_FUNC, 0, DIF_SUBR_JSON, DT_ATTR_STABCMN, DT_VERS_1_11,
 271         &dt_idops_func, "string(const char *, const char *)" },
 272 { "jstack", DT_IDENT_ACTFUNC, 0, DT_ACT_JSTACK, DT_ATTR_STABCMN, DT_VERS_1_0,
 273         &dt_idops_func, "stack(...)" },
 274 { "lltostr", DT_IDENT_FUNC, 0, DIF_SUBR_LLTOSTR, DT_ATTR_STABCMN, DT_VERS_1_0,
 275         &dt_idops_func, "string(int64_t, [int])" },
 276 { "llquantize", DT_IDENT_AGGFUNC, 0, DTRACEAGG_LLQUANTIZE, DT_ATTR_STABCMN,
 277         DT_VERS_1_7, &dt_idops_func,
 278         "void(@, int32_t, int32_t, int32_t, int32_t, ...)" },
 279 { "lquantize", DT_IDENT_AGGFUNC, 0, DTRACEAGG_LQUANTIZE,
 280         DT_ATTR_STABCMN, DT_VERS_1_0,
 281         &dt_idops_func, "void(@, int32_t, int32_t, ...)" },
 282 { "max", DT_IDENT_AGGFUNC, 0, DTRACEAGG_MAX, DT_ATTR_STABCMN, DT_VERS_1_0,
 283         &dt_idops_func, "void(@)" },
 284 { "min", DT_IDENT_AGGFUNC, 0, DTRACEAGG_MIN, DT_ATTR_STABCMN, DT_VERS_1_0,
 285         &dt_idops_func, "void(@)" },
 286 { "mod", DT_IDENT_ACTFUNC, 0, DT_ACT_MOD, DT_ATTR_STABCMN,
 287         DT_VERS_1_2, &dt_idops_func, "_symaddr(uintptr_t)" },
 288 { "msgdsize", DT_IDENT_FUNC, 0, DIF_SUBR_MSGDSIZE,
 289         DT_ATTR_STABCMN, DT_VERS_1_0,
 290         &dt_idops_func, "size_t(mblk_t *)" },
 291 { "msgsize", DT_IDENT_FUNC, 0, DIF_SUBR_MSGSIZE,


 366         &dt_idops_func, "stack(...)" },
 367 { "stackdepth", DT_IDENT_SCALAR, 0, DIF_VAR_STACKDEPTH,
 368         DT_ATTR_STABCMN, DT_VERS_1_0,
 369         &dt_idops_type, "uint32_t" },
 370 { "stddev", DT_IDENT_AGGFUNC, 0, DTRACEAGG_STDDEV, DT_ATTR_STABCMN,
 371         DT_VERS_1_6, &dt_idops_func, "void(@)" },
 372 { "stop", DT_IDENT_ACTFUNC, 0, DT_ACT_STOP, DT_ATTR_STABCMN, DT_VERS_1_0,
 373         &dt_idops_func, "void()" },
 374 { "strchr", DT_IDENT_FUNC, 0, DIF_SUBR_STRCHR, DT_ATTR_STABCMN, DT_VERS_1_1,
 375         &dt_idops_func, "string(const char *, char)" },
 376 { "strlen", DT_IDENT_FUNC, 0, DIF_SUBR_STRLEN, DT_ATTR_STABCMN, DT_VERS_1_0,
 377         &dt_idops_func, "size_t(const char *)" },
 378 { "strjoin", DT_IDENT_FUNC, 0, DIF_SUBR_STRJOIN, DT_ATTR_STABCMN, DT_VERS_1_0,
 379         &dt_idops_func, "string(const char *, const char *)" },
 380 { "strrchr", DT_IDENT_FUNC, 0, DIF_SUBR_STRRCHR, DT_ATTR_STABCMN, DT_VERS_1_1,
 381         &dt_idops_func, "string(const char *, char)" },
 382 { "strstr", DT_IDENT_FUNC, 0, DIF_SUBR_STRSTR, DT_ATTR_STABCMN, DT_VERS_1_1,
 383         &dt_idops_func, "string(const char *, const char *)" },
 384 { "strtok", DT_IDENT_FUNC, 0, DIF_SUBR_STRTOK, DT_ATTR_STABCMN, DT_VERS_1_1,
 385         &dt_idops_func, "string(const char *, const char *)" },
 386 { "strtoll", DT_IDENT_FUNC, 0, DIF_SUBR_STRTOLL, DT_ATTR_STABCMN, DT_VERS_1_11,
 387         &dt_idops_func, "int64_t(const char *, [int])" },
 388 { "substr", DT_IDENT_FUNC, 0, DIF_SUBR_SUBSTR, DT_ATTR_STABCMN, DT_VERS_1_1,
 389         &dt_idops_func, "string(const char *, int, [int])" },
 390 { "sum", DT_IDENT_AGGFUNC, 0, DTRACEAGG_SUM, DT_ATTR_STABCMN, DT_VERS_1_0,
 391         &dt_idops_func, "void(@)" },
 392 { "sym", DT_IDENT_ACTFUNC, 0, DT_ACT_SYM, DT_ATTR_STABCMN,
 393         DT_VERS_1_2, &dt_idops_func, "_symaddr(uintptr_t)" },
 394 { "system", DT_IDENT_ACTFUNC, 0, DT_ACT_SYSTEM, DT_ATTR_STABCMN, DT_VERS_1_0,
 395         &dt_idops_func, "void(@, ...)" },
 396 { "this", DT_IDENT_PTR, 0, 0, DT_ATTR_STABCMN, DT_VERS_1_0,
 397         &dt_idops_type, "void" },
 398 { "tid", DT_IDENT_SCALAR, 0, DIF_VAR_TID, DT_ATTR_STABCMN, DT_VERS_1_0,
 399         &dt_idops_type, "id_t" },
 400 { "timestamp", DT_IDENT_SCALAR, 0, DIF_VAR_TIMESTAMP,
 401         DT_ATTR_STABCMN, DT_VERS_1_0,
 402         &dt_idops_type, "uint64_t" },
 403 { "tolower", DT_IDENT_FUNC, 0, DIF_SUBR_TOLOWER, DT_ATTR_STABCMN, DT_VERS_1_8,
 404         &dt_idops_func, "string(const char *)" },
 405 { "toupper", DT_IDENT_FUNC, 0, DIF_SUBR_TOUPPER, DT_ATTR_STABCMN, DT_VERS_1_8,
 406         &dt_idops_func, "string(const char *)" },
 407 { "trace", DT_IDENT_ACTFUNC, 0, DT_ACT_TRACE, DT_ATTR_STABCMN, DT_VERS_1_0,