/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License, Version 1.0 only
* (the "License"). You may not use this file except in compliance
* with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright 1994,2003 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#ifndef _SYS_TNF_WRITER_H
#define _SYS_TNF_WRITER_H
#pragma ident "%Z%%M% %I% %E% SMI"
/*
* Public interface for writing predefined TNF types
*/
#ifdef __cplusplus
extern "C" {
#endif
/*
* Defines
*/
/*
* Typedefs
*/
/*
* In-memory reader's classification of TNF types
*/
typedef enum {
TNF_UNKNOWN = 0,
#ifdef _LP64
#else
#endif
/*
* Structures
*/
struct _tnf_tag_version {
};
struct _tnf_tag_data {
};
/*
* TNF tag version
* A client can scan a binary's relocation table for data relocation
* entries corresponding to __tnf_tag_version_1. These identify
* tags. The actual version information is stored in an associated
* structure called __tnf_tag_version_1_info
*/
extern tnf_tag_version_t __tnf_tag_version_1;
/*
* TNF primitive types
*/
extern tnf_tag_data_t *tnf_char_tag_data;
extern tnf_tag_data_t *tnf_int8_tag_data;
extern tnf_tag_data_t *tnf_uint8_tag_data;
extern tnf_tag_data_t *tnf_int16_tag_data;
extern tnf_tag_data_t *tnf_uint16_tag_data;
extern tnf_tag_data_t *tnf_int32_tag_data;
extern tnf_tag_data_t *tnf_uint32_tag_data;
extern tnf_tag_data_t *tnf_int64_tag_data;
extern tnf_tag_data_t *tnf_uint64_tag_data;
extern tnf_tag_data_t *tnf_float32_tag_data;
extern tnf_tag_data_t *tnf_float64_tag_data;
/*
* ``Portable'' primitive types
* These are defined as the well-defined TNF types they map into.
* XXX Machine-dependent
*/
#if defined(_LP64)
#else
#endif /* defined(_LP64) */
/*
* Derived and aggregate TNF types
*/
/* Not explicitly represented in type system */
extern tnf_tag_data_t *tnf_tag_tag_data;
extern tnf_tag_data_t *tnf_string_tag_data;
extern tnf_tag_data_t *tnf_name_tag_data;
extern tnf_tag_data_t *tnf_size_tag_data;
extern tnf_tag_data_t *tnf_opaque_tag_data;
#if defined(_LP64)
((tnf_uint64_t)(item))
#else
((tnf_uint32_t)(item))
#endif /* defined(_LP64) */
/*
* TNF types for tracing
*/
extern tnf_tag_data_t *tnf_time_base_tag_data;
extern tnf_tag_data_t *tnf_time_delta_tag_data;
extern tnf_tag_data_t *tnf_probe_event_tag_data;
/* process ID */
extern tnf_tag_data_t *tnf_pid_tag_data;
/* LWP ID */
extern tnf_tag_data_t *tnf_lwpid_tag_data;
#ifdef _KERNEL
/* kernel thread ID */
extern tnf_tag_data_t *tnf_kthread_id_tag_data;
/* processor ID */
extern tnf_tag_data_t *tnf_cpuid_tag_data;
/* device ID */
extern tnf_tag_data_t *tnf_device_tag_data;
/* kernel symbol */
extern tnf_tag_data_t *tnf_symbol_tag_data;
/* array of symbols */
extern tnf_tag_data_t *tnf_symbols_tag_data;
#if defined(__sparc)
#else /* defined(__sparc) */
#endif /* defined(__sparc) */
/* system call number */
extern tnf_tag_data_t *tnf_sysnum_tag_data;
/* thread microstate XXX enum */
/* XXX should have a new type tnf_enum of appropriate size to map C enum's */
/* XXX cast below is to avoid lint warnings */
extern tnf_tag_data_t *tnf_microstate_tag_data;
/* file offset */
extern tnf_tag_data_t *tnf_offset_tag_data;
/* address fault type XXX enum */
/* XXX should have a new type tnf_enum of appropriate size to map C enum's */
/* XXX cast below is to avoid lint warnings */
extern tnf_tag_data_t *tnf_fault_type_tag_data;
/* segment access type XXX enum */
/* XXX should have a new type tnf_enum of appropriate size to map C enum's */
/* XXX cast below is to avoid lint warnings */
extern tnf_tag_data_t *tnf_seg_access_tag_data;
/* buffered I/O flags */
extern tnf_tag_data_t *tnf_bioflags_tag_data;
/* disk block addresses */
extern tnf_tag_data_t *tnf_diskaddr_tag_data;
#endif /* _KERNEL */
/*
* Type extension interface
*/
extern tnf_tag_data_t ***tnf_user_struct_properties;
/*
* Data encoders
*/
const char *,
tnf_tag_data_t *);
#ifdef _KERNEL
tnf_opaque_t *,
tnf_tag_data_t *);
#ifdef __sparc
tnf_uint32_t *,
tnf_tag_data_t *);
#endif /* __sparc */
#endif /* _KERNEL */
/*
* Tag descriptors
*/
/*
* Buffer memory allocator
*/
/*
* Weak symbol definitions to allow unprobed operation
*/
#if !defined(_KERNEL) && !defined(_TNF_LIBRARY)
#pragma weak __tnf_tag_version_1_info
#pragma weak tnf_char_tag_data
#pragma weak tnf_int8_tag_data
#pragma weak tnf_uint8_tag_data
#pragma weak tnf_int16_tag_data
#pragma weak tnf_uint16_tag_data
#pragma weak tnf_int32_tag_data
#pragma weak tnf_uint32_tag_data
#pragma weak tnf_int64_tag_data
#pragma weak tnf_uint64_tag_data
#pragma weak tnf_float32_tag_data
#pragma weak tnf_float64_tag_data
#pragma weak tnf_tag_tag_data
#pragma weak tnf_string_tag_data
#pragma weak tnf_name_tag_data
#pragma weak tnf_opaque_tag_data
#pragma weak tnf_size_tag_data
#pragma weak tnf_probe_event_tag_data
#pragma weak tnf_time_delta_tag_data
#pragma weak tnf_user_struct_properties
#pragma weak tnf_ref32_1
#pragma weak tnf_string_1
#pragma weak tnf_struct_tag_1
#pragma weak tnf_allocate
#endif /* !defined(_KERNEL) || !defined(_TNF_LIBRARY) */
#ifdef __cplusplus
}
#endif
#endif /* _SYS_TNF_WRITER_H */