8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 * or http://www.opensolaris.org/os/licensing.
10 * See the License for the specific language governing permissions
11 * and limitations under the License.
12 *
13 * When distributing Covered Code, include this CDDL HEADER in each
14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 * If applicable, add the following below this CDDL HEADER, with the
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 2009 Sun Microsystems, Inc. All rights reserved.
24 * Use is subject to license terms.
25 */
26
27 /*
28 * Copyright (c) 2012, Joyent, Inc. All rights reserved.
29 * Copyright (c) 2012 by Delphix. All rights reserved.
30 */
31
32 #ifndef _SYS_DTRACE_H
33 #define _SYS_DTRACE_H
34
35 #ifdef __cplusplus
36 extern "C" {
37 #endif
38
39 /*
40 * DTrace Dynamic Tracing Software: Kernel Interfaces
41 *
42 * Note: The contents of this file are private to the implementation of the
43 * Solaris system and DTrace subsystem and are subject to change at any time
44 * without notice. Applications and drivers using these interfaces will fail
45 * to run on future releases. These interfaces should not be used for any
46 * purpose except those expressly outlined in dtrace(7D) and libdtrace(3LIB).
47 * Please refer to the "Solaris Dynamic Tracing Guide" for more information.
48 */
49
337 #define DIF_REG_R0 0 /* %r0 is always set to zero */
338
339 /*
340 * A DTrace Intermediate Format Type (DIF Type) is used to represent the types
341 * of variables, function and associative array arguments, and the return type
342 * for each DIF object (shown below). It contains a description of the type,
343 * its size in bytes, and a module identifier.
344 */
345 typedef struct dtrace_diftype {
346 uint8_t dtdt_kind; /* type kind (see below) */
347 uint8_t dtdt_ckind; /* type kind in CTF */
348 uint8_t dtdt_flags; /* type flags (see below) */
349 uint8_t dtdt_pad; /* reserved for future use */
350 uint32_t dtdt_size; /* type size in bytes (unless string) */
351 } dtrace_diftype_t;
352
353 #define DIF_TYPE_CTF 0 /* type is a CTF type */
354 #define DIF_TYPE_STRING 1 /* type is a D string */
355
356 #define DIF_TF_BYREF 0x1 /* type is passed by reference */
357
358 /*
359 * A DTrace Intermediate Format variable record is used to describe each of the
360 * variables referenced by a given DIF object. It contains an integer variable
361 * identifier along with variable scope and properties, as shown below. The
362 * size of this structure must be sizeof (int) aligned.
363 */
364 typedef struct dtrace_difv {
365 uint32_t dtdv_name; /* variable name index in dtdo_strtab */
366 uint32_t dtdv_id; /* variable reference identifier */
367 uint8_t dtdv_kind; /* variable kind (see below) */
368 uint8_t dtdv_scope; /* variable scope (see below) */
369 uint16_t dtdv_flags; /* variable flags (see below) */
370 dtrace_diftype_t dtdv_type; /* variable type (see above) */
371 } dtrace_difv_t;
372
373 #define DIFV_KIND_ARRAY 0 /* variable is an array of quantities */
374 #define DIFV_KIND_SCALAR 1 /* variable is a scalar quantity */
375
376 #define DIFV_SCOPE_GLOBAL 0 /* variable has global scope */
|
8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 * or http://www.opensolaris.org/os/licensing.
10 * See the License for the specific language governing permissions
11 * and limitations under the License.
12 *
13 * When distributing Covered Code, include this CDDL HEADER in each
14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 * If applicable, add the following below this CDDL HEADER, with the
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 2009 Sun Microsystems, Inc. All rights reserved.
24 * Use is subject to license terms.
25 */
26
27 /*
28 * Copyright (c) 2013, Joyent, Inc. All rights reserved.
29 * Copyright (c) 2013 by Delphix. All rights reserved.
30 */
31
32 #ifndef _SYS_DTRACE_H
33 #define _SYS_DTRACE_H
34
35 #ifdef __cplusplus
36 extern "C" {
37 #endif
38
39 /*
40 * DTrace Dynamic Tracing Software: Kernel Interfaces
41 *
42 * Note: The contents of this file are private to the implementation of the
43 * Solaris system and DTrace subsystem and are subject to change at any time
44 * without notice. Applications and drivers using these interfaces will fail
45 * to run on future releases. These interfaces should not be used for any
46 * purpose except those expressly outlined in dtrace(7D) and libdtrace(3LIB).
47 * Please refer to the "Solaris Dynamic Tracing Guide" for more information.
48 */
49
337 #define DIF_REG_R0 0 /* %r0 is always set to zero */
338
339 /*
340 * A DTrace Intermediate Format Type (DIF Type) is used to represent the types
341 * of variables, function and associative array arguments, and the return type
342 * for each DIF object (shown below). It contains a description of the type,
343 * its size in bytes, and a module identifier.
344 */
345 typedef struct dtrace_diftype {
346 uint8_t dtdt_kind; /* type kind (see below) */
347 uint8_t dtdt_ckind; /* type kind in CTF */
348 uint8_t dtdt_flags; /* type flags (see below) */
349 uint8_t dtdt_pad; /* reserved for future use */
350 uint32_t dtdt_size; /* type size in bytes (unless string) */
351 } dtrace_diftype_t;
352
353 #define DIF_TYPE_CTF 0 /* type is a CTF type */
354 #define DIF_TYPE_STRING 1 /* type is a D string */
355
356 #define DIF_TF_BYREF 0x1 /* type is passed by reference */
357 #define DIF_TF_BYUREF 0x2 /* user type is passed by reference */
358
359 /*
360 * A DTrace Intermediate Format variable record is used to describe each of the
361 * variables referenced by a given DIF object. It contains an integer variable
362 * identifier along with variable scope and properties, as shown below. The
363 * size of this structure must be sizeof (int) aligned.
364 */
365 typedef struct dtrace_difv {
366 uint32_t dtdv_name; /* variable name index in dtdo_strtab */
367 uint32_t dtdv_id; /* variable reference identifier */
368 uint8_t dtdv_kind; /* variable kind (see below) */
369 uint8_t dtdv_scope; /* variable scope (see below) */
370 uint16_t dtdv_flags; /* variable flags (see below) */
371 dtrace_diftype_t dtdv_type; /* variable type (see above) */
372 } dtrace_difv_t;
373
374 #define DIFV_KIND_ARRAY 0 /* variable is an array of quantities */
375 #define DIFV_KIND_SCALAR 1 /* variable is a scalar quantity */
376
377 #define DIFV_SCOPE_GLOBAL 0 /* variable has global scope */
|