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> | ||||
| #ifdef _KERNEL | #ifdef _KERNEL | ||||
mhorne: The presence of `sys/param.h` makes the include of `sys/types.h` redundant. Per style(9), only… | |||||
| #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 */ | ||||
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. | |||||
| 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> | ||||
| ▲ Show 20 Lines • Show All 2,327 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(uint8_t *instr); | |||||
| extern int dtrace_instr_size_isa(uint8_t *, model_t, int *); | extern int dtrace_instr_size_isa(uint8_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 | ||||
| Show All 11 Lines | |||||
| #define DTRACE_CPUFLAG_SET(flag) \ | #define DTRACE_CPUFLAG_SET(flag) \ | ||||
| (cpu_core[curcpu].cpuc_dtrace_flags |= (flag)) | (cpu_core[curcpu].cpuc_dtrace_flags |= (flag)) | ||||
| #define DTRACE_CPUFLAG_CLEAR(flag) \ | #define DTRACE_CPUFLAG_CLEAR(flag) \ | ||||
| (cpu_core[curcpu].cpuc_dtrace_flags &= ~(flag)) | (cpu_core[curcpu].cpuc_dtrace_flags &= ~(flag)) | ||||
| #endif /* _KERNEL */ | #endif /* _KERNEL */ | ||||
| #if defined(__i386) || defined(__amd64) || defined (__riscv) | |||||
| extern int dtrace_instr_size(uint8_t *instr); | |||||
| #endif | |||||
| #endif /* _ASM */ | #endif /* _ASM */ | ||||
| #if defined(__i386) || defined(__amd64) | #if defined(__i386) || defined(__amd64) | ||||
| #define DTRACE_INVOP_PUSHL_EBP 1 | #define DTRACE_INVOP_PUSHL_EBP 1 | ||||
| #define DTRACE_INVOP_PUSHQ_RBP DTRACE_INVOP_PUSHL_EBP | #define DTRACE_INVOP_PUSHQ_RBP DTRACE_INVOP_PUSHL_EBP | ||||
| #define DTRACE_INVOP_POPL_EBP 2 | #define DTRACE_INVOP_POPL_EBP 2 | ||||
| ▲ Show 20 Lines • Show All 100 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.