Changeset View
Changeset View
Standalone View
Standalone View
sys/cddl/contrib/opensolaris/uts/common/sys/dtrace.h
| Show First 20 Lines • Show All 45 Lines • ▼ Show 20 Lines | |||||
| * purpose except those expressly outlined in dtrace(7D) and libdtrace(3LIB). | * purpose except those expressly outlined in dtrace(7D) and libdtrace(3LIB). | ||||
| * Please refer to the "Solaris Dynamic Tracing Guide" for more information. | * Please refer to the "Solaris Dynamic Tracing Guide" for more information. | ||||
| */ | */ | ||||
| #ifndef _ASM | #ifndef _ASM | ||||
| #include <sys/param.h> | #include <sys/param.h> | ||||
| #include <sys/stdint.h> | #include <sys/stdint.h> | ||||
| #include <sys/types.h> | |||||
mhorne: The presence of `sys/param.h` makes the include of `sys/types.h` redundant. Per style(9), only… | |||||
| #if defined(__i386) || defined(__amd64) || defined (__riscv) | |||||
| extern int dtrace_instr_size(uint8_t *instr); | |||||
| #endif | |||||
Done Inline ActionsWhy did you move this above all of the #includes? Typically includes will come first. markj: Why did you move this above all of the #includes? Typically includes will come first. | |||||
| #ifdef _KERNEL | #ifdef _KERNEL | ||||
| #include <sys/endian.h> | #include <sys/endian.h> | ||||
| #endif | #endif | ||||
| #if !defined(IN_BASE) && !defined(_KERNEL) | #if !defined(IN_BASE) && !defined(_KERNEL) | ||||
| /* Compatibility types to allow including the CTF API */ | /* Compatibility types to allow including the CTF API */ | ||||
| typedef unsigned int zoneid_t; | typedef unsigned int zoneid_t; | ||||
| typedef unsigned char uchar_t; | typedef unsigned char uchar_t; | ||||
| typedef unsigned short ushort_t; | typedef unsigned short ushort_t; | ||||
| typedef unsigned int uint_t; | typedef unsigned int uint_t; | ||||
| typedef unsigned long ulong_t; | typedef unsigned long ulong_t; | ||||
| typedef int processorid_t; | typedef int processorid_t; | ||||
| #else | #else | ||||
| #include <sys/modctl.h> | #include <sys/modctl.h> | ||||
| #include <sys/processor.h> | #include <sys/processor.h> | ||||
| #include <sys/cpuvar.h> | #include <sys/cpuvar.h> | ||||
| #include <sys/param.h> | #include <sys/param.h> | ||||
| #include <sys/linker.h> | #include <sys/linker.h> | ||||
| #include <sys/ioccom.h> | #include <sys/ioccom.h> | ||||
| #include <sys/cred.h> | #include <sys/cred.h> | ||||
| #include <sys/proc.h> | #include <sys/proc.h> | ||||
| #include <sys/types.h> | |||||
| #include <sys/ucred.h> | #include <sys/ucred.h> | ||||
| #endif | #endif | ||||
| typedef int model_t; | typedef int model_t; | ||||
| #include <sys/ctf_api.h> | #include <sys/ctf_api.h> | ||||
| /* | /* | ||||
| * DTrace Universal Constants and Typedefs | * DTrace Universal Constants and Typedefs | ||||
| */ | */ | ||||
| ▲ Show 20 Lines • Show All 2,311 Lines • ▼ Show 20 Lines | |||||
| extern void dtrace_panic(const char *, ...); | extern void dtrace_panic(const char *, ...); | ||||
| extern int dtrace_safe_defer_signal(void); | extern int dtrace_safe_defer_signal(void); | ||||
| extern void dtrace_safe_synchronous_signal(void); | extern void dtrace_safe_synchronous_signal(void); | ||||
| extern int dtrace_mach_aframes(void); | extern int dtrace_mach_aframes(void); | ||||
| #if defined(__i386) || defined(__amd64) | #if defined(__i386) || defined(__amd64) | ||||
| extern int dtrace_instr_size(uchar_t *instr); | extern int dtrace_instr_size_isa(uint8_t *, model_t, int *); | ||||
| extern int dtrace_instr_size_isa(uchar_t *, model_t, int *); | |||||
| extern void dtrace_invop_callsite(void); | extern void dtrace_invop_callsite(void); | ||||
| #endif | #endif | ||||
| extern void dtrace_invop_add(int (*)(uintptr_t, struct trapframe *, uintptr_t)); | extern void dtrace_invop_add(int (*)(uintptr_t, struct trapframe *, uintptr_t)); | ||||
| extern void dtrace_invop_remove(int (*)(uintptr_t, struct trapframe *, | extern void dtrace_invop_remove(int (*)(uintptr_t, struct trapframe *, | ||||
| uintptr_t)); | uintptr_t)); | ||||
| #ifdef __sparc | #ifdef __sparc | ||||
| extern int dtrace_blksuword32(uintptr_t, uint32_t *, int); | extern int dtrace_blksuword32(uintptr_t, uint32_t *, int); | ||||
| ▲ Show 20 Lines • Show All 126 Lines • Show Last 20 Lines | |||||
The presence of sys/param.h makes the include of sys/types.h redundant. Per style(9), only one or the other should be included.