Deleted Added
full compact
dt_open.c (256281) dt_open.c (268578)
1/*
2 * CDDL HEADER START
3 *
4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License (the "License").
6 * You may not use this file except in compliance with the License.
7 *
8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE

--- 7 unchanged lines hidden (view full) ---

16 * fields enclosed by brackets "[]" replaced with your own identifying
17 * information: Portions Copyright [yyyy] [name of copyright owner]
18 *
19 * CDDL HEADER END
20 */
21
22/*
23 * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
1/*
2 * CDDL HEADER START
3 *
4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License (the "License").
6 * You may not use this file except in compliance with the License.
7 *
8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE

--- 7 unchanged lines hidden (view full) ---

16 * fields enclosed by brackets "[]" replaced with your own identifying
17 * information: Portions Copyright [yyyy] [name of copyright owner]
18 *
19 * CDDL HEADER END
20 */
21
22/*
23 * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
24 * Copyright (c) 2011, Joyent, Inc. All rights reserved.
24 * Copyright (c) 2013, Joyent, Inc. All rights reserved.
25 * Copyright (c) 2012 by Delphix. All rights reserved.
26 */
27
28#include <sys/types.h>
29#if defined(sun)
30#include <sys/modctl.h>
31#include <sys/systeminfo.h>
32#endif

--- 84 unchanged lines hidden (view full) ---

117#define DT_VERS_1_6_2 DT_VERSION_NUMBER(1, 6, 2)
118#define DT_VERS_1_6_3 DT_VERSION_NUMBER(1, 6, 3)
119#define DT_VERS_1_7 DT_VERSION_NUMBER(1, 7, 0)
120#define DT_VERS_1_7_1 DT_VERSION_NUMBER(1, 7, 1)
121#define DT_VERS_1_8 DT_VERSION_NUMBER(1, 8, 0)
122#define DT_VERS_1_8_1 DT_VERSION_NUMBER(1, 8, 1)
123#define DT_VERS_1_9 DT_VERSION_NUMBER(1, 9, 0)
124#define DT_VERS_1_9_1 DT_VERSION_NUMBER(1, 9, 1)
25 * Copyright (c) 2012 by Delphix. All rights reserved.
26 */
27
28#include <sys/types.h>
29#if defined(sun)
30#include <sys/modctl.h>
31#include <sys/systeminfo.h>
32#endif

--- 84 unchanged lines hidden (view full) ---

117#define DT_VERS_1_6_2 DT_VERSION_NUMBER(1, 6, 2)
118#define DT_VERS_1_6_3 DT_VERSION_NUMBER(1, 6, 3)
119#define DT_VERS_1_7 DT_VERSION_NUMBER(1, 7, 0)
120#define DT_VERS_1_7_1 DT_VERSION_NUMBER(1, 7, 1)
121#define DT_VERS_1_8 DT_VERSION_NUMBER(1, 8, 0)
122#define DT_VERS_1_8_1 DT_VERSION_NUMBER(1, 8, 1)
123#define DT_VERS_1_9 DT_VERSION_NUMBER(1, 9, 0)
124#define DT_VERS_1_9_1 DT_VERSION_NUMBER(1, 9, 1)
125#define DT_VERS_LATEST DT_VERS_1_9_1
126#define DT_VERS_STRING "Sun D 1.9.1"
125#define DT_VERS_1_10 DT_VERSION_NUMBER(1, 10, 0)
126#define DT_VERS_1_11 DT_VERSION_NUMBER(1, 11, 0)
127#define DT_VERS_1_12 DT_VERSION_NUMBER(1, 12, 0)
128#define DT_VERS_1_12_1 DT_VERSION_NUMBER(1, 12, 1)
129#define DT_VERS_LATEST DT_VERS_1_12_1
130#define DT_VERS_STRING "Sun D 1.12.1"
127
128const dt_version_t _dtrace_versions[] = {
129 DT_VERS_1_0, /* D API 1.0.0 (PSARC 2001/466) Solaris 10 FCS */
130 DT_VERS_1_1, /* D API 1.1.0 Solaris Express 6/05 */
131 DT_VERS_1_2, /* D API 1.2.0 Solaris 10 Update 1 */
132 DT_VERS_1_2_1, /* D API 1.2.1 Solaris Express 4/06 */
133 DT_VERS_1_2_2, /* D API 1.2.2 Solaris Express 6/06 */
134 DT_VERS_1_3, /* D API 1.3 Solaris Express 10/06 */

--- 5 unchanged lines hidden (view full) ---

140 DT_VERS_1_6_2, /* D API 1.6.2 */
141 DT_VERS_1_6_3, /* D API 1.6.3 */
142 DT_VERS_1_7, /* D API 1.7 */
143 DT_VERS_1_7_1, /* D API 1.7.1 */
144 DT_VERS_1_8, /* D API 1.8 */
145 DT_VERS_1_8_1, /* D API 1.8.1 */
146 DT_VERS_1_9, /* D API 1.9 */
147 DT_VERS_1_9_1, /* D API 1.9.1 */
131
132const dt_version_t _dtrace_versions[] = {
133 DT_VERS_1_0, /* D API 1.0.0 (PSARC 2001/466) Solaris 10 FCS */
134 DT_VERS_1_1, /* D API 1.1.0 Solaris Express 6/05 */
135 DT_VERS_1_2, /* D API 1.2.0 Solaris 10 Update 1 */
136 DT_VERS_1_2_1, /* D API 1.2.1 Solaris Express 4/06 */
137 DT_VERS_1_2_2, /* D API 1.2.2 Solaris Express 6/06 */
138 DT_VERS_1_3, /* D API 1.3 Solaris Express 10/06 */

--- 5 unchanged lines hidden (view full) ---

144 DT_VERS_1_6_2, /* D API 1.6.2 */
145 DT_VERS_1_6_3, /* D API 1.6.3 */
146 DT_VERS_1_7, /* D API 1.7 */
147 DT_VERS_1_7_1, /* D API 1.7.1 */
148 DT_VERS_1_8, /* D API 1.8 */
149 DT_VERS_1_8_1, /* D API 1.8.1 */
150 DT_VERS_1_9, /* D API 1.9 */
151 DT_VERS_1_9_1, /* D API 1.9.1 */
152 DT_VERS_1_10, /* D API 1.10 */
153 DT_VERS_1_11, /* D API 1.11 */
154 DT_VERS_1_12, /* D API 1.12 */
155 DT_VERS_1_12_1, /* D API 1.12.1 */
148 0
149};
150
151/*
152 * Global variables that are formatted on FreeBSD based on the kernel file name.
153 */
154#if !defined(sun)
155static char curthread_str[MAXPATHLEN];

--- 114 unchanged lines hidden (view full) ---

270 DT_ATTR_EVOLCMN, DT_VERS_1_0,
271 &dt_idops_func, "genunix`minor_t(genunix`dev_t)" },
272{ "htonl", DT_IDENT_FUNC, 0, DIF_SUBR_HTONL, DT_ATTR_EVOLCMN, DT_VERS_1_3,
273 &dt_idops_func, "uint32_t(uint32_t)" },
274{ "htonll", DT_IDENT_FUNC, 0, DIF_SUBR_HTONLL, DT_ATTR_EVOLCMN, DT_VERS_1_3,
275 &dt_idops_func, "uint64_t(uint64_t)" },
276{ "htons", DT_IDENT_FUNC, 0, DIF_SUBR_HTONS, DT_ATTR_EVOLCMN, DT_VERS_1_3,
277 &dt_idops_func, "uint16_t(uint16_t)" },
156 0
157};
158
159/*
160 * Global variables that are formatted on FreeBSD based on the kernel file name.
161 */
162#if !defined(sun)
163static char curthread_str[MAXPATHLEN];

--- 114 unchanged lines hidden (view full) ---

278 DT_ATTR_EVOLCMN, DT_VERS_1_0,
279 &dt_idops_func, "genunix`minor_t(genunix`dev_t)" },
280{ "htonl", DT_IDENT_FUNC, 0, DIF_SUBR_HTONL, DT_ATTR_EVOLCMN, DT_VERS_1_3,
281 &dt_idops_func, "uint32_t(uint32_t)" },
282{ "htonll", DT_IDENT_FUNC, 0, DIF_SUBR_HTONLL, DT_ATTR_EVOLCMN, DT_VERS_1_3,
283 &dt_idops_func, "uint64_t(uint64_t)" },
284{ "htons", DT_IDENT_FUNC, 0, DIF_SUBR_HTONS, DT_ATTR_EVOLCMN, DT_VERS_1_3,
285 &dt_idops_func, "uint16_t(uint16_t)" },
286{ "getf", DT_IDENT_FUNC, 0, DIF_SUBR_GETF, DT_ATTR_STABCMN, DT_VERS_1_10,
287 &dt_idops_func, "file_t *(int)" },
278{ "gid", DT_IDENT_SCALAR, 0, DIF_VAR_GID, DT_ATTR_STABCMN, DT_VERS_1_0,
279 &dt_idops_type, "gid_t" },
280{ "id", DT_IDENT_SCALAR, 0, DIF_VAR_ID, DT_ATTR_STABCMN, DT_VERS_1_0,
281 &dt_idops_type, "uint_t" },
282{ "index", DT_IDENT_FUNC, 0, DIF_SUBR_INDEX, DT_ATTR_STABCMN, DT_VERS_1_1,
283 &dt_idops_func, "int(const char *, const char *, [int])" },
284{ "inet_ntoa", DT_IDENT_FUNC, 0, DIF_SUBR_INET_NTOA, DT_ATTR_STABCMN,
285#if defined(sun)

--- 6 unchanged lines hidden (view full) ---

292 DT_VERS_1_5, &dt_idops_func, "string(in6_addr_t *)" },
293#else
294 DT_VERS_1_5, &dt_idops_func, "string(struct in6_addr *)" },
295#endif
296{ "inet_ntop", DT_IDENT_FUNC, 0, DIF_SUBR_INET_NTOP, DT_ATTR_STABCMN,
297 DT_VERS_1_5, &dt_idops_func, "string(int, void *)" },
298{ "ipl", DT_IDENT_SCALAR, 0, DIF_VAR_IPL, DT_ATTR_STABCMN, DT_VERS_1_0,
299 &dt_idops_type, "uint_t" },
288{ "gid", DT_IDENT_SCALAR, 0, DIF_VAR_GID, DT_ATTR_STABCMN, DT_VERS_1_0,
289 &dt_idops_type, "gid_t" },
290{ "id", DT_IDENT_SCALAR, 0, DIF_VAR_ID, DT_ATTR_STABCMN, DT_VERS_1_0,
291 &dt_idops_type, "uint_t" },
292{ "index", DT_IDENT_FUNC, 0, DIF_SUBR_INDEX, DT_ATTR_STABCMN, DT_VERS_1_1,
293 &dt_idops_func, "int(const char *, const char *, [int])" },
294{ "inet_ntoa", DT_IDENT_FUNC, 0, DIF_SUBR_INET_NTOA, DT_ATTR_STABCMN,
295#if defined(sun)

--- 6 unchanged lines hidden (view full) ---

302 DT_VERS_1_5, &dt_idops_func, "string(in6_addr_t *)" },
303#else
304 DT_VERS_1_5, &dt_idops_func, "string(struct in6_addr *)" },
305#endif
306{ "inet_ntop", DT_IDENT_FUNC, 0, DIF_SUBR_INET_NTOP, DT_ATTR_STABCMN,
307 DT_VERS_1_5, &dt_idops_func, "string(int, void *)" },
308{ "ipl", DT_IDENT_SCALAR, 0, DIF_VAR_IPL, DT_ATTR_STABCMN, DT_VERS_1_0,
309 &dt_idops_type, "uint_t" },
310{ "json", DT_IDENT_FUNC, 0, DIF_SUBR_JSON, DT_ATTR_STABCMN, DT_VERS_1_11,
311 &dt_idops_func, "string(const char *, const char *)" },
300{ "jstack", DT_IDENT_ACTFUNC, 0, DT_ACT_JSTACK, DT_ATTR_STABCMN, DT_VERS_1_0,
301 &dt_idops_func, "stack(...)" },
302{ "lltostr", DT_IDENT_FUNC, 0, DIF_SUBR_LLTOSTR, DT_ATTR_STABCMN, DT_VERS_1_0,
303 &dt_idops_func, "string(int64_t, [int])" },
304{ "llquantize", DT_IDENT_AGGFUNC, 0, DTRACEAGG_LLQUANTIZE, DT_ATTR_STABCMN,
305 DT_VERS_1_7, &dt_idops_func,
306 "void(@, int32_t, int32_t, int32_t, int32_t, ...)" },
307{ "lquantize", DT_IDENT_AGGFUNC, 0, DTRACEAGG_LQUANTIZE,

--- 131 unchanged lines hidden (view full) ---

439{ "strjoin", DT_IDENT_FUNC, 0, DIF_SUBR_STRJOIN, DT_ATTR_STABCMN, DT_VERS_1_0,
440 &dt_idops_func, "string(const char *, const char *)" },
441{ "strrchr", DT_IDENT_FUNC, 0, DIF_SUBR_STRRCHR, DT_ATTR_STABCMN, DT_VERS_1_1,
442 &dt_idops_func, "string(const char *, char)" },
443{ "strstr", DT_IDENT_FUNC, 0, DIF_SUBR_STRSTR, DT_ATTR_STABCMN, DT_VERS_1_1,
444 &dt_idops_func, "string(const char *, const char *)" },
445{ "strtok", DT_IDENT_FUNC, 0, DIF_SUBR_STRTOK, DT_ATTR_STABCMN, DT_VERS_1_1,
446 &dt_idops_func, "string(const char *, const char *)" },
312{ "jstack", DT_IDENT_ACTFUNC, 0, DT_ACT_JSTACK, DT_ATTR_STABCMN, DT_VERS_1_0,
313 &dt_idops_func, "stack(...)" },
314{ "lltostr", DT_IDENT_FUNC, 0, DIF_SUBR_LLTOSTR, DT_ATTR_STABCMN, DT_VERS_1_0,
315 &dt_idops_func, "string(int64_t, [int])" },
316{ "llquantize", DT_IDENT_AGGFUNC, 0, DTRACEAGG_LLQUANTIZE, DT_ATTR_STABCMN,
317 DT_VERS_1_7, &dt_idops_func,
318 "void(@, int32_t, int32_t, int32_t, int32_t, ...)" },
319{ "lquantize", DT_IDENT_AGGFUNC, 0, DTRACEAGG_LQUANTIZE,

--- 131 unchanged lines hidden (view full) ---

451{ "strjoin", DT_IDENT_FUNC, 0, DIF_SUBR_STRJOIN, DT_ATTR_STABCMN, DT_VERS_1_0,
452 &dt_idops_func, "string(const char *, const char *)" },
453{ "strrchr", DT_IDENT_FUNC, 0, DIF_SUBR_STRRCHR, DT_ATTR_STABCMN, DT_VERS_1_1,
454 &dt_idops_func, "string(const char *, char)" },
455{ "strstr", DT_IDENT_FUNC, 0, DIF_SUBR_STRSTR, DT_ATTR_STABCMN, DT_VERS_1_1,
456 &dt_idops_func, "string(const char *, const char *)" },
457{ "strtok", DT_IDENT_FUNC, 0, DIF_SUBR_STRTOK, DT_ATTR_STABCMN, DT_VERS_1_1,
458 &dt_idops_func, "string(const char *, const char *)" },
459{ "strtoll", DT_IDENT_FUNC, 0, DIF_SUBR_STRTOLL, DT_ATTR_STABCMN, DT_VERS_1_11,
460 &dt_idops_func, "int64_t(const char *, [int])" },
447{ "substr", DT_IDENT_FUNC, 0, DIF_SUBR_SUBSTR, DT_ATTR_STABCMN, DT_VERS_1_1,
448 &dt_idops_func, "string(const char *, int, [int])" },
449{ "sum", DT_IDENT_AGGFUNC, 0, DTRACEAGG_SUM, DT_ATTR_STABCMN, DT_VERS_1_0,
450 &dt_idops_func, "void(@)" },
451#if !defined(sun)
452{ "sx_isexclusive", DT_IDENT_FUNC, 0, DIF_SUBR_SX_ISEXCLUSIVE,
453 DT_ATTR_EVOLCMN, DT_VERS_1_0,
454 &dt_idops_func, sxlock_str },

--- 688 unchanged lines hidden (view full) ---

1143 dtp->dt_prcmode = DT_PROC_STOP_PREINIT;
1144#else
1145 dtp->dt_prcmode = DT_PROC_STOP_MAIN;
1146#endif
1147 dtp->dt_linkmode = DT_LINK_KERNEL;
1148 dtp->dt_linktype = DT_LTYP_ELF;
1149 dtp->dt_xlatemode = DT_XL_STATIC;
1150 dtp->dt_stdcmode = DT_STDC_XA;
461{ "substr", DT_IDENT_FUNC, 0, DIF_SUBR_SUBSTR, DT_ATTR_STABCMN, DT_VERS_1_1,
462 &dt_idops_func, "string(const char *, int, [int])" },
463{ "sum", DT_IDENT_AGGFUNC, 0, DTRACEAGG_SUM, DT_ATTR_STABCMN, DT_VERS_1_0,
464 &dt_idops_func, "void(@)" },
465#if !defined(sun)
466{ "sx_isexclusive", DT_IDENT_FUNC, 0, DIF_SUBR_SX_ISEXCLUSIVE,
467 DT_ATTR_EVOLCMN, DT_VERS_1_0,
468 &dt_idops_func, sxlock_str },

--- 688 unchanged lines hidden (view full) ---

1157 dtp->dt_prcmode = DT_PROC_STOP_PREINIT;
1158#else
1159 dtp->dt_prcmode = DT_PROC_STOP_MAIN;
1160#endif
1161 dtp->dt_linkmode = DT_LINK_KERNEL;
1162 dtp->dt_linktype = DT_LTYP_ELF;
1163 dtp->dt_xlatemode = DT_XL_STATIC;
1164 dtp->dt_stdcmode = DT_STDC_XA;
1165 dtp->dt_encoding = DT_ENCODING_UNSET;
1151 dtp->dt_version = version;
1152 dtp->dt_fd = dtfd;
1153 dtp->dt_ftfd = ftfd;
1154 dtp->dt_fterr = fterr;
1155 dtp->dt_cdefs_fd = -1;
1156 dtp->dt_ddefs_fd = -1;
1157#if defined(sun)
1158 dtp->dt_stdout_fd = -1;

--- 527 unchanged lines hidden ---
1166 dtp->dt_version = version;
1167 dtp->dt_fd = dtfd;
1168 dtp->dt_ftfd = ftfd;
1169 dtp->dt_fterr = fterr;
1170 dtp->dt_cdefs_fd = -1;
1171 dtp->dt_ddefs_fd = -1;
1172#if defined(sun)
1173 dtp->dt_stdout_fd = -1;

--- 527 unchanged lines hidden ---