#include <sys/fasttrap.h>

sys/fasttrap.h

includes: sys/fasttrap_isa.h, sys/dtrace.h, sys/types.h
7 macros · 4 typedefs · 2 enums · 2 structs

macroFASTTRAPIOC

#define FASTTRAPIOC _IO('d', 0)

macroFASTTRAPIOC_MAKEPROBE

#define FASTTRAPIOC_MAKEPROBE (FASTTRAPIOC | 1)

macroFASTTRAPIOC_GETINSTR

#define FASTTRAPIOC_GETINSTR (FASTTRAPIOC | 2)

enumfasttrap_probe_type

underlying type unsigned int
DTFTP_NONE0
DTFTP_ENTRY1
DTFTP_RETURN2
DTFTP_OFFSETS3
DTFTP_POST_OFFSETS4
DTFTP_IS_ENABLED5

typedeffasttrap_probe_type_t

typedef enum fasttrap_probe_type fasttrap_probe_type_t;

enumfasttrap_provider_type

underlying type unsigned int
DTFTP_PROVIDER_NONE0
DTFTP_PROVIDER_USDT1
DTFTP_PROVIDER_PID2
DTFTP_PROVIDER_OBJC3
DTFTP_PROVIDER_ONESHOT4

typedeffasttrap_provider_type_t

typedef enum fasttrap_provider_type fasttrap_provider_type_t;

macroFASTTRAP_PID_NAME

Moved from fasttrap.c
#define FASTTRAP_PID_NAME "pid"

macroFASTTRAP_OBJC_NAME

#define FASTTRAP_OBJC_NAME "objc"

macroFASTTRAP_ONESHOT_NAME

#define FASTTRAP_ONESHOT_NAME "oneshot"

structfasttrap_probe_spec

size 240, align 8
pid_tftps_pid
fasttrap_provider_type_tftps_provider_type
fasttrap_probe_type_tftps_probe_type
uint32_tftps_arch_subinfoFor any additional per probe architecture specific data
char[128]ftps_func
char[64]ftps_mod
uint64_tftps_pc
uint64_tftps_size
uint64_tftps_noffs
uint64_t[1]ftps_offs

typedeffasttrap_probe_spec_t

typedef struct fasttrap_probe_spec fasttrap_probe_spec_t;

structfasttrap_instr_query

size 16, align 8
uint64_tftiq_pc
pid_tftiq_pid
fasttrap_instr_tftiq_instr

typedeffasttrap_instr_query_t

typedef struct fasttrap_instr_query fasttrap_instr_query_t;

macroPT_SUNWDTRACE_SIZE

To support the fasttrap provider from very early in a process's life, the run-time linker, ld.so.1, has a program header of type PT_SUNWDTRACE which points to a data object which must be PT_SUNWDTRACE_SIZE bytes. This structure mimics the fasttrap provider section of the ulwp_t structure. When the fasttrap provider is changed to require new or different instructions, the data object in ld.so.1 and the thread initializers in libc (libc_init() and _thrp_create()) need to be updated to include the new instructions, and PT_SUNWDTRACE needs to be changed to a new unique number (while the old value gets assigned something like PT_SUNWDTRACE_1). Since the linker must be backward compatible with old Solaris releases, it must have program headers for each of the PT_SUNWDTRACE versions. The kernel's elfexec() function only has to look for the latest version of the PT_SUNWDTRACE program header.
#define PT_SUNWDTRACE_SIZE FASTTRAP_SUNWDTRACE_SIZE