diff --git a/sys/conf/options b/sys/conf/options index 0e959c3b9828..61d29a2b74fa 100644 --- a/sys/conf/options +++ b/sys/conf/options @@ -1,1023 +1,1023 @@ # # On the handling of kernel options # # All kernel options should be listed in NOTES, with suitable # descriptions. Negative options (options that make some code not # compile) should be commented out; LINT (generated from NOTES) should # compile as much code as possible. Try to structure option-using # code so that a single option only switch code on, or only switch # code off, to make it possible to have a full compile-test. If # necessary, you can check for COMPILING_LINT to get maximum code # coverage. # # All new options shall also be listed in either "conf/options" or # "conf/options.". Options that affect a single source-file # .[c|s] should be directed into "opt_.h", while options # that affect multiple files should either go in "opt_global.h" if # this is a kernel-wide option (used just about everywhere), or in # "opt_.h" if it affects only some files. # Note that the effect of listing only an option without a # header-file-name in conf/options (and cousins) is that the last # convention is followed. # # This handling scheme is not yet fully implemented. # # # Format of this file: # Option name filename # # If filename is missing, the default is # opt_.h AAC_DEBUG opt_aac.h AACRAID_DEBUG opt_aacraid.h AHC_ALLOW_MEMIO opt_aic7xxx.h AHC_TMODE_ENABLE opt_aic7xxx.h AHC_DUMP_EEPROM opt_aic7xxx.h AHC_DEBUG opt_aic7xxx.h AHC_DEBUG_OPTS opt_aic7xxx.h AHC_REG_PRETTY_PRINT opt_aic7xxx.h AHD_DEBUG opt_aic79xx.h AHD_DEBUG_OPTS opt_aic79xx.h AHD_TMODE_ENABLE opt_aic79xx.h AHD_REG_PRETTY_PRINT opt_aic79xx.h # Debugging options. ALT_BREAK_TO_DEBUGGER opt_kdb.h BREAK_TO_DEBUGGER opt_kdb.h BUF_TRACKING opt_global.h DDB DDB_BUFR_SIZE opt_ddb.h DDB_CAPTURE_DEFAULTBUFSIZE opt_ddb.h DDB_CAPTURE_MAXBUFSIZE opt_ddb.h DDB_CTF opt_ddb.h DDB_NUMSYM opt_ddb.h EARLY_PRINTF opt_global.h FULL_BUF_TRACKING opt_global.h GDB KDB opt_global.h KDB_TRACE opt_kdb.h KDB_UNATTENDED opt_kdb.h KLD_DEBUG opt_kld.h NUM_CORE_FILES opt_global.h QUEUE_MACRO_DEBUG_TRACE opt_global.h QUEUE_MACRO_DEBUG_TRASH opt_global.h SYSCTL_DEBUG opt_sysctl.h TEXTDUMP_PREFERRED opt_ddb.h TEXTDUMP_VERBOSE opt_ddb.h TSLOG opt_global.h TSLOG_PAGEZERO opt_global.h TSLOGSIZE opt_global.h # Miscellaneous options. ALQ ALTERA_SDCARD_FAST_SIM opt_altera_sdcard.h ATSE_CFI_HACK opt_cfi.h AUDIT opt_global.h BOOTHOWTO opt_global.h BOOTVERBOSE opt_global.h CALLOUT_PROFILING CAPABILITIES opt_capsicum.h CAPABILITY_MODE opt_capsicum.h CC_CDG opt_global.h CC_CHD opt_global.h CC_CUBIC opt_global.h CC_DEFAULT opt_cc.h CC_DCTCP opt_global.h CC_HD opt_global.h CC_HTCP opt_global.h CC_NEWRENO opt_global.h CC_VEGAS opt_global.h COMPAT_43 opt_global.h COMPAT_43TTY opt_global.h COMPAT_FREEBSD4 opt_global.h COMPAT_FREEBSD5 opt_global.h COMPAT_FREEBSD6 opt_global.h COMPAT_FREEBSD7 opt_global.h COMPAT_FREEBSD9 opt_global.h COMPAT_FREEBSD10 opt_global.h COMPAT_FREEBSD11 opt_global.h COMPAT_FREEBSD12 opt_global.h COMPAT_FREEBSD13 opt_global.h COMPAT_FREEBSD14 opt_global.h COMPAT_LINUXKPI opt_dontuse.h COMPILING_LINT opt_global.h CY_PCI_FASTINTR DEADLKRES opt_watchdog.h EXPERIMENTAL opt_global.h DIRECTIO FFCLOCK FULL_PREEMPTION opt_sched.h GZIO opt_gzio.h IMGACT_BINMISC opt_dontuse.h IPI_PREEMPTION opt_sched.h GEOM_CACHE opt_geom.h GEOM_CONCAT opt_geom.h GEOM_ELI opt_geom.h GEOM_GATE opt_geom.h GEOM_JOURNAL opt_geom.h GEOM_LABEL opt_geom.h GEOM_LABEL_GPT opt_geom.h GEOM_LINUX_LVM opt_geom.h GEOM_MAP opt_geom.h GEOM_MIRROR opt_geom.h GEOM_MOUNTVER opt_geom.h GEOM_MULTIPATH opt_geom.h GEOM_NOP opt_geom.h GEOM_PART_APM opt_geom.h GEOM_PART_BSD opt_geom.h GEOM_PART_BSD64 opt_geom.h GEOM_PART_EBR opt_geom.h GEOM_PART_GPT opt_geom.h GEOM_PART_LDM opt_geom.h GEOM_PART_MBR opt_geom.h GEOM_RAID opt_geom.h GEOM_RAID3 opt_geom.h GEOM_SHSEC opt_geom.h GEOM_STRIPE opt_geom.h GEOM_UZIP opt_geom.h GEOM_UZIP_DEBUG opt_geom.h GEOM_VINUM opt_geom.h GEOM_VIRSTOR opt_geom.h GEOM_ZERO opt_geom.h IFLIB opt_iflib.h KDTRACE_HOOKS opt_global.h KDTRACE_FRAME opt_kdtrace.h -KDTRACE_NO_MIB_SDT opt_global.h +KDTRACE_MIB_SDT opt_global.h KN_HASHSIZE opt_kqueue.h KSTACK_MAX_PAGES KSTACK_PAGES KSTACK_USAGE_PROF KTRACE KTRACE_REQUEST_POOL opt_ktrace.h LIBICONV MAC opt_global.h MAC_BIBA opt_dontuse.h MAC_BSDEXTENDED opt_dontuse.h MAC_DDB opt_dontuse.h MAC_DEBUG opt_mac.h MAC_IFOFF opt_dontuse.h MAC_IPACL opt_dontuse.h MAC_LOMAC opt_dontuse.h MAC_MLS opt_dontuse.h MAC_NONE opt_dontuse.h MAC_NTPD opt_dontuse.h MAC_PARTITION opt_dontuse.h MAC_PORTACL opt_dontuse.h MAC_PRIORITY opt_dontuse.h MAC_SEEOTHERUIDS opt_dontuse.h MAC_STATIC opt_mac.h MAC_STUB opt_dontuse.h MAC_TEST opt_dontuse.h MAC_GRANTBYLABEL opt_dontuse.h MAC_VERIEXEC opt_dontuse.h MAC_VERIEXEC_DEBUG opt_mac.h MAC_VERIEXEC_SHA1 opt_dontuse.h MAC_VERIEXEC_SHA256 opt_dontuse.h MAC_VERIEXEC_SHA384 opt_dontuse.h MAC_VERIEXEC_SHA512 opt_dontuse.h MD_ROOT opt_md.h MD_ROOT_FSTYPE opt_md.h MD_ROOT_READONLY opt_md.h MD_ROOT_SIZE opt_md.h MD_ROOT_MEM opt_md.h MFI_DEBUG opt_mfi.h MFI_DECODE_LOG opt_mfi.h MPROF_BUFFERS opt_mprof.h MPROF_HASH_SIZE opt_mprof.h NO_ADAPTIVE_MUTEXES opt_adaptive_mutexes.h NO_ADAPTIVE_RWLOCKS NO_ADAPTIVE_SX NO_OBSOLETE_CODE opt_global.h NO_SYSCTL_DESCR opt_global.h NSWBUF_MIN opt_param.h MBUF_PACKET_ZONE_DISABLE opt_global.h PANIC_REBOOT_WAIT_TIME opt_panic.h PCI_HP opt_pci.h PCI_IOV opt_global.h PPC_DEBUG opt_ppc.h PPC_PROBE_CHIPSET opt_ppc.h PPS_SYNC opt_ntp.h PREEMPTION opt_sched.h QUOTA SCHED_4BSD opt_sched.h SCHED_STATS opt_sched.h SCHED_ULE opt_sched.h SLEEPQUEUE_PROFILING SLHCI_DEBUG opt_slhci.h SOCKET_HHOOK opt_global.h STACK opt_stack.h SUIDDIR MSGMNB opt_sysvipc.h MSGMNI opt_sysvipc.h MSGSEG opt_sysvipc.h MSGSSZ opt_sysvipc.h MSGTQL opt_sysvipc.h SEMMNI opt_sysvipc.h SEMMNS opt_sysvipc.h SEMMNU opt_sysvipc.h SEMMSL opt_sysvipc.h SEMOPM opt_sysvipc.h SEMUME opt_sysvipc.h SHMALL opt_sysvipc.h SHMMAX opt_sysvipc.h SHMMAXPGS opt_sysvipc.h SHMMIN opt_sysvipc.h SHMMNI opt_sysvipc.h SHMSEG opt_sysvipc.h SYSVMSG opt_sysvipc.h SYSVSEM opt_sysvipc.h SYSVSHM opt_sysvipc.h SW_WATCHDOG opt_watchdog.h TCPHPTS TCP_REQUEST_TRK opt_global.h TCP_ACCOUNTING opt_global.h TCP_BBR opt_inet.h TCP_RACK opt_inet.h # # TCP SaD Detection is an experimental Sack attack Detection (SaD) # algorithm that uses "normal" behaviour with SACK's to detect # a possible attack. It is strictly experimental at this point. # TURNSTILE_PROFILING UMTX_PROFILING UMTX_CHAINS opt_global.h VERBOSE_SYSINIT ZSTDIO opt_zstdio.h # Sanitizers COVERAGE opt_global.h KASAN opt_global.h KCOV KCSAN opt_global.h KMSAN opt_global.h KUBSAN opt_global.h # POSIX kernel options P1003_1B_MQUEUE opt_posix.h P1003_1B_SEMAPHORES opt_posix.h _KPOSIX_PRIORITY_SCHEDULING opt_posix.h # Do we want the config file compiled into the kernel? INCLUDE_CONFIG_FILE opt_config.h # Options for static filesystems. These should only be used at config # time, since the corresponding lkms cannot work if there are any static # dependencies. Unusability is enforced by hiding the defines for the # options in a never-included header. AUTOFS opt_dontuse.h CD9660 opt_dontuse.h EXT2FS opt_dontuse.h FDESCFS opt_dontuse.h FFS opt_dontuse.h FUSEFS opt_dontuse.h MSDOSFS opt_dontuse.h NULLFS opt_dontuse.h PROCFS opt_dontuse.h PSEUDOFS opt_dontuse.h SMBFS opt_dontuse.h TARFS opt_dontuse.h TMPFS opt_dontuse.h UDF opt_dontuse.h UNIONFS opt_dontuse.h ZFS opt_dontuse.h P9FS opt_dontuse.h # Pseudofs debugging PSEUDOFS_TRACE opt_pseudofs.h # Tarfs debugging TARFS_DEBUG opt_tarfs.h # In-kernel GSS-API KGSSAPI opt_kgssapi.h KGSSAPI_DEBUG opt_kgssapi.h # These static filesystems have one slightly bogus static dependency in # sys/i386/i386/autoconf.c. If any of these filesystems are # statically compiled into the kernel, code for mounting them as root # filesystems will be enabled - but look below. # NFSCL - client # NFSD - server NFSCL opt_nfs.h NFSD opt_nfs.h # filesystems and libiconv bridge CD9660_ICONV opt_dontuse.h MSDOSFS_ICONV opt_dontuse.h UDF_ICONV opt_dontuse.h # If you are following the conditions in the copyright, # you can enable soft-updates which will speed up a lot of thigs # and make the system safer from crashes at the same time. # otherwise a STUB module will be compiled in. SOFTUPDATES opt_ffs.h # On small, embedded systems, it can be useful to turn off support for # snapshots. It saves about 30-40k for a feature that would be lightly # used, if it is used at all. NO_FFS_SNAPSHOT opt_ffs.h # Enabling this option turns on support for Access Control Lists in UFS, # which can be used to support high security configurations. Depends on # UFS_EXTATTR. UFS_ACL opt_ufs.h # Enabling this option turns on support for extended attributes in UFS-based # filesystems, which can be used to support high security configurations # as well as new filesystem features. UFS_EXTATTR opt_ufs.h UFS_EXTATTR_AUTOSTART opt_ufs.h # Enable fast hash lookups for large directories on UFS-based filesystems. UFS_DIRHASH opt_ufs.h # Enable gjournal-based UFS journal. UFS_GJOURNAL opt_ufs.h # The below sentence is not in English, and neither is this one. # We plan to remove the static dependences above, with a # _ROOT option to control if it usable as root. This list # allows these options to be present in config files already (though # they won't make any difference yet). NFS_ROOT opt_nfsroot.h # SMB/CIFS requester NETSMB opt_netsmb.h # Enable debugnet(4) networking support. DEBUGNET opt_global.h # Enable netdump(4) client support. NETDUMP opt_global.h # Enable netgdb(4) support. NETGDB opt_global.h # Options used only in subr_param.c. HZ opt_param.h MAXFILES opt_param.h NBUF opt_param.h NSFBUFS opt_param.h VM_BCACHE_SIZE_MAX opt_param.h VM_SWZONE_SIZE_MAX opt_param.h MAXUSERS DFLDSIZ opt_param.h MAXDSIZ opt_param.h MAXSSIZ opt_param.h # Generic SCSI options. CAM_MAX_HIGHPOWER opt_cam.h CAMDEBUG opt_cam.h CAM_DEBUG_COMPILE opt_cam.h CAM_DEBUG_DELAY opt_cam.h CAM_DEBUG_BUS opt_cam.h CAM_DEBUG_TARGET opt_cam.h CAM_DEBUG_LUN opt_cam.h CAM_DEBUG_FLAGS opt_cam.h CAM_BOOT_DELAY opt_cam.h CAM_IOSCHED_DYNAMIC opt_cam.h CAM_IO_STATS opt_cam.h CAM_TEST_FAILURE opt_cam.h SCSI_DELAY opt_scsi.h SCSI_NO_SENSE_STRINGS opt_scsi.h SCSI_NO_OP_STRINGS opt_scsi.h # Options used only in cam/ata/ata_da.c ATA_STATIC_ID opt_ada.h # Options used only in cam/scsi/scsi_cd.c CHANGER_MIN_BUSY_SECONDS opt_cd.h CHANGER_MAX_BUSY_SECONDS opt_cd.h # Options used only in cam/scsi/scsi_da.c DA_TRACK_REFS opt_da.h # Options used only in cam/scsi/scsi_sa.c. SA_IO_TIMEOUT opt_sa.h SA_SPACE_TIMEOUT opt_sa.h SA_REWIND_TIMEOUT opt_sa.h SA_ERASE_TIMEOUT opt_sa.h SA_1FM_AT_EOD opt_sa.h # Options used only in cam/scsi/scsi_pt.c SCSI_PT_DEFAULT_TIMEOUT opt_pt.h # Options used only in cam/scsi/scsi_ses.c SES_ENABLE_PASSTHROUGH opt_ses.h # Options used in dev/sym/ (Symbios SCSI driver). SYM_SETUP_SCSI_DIFF opt_sym.h #-HVD support for 825a, 875, 885 # disabled:0 (default), enabled:1 SYM_SETUP_PCI_PARITY opt_sym.h #-PCI parity checking # disabled:0, enabled:1 (default) SYM_SETUP_MAX_LUN opt_sym.h #-Number of LUNs supported # default:8, range:[1..64] # Options used only in dev/isp/* ISP_TARGET_MODE opt_isp.h ISP_FW_CRASH_DUMP opt_isp.h ISP_DEFAULT_ROLES opt_isp.h ISP_INTERNAL_TARGET opt_isp.h ISP_FCTAPE_OFF opt_isp.h # Net stuff. ACCEPT_FILTER_DATA ACCEPT_FILTER_DNS ACCEPT_FILTER_HTTP ACCEPT_FILTER_TLS ALTQ opt_global.h ALTQ_CBQ opt_altq.h ALTQ_CDNR opt_altq.h ALTQ_CODEL opt_altq.h ALTQ_DEBUG opt_altq.h ALTQ_HFSC opt_altq.h ALTQ_FAIRQ opt_altq.h ALTQ_NOPCC opt_altq.h ALTQ_PRIQ opt_altq.h ALTQ_RED opt_altq.h ALTQ_RIO opt_altq.h BOOTP opt_bootp.h BOOTP_BLOCKSIZE opt_bootp.h BOOTP_COMPAT opt_bootp.h BOOTP_NFSROOT opt_bootp.h BOOTP_NFSV3 opt_bootp.h BOOTP_WIRED_TO opt_bootp.h DEVICE_POLLING DUMMYNET opt_ipdn.h RATELIMIT opt_ratelimit.h RATELIMIT_DEBUG opt_ratelimit.h INET opt_inet.h INET6 opt_inet6.h STATS opt_global.h IPDIVERT IPFILTER opt_ipfilter.h IPFILTER_DEFAULT_BLOCK opt_ipfilter.h IPFILTER_LOG opt_ipfilter.h IPFILTER_LOOKUP opt_ipfilter.h IPFIREWALL opt_ipfw.h IPFIREWALL_DEFAULT_TO_ACCEPT opt_ipfw.h IPFIREWALL_NAT opt_ipfw.h IPFIREWALL_NAT64 opt_ipfw.h IPFIREWALL_NPTV6 opt_ipfw.h IPFIREWALL_VERBOSE opt_ipfw.h IPFIREWALL_VERBOSE_LIMIT opt_ipfw.h IPFIREWALL_PMOD opt_ipfw.h IPSEC opt_ipsec.h IPSEC_DEBUG opt_ipsec.h IPSEC_SUPPORT opt_ipsec.h IPSEC_OFFLOAD opt_ipsec.h IPSTEALTH KERN_TLS KRPC LIBALIAS LIBMCHAIN MBUF_PROFILING MBUF_STRESS_TEST MROUTING opt_mrouting.h NFSLOCKD NETLINK opt_global.h PF_DEFAULT_TO_DROP opt_pf.h ROUTE_MPATH opt_route.h ROUTETABLES opt_route.h FIB_ALGO opt_route.h RSS opt_rss.h SLIP_IFF_OPTS opt_slip.h TCPPCAP opt_global.h SIFTR TCP_BLACKBOX opt_global.h TCP_HHOOK opt_global.h TCP_OFFLOAD opt_inet.h # Enable code to dispatch TCP offloading TCP_RFC7413 opt_inet.h TCP_RFC7413_MAX_KEYS opt_inet.h TCP_RFC7413_MAX_PSKS opt_inet.h TCP_SIGNATURE opt_ipsec.h VLAN_ARRAY opt_vlan.h XDR XBONEHACK # # SCTP # SCTP opt_sctp.h SCTP_SUPPORT opt_sctp.h SCTP_DEBUG opt_sctp.h # Enable debug printfs SCTP_LOCK_LOGGING opt_sctp.h # Log to KTR lock activity SCTP_MBUF_LOGGING opt_sctp.h # Log to KTR general mbuf aloc/free SCTP_MBCNT_LOGGING opt_sctp.h # Log to KTR mbcnt activity SCTP_PACKET_LOGGING opt_sctp.h # Log to a packet buffer last N packets SCTP_LTRACE_CHUNKS opt_sctp.h # Log to KTR chunks processed SCTP_LTRACE_ERRORS opt_sctp.h # Log to KTR error returns. SCTP_USE_PERCPU_STAT opt_sctp.h # Use per cpu stats. SCTP_MCORE_INPUT opt_sctp.h # Have multiple input threads for input mbufs SCTP_LOCAL_TRACE_BUF opt_sctp.h # Use tracebuffer exported via sysctl SCTP_DETAILED_STR_STATS opt_sctp.h # Use per PR-SCTP policy stream stats # # # # Netgraph(4). Use option NETGRAPH to enable the base netgraph code. # Each netgraph node type can be either be compiled into the kernel # or loaded dynamically. To get the former, include the corresponding # option below. Each type has its own man page, e.g. ng_async(4). NETGRAPH NETGRAPH_DEBUG opt_netgraph.h NETGRAPH_ASYNC opt_netgraph.h NETGRAPH_BLUETOOTH opt_netgraph.h NETGRAPH_BLUETOOTH_BT3C opt_netgraph.h NETGRAPH_BLUETOOTH_H4 opt_netgraph.h NETGRAPH_BLUETOOTH_HCI opt_netgraph.h NETGRAPH_BLUETOOTH_L2CAP opt_netgraph.h NETGRAPH_BLUETOOTH_SOCKET opt_netgraph.h NETGRAPH_BLUETOOTH_UBT opt_netgraph.h NETGRAPH_BLUETOOTH_UBTBCMFW opt_netgraph.h NETGRAPH_BPF opt_netgraph.h NETGRAPH_BRIDGE opt_netgraph.h NETGRAPH_CAR opt_netgraph.h NETGRAPH_CHECKSUM opt_netgraph.h NETGRAPH_CISCO opt_netgraph.h NETGRAPH_DEFLATE opt_netgraph.h NETGRAPH_DEVICE opt_netgraph.h NETGRAPH_ECHO opt_netgraph.h NETGRAPH_EIFACE opt_netgraph.h NETGRAPH_ETHER opt_netgraph.h NETGRAPH_ETHER_ECHO opt_netgraph.h NETGRAPH_FEC opt_netgraph.h NETGRAPH_FRAME_RELAY opt_netgraph.h NETGRAPH_GIF opt_netgraph.h NETGRAPH_GIF_DEMUX opt_netgraph.h NETGRAPH_HOLE opt_netgraph.h NETGRAPH_IFACE opt_netgraph.h NETGRAPH_IP_INPUT opt_netgraph.h NETGRAPH_IPFW opt_netgraph.h NETGRAPH_KSOCKET opt_netgraph.h NETGRAPH_L2TP opt_netgraph.h NETGRAPH_LMI opt_netgraph.h NETGRAPH_MPPC_COMPRESSION opt_netgraph.h NETGRAPH_MPPC_ENCRYPTION opt_netgraph.h NETGRAPH_NAT opt_netgraph.h NETGRAPH_NETFLOW opt_netgraph.h NETGRAPH_ONE2MANY opt_netgraph.h NETGRAPH_PATCH opt_netgraph.h NETGRAPH_PIPE opt_netgraph.h NETGRAPH_PPP opt_netgraph.h NETGRAPH_PPPOE opt_netgraph.h NETGRAPH_PPTPGRE opt_netgraph.h NETGRAPH_PRED1 opt_netgraph.h NETGRAPH_RFC1490 opt_netgraph.h NETGRAPH_SOCKET opt_netgraph.h NETGRAPH_SPLIT opt_netgraph.h NETGRAPH_SPPP opt_netgraph.h NETGRAPH_TAG opt_netgraph.h NETGRAPH_TCPMSS opt_netgraph.h NETGRAPH_TEE opt_netgraph.h NETGRAPH_TTY opt_netgraph.h NETGRAPH_UI opt_netgraph.h NETGRAPH_VJC opt_netgraph.h NETGRAPH_VLAN opt_netgraph.h # DRM options DRM_DEBUG opt_drm.h TI_SF_BUF_JUMBO opt_ti.h TI_JUMBO_HDRSPLIT opt_ti.h # Misc debug flags. Most of these should probably be replaced with # 'DEBUG', and then let people recompile just the interesting modules # with 'make CC="cc -DDEBUG"'. DEBUG_1284 opt_ppb_1284.h LPT_DEBUG opt_lpt.h PLIP_DEBUG opt_plip.h LOCKF_DEBUG opt_debug_lockf.h SI_DEBUG opt_debug_si.h IFMEDIA_DEBUG opt_ifmedia.h # Fb options FB_DEBUG opt_fb.h # ppbus related options PERIPH_1284 opt_ppb_1284.h DONTPROBE_1284 opt_ppb_1284.h # smbus related options ENABLE_ALART opt_intpm.h # These cause changes all over the kernel BLKDEV_IOSIZE opt_global.h BURN_BRIDGES opt_global.h DEBUG opt_global.h DEBUG_LOCKS opt_global.h DEBUG_VFS_LOCKS opt_global.h DFLTPHYS opt_global.h DIAGNOSTIC opt_global.h INVARIANT_SUPPORT opt_global.h INVARIANTS opt_global.h KASSERT_PANIC_OPTIONAL opt_global.h MAXCPU opt_global.h MAXMEMDOM opt_global.h MAXPHYS opt_maxphys.h MCLSHIFT opt_global.h MUTEX_NOINLINE opt_global.h LOCK_PROFILING opt_global.h MSIZE opt_global.h REGRESSION opt_global.h RWLOCK_NOINLINE opt_global.h SX_NOINLINE opt_global.h VFS_BIO_DEBUG opt_global.h # These are VM related options VM_KMEM_SIZE opt_vm.h VM_KMEM_SIZE_SCALE opt_vm.h VM_KMEM_SIZE_MAX opt_vm.h VM_NRESERVLEVEL opt_vm.h VM_LEVEL_0_ORDER opt_vm.h MALLOC_MAKE_FAILURES opt_vm.h MALLOC_PROFILE opt_vm.h MALLOC_DEBUG_MAXZONES opt_vm.h # The MemGuard replacement allocator used for tamper-after-free detection DEBUG_MEMGUARD opt_vm.h # The RedZone malloc(9) protection DEBUG_REDZONE opt_vm.h # Standard SMP options EARLY_AP_STARTUP opt_global.h SMP opt_global.h NUMA opt_global.h # Size of the kernel message buffer MSGBUF_SIZE opt_msgbuf.h # NFS options NFS_MINATTRTIMO opt_nfs.h NFS_MAXATTRTIMO opt_nfs.h NFS_MINDIRATTRTIMO opt_nfs.h NFS_MAXDIRATTRTIMO opt_nfs.h NFS_DEBUG opt_nfs.h # TMPFS options TMPFS_PAGES_MINRESERVED opt_tmpfs.h # Options for uart(4) UART_PPS_ON_CTS opt_uart.h UART_POLL_FREQ opt_uart.h UART_DEV_TOLERANCE_PCT opt_uart.h # options for bus/device framework BUS_DEBUG opt_bus.h # options for USB support USB_DEBUG opt_usb.h USB_HOST_ALIGN opt_usb.h USB_REQ_DEBUG opt_usb.h USB_TEMPLATE opt_usb.h USB_VERBOSE opt_usb.h USB_DMA_SINGLE_ALLOC opt_usb.h USB_EHCI_BIG_ENDIAN_DESC opt_usb.h U3G_DEBUG opt_u3g.h UKBD_DFLT_KEYMAP opt_ukbd.h UPLCOM_INTR_INTERVAL opt_uplcom.h UVSCOM_DEFAULT_OPKTSIZE opt_uvscom.h UVSCOM_INTR_INTERVAL opt_uvscom.h # options for the Realtek rtwn driver RTWN_DEBUG opt_rtwn.h RTWN_WITHOUT_UCODE opt_rtwn.h # Embedded system options INIT_PATH ROOTDEVNAME FDC_DEBUG opt_fdc.h PCFCLOCK_VERBOSE opt_pcfclock.h PCFCLOCK_MAX_RETRIES opt_pcfclock.h KTR opt_global.h KTR_ALQ opt_ktr.h KTR_MASK opt_ktr.h KTR_CPUMASK opt_ktr.h KTR_COMPILE opt_global.h KTR_BOOT_ENTRIES opt_global.h KTR_ENTRIES opt_global.h KTR_VERBOSE opt_ktr.h WITNESS opt_global.h WITNESS_KDB opt_witness.h WITNESS_NO_VNODE opt_witness.h WITNESS_SKIPSPIN opt_witness.h WITNESS_COUNT opt_witness.h OPENSOLARIS_WITNESS opt_global.h EPOCH_TRACE opt_global.h # options for ACPI support ACPI_DEBUG opt_acpi.h ACPI_MAX_TASKS opt_acpi.h ACPI_MAX_THREADS opt_acpi.h DEV_ACPI opt_acpi.h ACPI_EARLY_EPYC_WAR opt_acpi.h # options for IOMMU support IOMMU opt_iommu.h # ISA support DEV_ISA opt_isa.h ISAPNP opt_dontuse.h # various 'device presence' options. DEV_BPF opt_bpf.h DEV_CARP opt_carp.h DEV_NETMAP opt_global.h DEV_PCI opt_pci.h DEV_PF opt_pf.h DEV_PFLOG opt_pf.h DEV_PFSYNC opt_pf.h DEV_SPLASH opt_splash.h DEV_VLAN opt_vlan.h # bce driver BCE_DEBUG opt_bce.h BCE_NVRAM_WRITE_SUPPORT opt_bce.h SOCKBUF_DEBUG opt_global.h # options for hifn driver HIFN_DEBUG opt_hifn.h HIFN_RNDTEST opt_hifn.h # options for safenet driver SAFE_DEBUG opt_safe.h SAFE_NO_RNG opt_safe.h SAFE_RNDTEST opt_safe.h # syscons/vt options MAXCONS opt_syscons.h SC_ALT_MOUSE_IMAGE opt_syscons.h SC_CUT_SPACES2TABS opt_syscons.h SC_CUT_SEPCHARS opt_syscons.h SC_DEBUG_LEVEL opt_syscons.h SC_DFLT_FONT opt_syscons.h SC_DFLT_TERM opt_syscons.h SC_DISABLE_KDBKEY opt_syscons.h SC_DISABLE_REBOOT opt_syscons.h SC_HISTORY_SIZE opt_syscons.h SC_KERNEL_CONS_ATTR opt_syscons.h SC_KERNEL_CONS_ATTRS opt_syscons.h SC_KERNEL_CONS_REV_ATTR opt_syscons.h SC_MOUSE_CHAR opt_syscons.h SC_NO_CUTPASTE opt_syscons.h SC_NO_FONT_LOADING opt_syscons.h SC_NO_HISTORY opt_syscons.h SC_NO_MODE_CHANGE opt_syscons.h SC_NO_SUSPEND_VTYSWITCH opt_syscons.h SC_NO_SYSMOUSE opt_syscons.h SC_NO_TERM_DUMB opt_syscons.h SC_NO_TERM_SC opt_syscons.h SC_NO_TERM_TEKEN opt_syscons.h SC_NORM_ATTR opt_syscons.h SC_NORM_REV_ATTR opt_syscons.h SC_PIXEL_MODE opt_syscons.h SC_RENDER_DEBUG opt_syscons.h SC_TWOBUTTON_MOUSE opt_syscons.h VT_ALT_TO_ESC_HACK opt_syscons.h VT_FB_MAX_WIDTH opt_syscons.h VT_FB_MAX_HEIGHT opt_syscons.h VT_MAXWINDOWS opt_syscons.h VT_TWOBUTTON_MOUSE opt_syscons.h DEV_SC opt_syscons.h DEV_VT opt_syscons.h # teken terminal emulator options TEKEN_CONS25 opt_teken.h TEKEN_UTF8 opt_teken.h TERMINAL_KERN_ATTR opt_teken.h TERMINAL_NORM_ATTR opt_teken.h # options for printf PRINTF_BUFR_SIZE opt_printf.h BOOT_TAG opt_printf.h BOOT_TAG_SZ opt_printf.h # kbd options KBD_DISABLE_KEYMAP_LOAD opt_kbd.h KBD_INSTALL_CDEV opt_kbd.h KBD_MAXRETRY opt_kbd.h KBD_MAXWAIT opt_kbd.h KBD_RESETDELAY opt_kbd.h KBD_DELAY1 opt_kbd.h KBD_DELAY2 opt_kbd.h KBDIO_DEBUG opt_kbd.h KBDMUX_DFLT_KEYMAP opt_kbdmux.h # options for the Atheros driver ATH_DEBUG opt_ath.h ATH_TXBUF opt_ath.h ATH_RXBUF opt_ath.h ATH_DIAGAPI opt_ath.h ATH_TX99_DIAG opt_ath.h ATH_ENABLE_DFS opt_ath.h ATH_EEPROM_FIRMWARE opt_ath.h ATH_ENABLE_RADIOTAP_VENDOR_EXT opt_ath.h ATH_DEBUG_ALQ opt_ath.h ATH_KTR_INTR_DEBUG opt_ath.h AH_DEBUG opt_ah.h AH_ASSERT opt_ah.h AH_DEBUG_ALQ opt_ah.h AH_REGOPS_FUNC opt_ah.h AH_WRITE_REGDOMAIN opt_ah.h AH_DEBUG_COUNTRY opt_ah.h AH_WRITE_EEPROM opt_ah.h AH_PRIVATE_DIAG opt_ah.h AH_NEED_DESC_SWAP opt_ah.h AH_USE_INIPDGAIN opt_ah.h AH_MAXCHAN opt_ah.h AH_RXCFG_SDMAMW_4BYTES opt_ah.h AH_INTERRUPT_DEBUGGING opt_ah.h # AR5416 and later interrupt mitigation # XXX do not use this for AR9130 AH_AR5416_INTERRUPT_MITIGATION opt_ah.h # options for the Altera mSGDMA driver (altera_msgdma) ALTERA_MSGDMA_DESC_STD opt_altera_msgdma.h ALTERA_MSGDMA_DESC_EXT opt_altera_msgdma.h ALTERA_MSGDMA_DESC_PF_STD opt_altera_msgdma.h ALTERA_MSGDMA_DESC_PF_EXT opt_altera_msgdma.h # options for the Broadcom BCM43xx driver (bwi) BWI_DEBUG opt_bwi.h BWI_DEBUG_VERBOSE opt_bwi.h # options for the Brodacom BCM43xx driver (bwn) BWN_DEBUG opt_bwn.h BWN_GPL_PHY opt_bwn.h BWN_USE_SIBA opt_bwn.h # Options for the SIBA driver SIBA_DEBUG opt_siba.h # options for the Marvell 8335 wireless driver MALO_DEBUG opt_malo.h MALO_TXBUF opt_malo.h MALO_RXBUF opt_malo.h # options for the Marvell wireless driver MWL_DEBUG opt_mwl.h MWL_TXBUF opt_mwl.h MWL_RXBUF opt_mwl.h MWL_DIAGAPI opt_mwl.h MWL_AGGR_SIZE opt_mwl.h MWL_TX_NODROP opt_mwl.h # Options for the Marvell NETA driver MVNETA_MULTIQUEUE opt_mvneta.h MVNETA_KTR opt_mvneta.h # Options for the Intel 802.11ac wireless driver IWM_DEBUG opt_iwm.h # Options for the Intel 802.11n wireless driver IWN_DEBUG opt_iwn.h # Options for the Intel 3945ABG wireless driver WPI_DEBUG opt_wpi.h # dcons options DCONS_BUF_SIZE opt_dcons.h DCONS_POLL_HZ opt_dcons.h DCONS_FORCE_CONSOLE opt_dcons.h DCONS_FORCE_GDB opt_dcons.h # HWPMC options HWPMC_DEBUG opt_global.h HWPMC_HOOKS # 802.11 support layer IEEE80211_DEBUG opt_wlan.h IEEE80211_DEBUG_REFCNT opt_wlan.h IEEE80211_SUPPORT_MESH opt_wlan.h IEEE80211_SUPPORT_SUPERG opt_wlan.h IEEE80211_SUPPORT_TDMA opt_wlan.h IEEE80211_ALQ opt_wlan.h IEEE80211_DFS_DEBUG opt_wlan.h # 802.11 TDMA support TDMA_SLOTLEN_DEFAULT opt_tdma.h TDMA_SLOTCNT_DEFAULT opt_tdma.h TDMA_BINTVAL_DEFAULT opt_tdma.h TDMA_TXRATE_11B_DEFAULT opt_tdma.h TDMA_TXRATE_11G_DEFAULT opt_tdma.h TDMA_TXRATE_11A_DEFAULT opt_tdma.h TDMA_TXRATE_TURBO_DEFAULT opt_tdma.h TDMA_TXRATE_HALF_DEFAULT opt_tdma.h TDMA_TXRATE_QUARTER_DEFAULT opt_tdma.h TDMA_TXRATE_11NA_DEFAULT opt_tdma.h TDMA_TXRATE_11NG_DEFAULT opt_tdma.h # VideoMode PICKMODE_DEBUG opt_videomode.h # Network stack virtualization options VIMAGE opt_global.h VNET_DEBUG opt_global.h # Common Flash Interface (CFI) options CFI_SUPPORT_STRATAFLASH opt_cfi.h CFI_ARMEDANDDANGEROUS opt_cfi.h CFI_HARDWAREBYTESWAP opt_cfi.h # Sound options SND_DEBUG opt_snd.h SND_DIAGNOSTIC opt_snd.h SND_FEEDER_MULTIFORMAT opt_snd.h SND_FEEDER_FULL_MULTIFORMAT opt_snd.h SND_FEEDER_RATE_HP opt_snd.h SND_PCM_64 opt_snd.h SND_OLDSTEREO opt_snd.h X86BIOS # Flattened device tree options FDT opt_platform.h FDT_DTB_STATIC opt_platform.h # OFED Infiniband stack OFED opt_ofed.h OFED_DEBUG_INIT opt_ofed.h SDP opt_ofed.h SDP_DEBUG opt_ofed.h IPOIB opt_ofed.h IPOIB_DEBUG opt_ofed.h IPOIB_CM opt_ofed.h # Resource Accounting RACCT opt_global.h RACCT_DEFAULT_TO_DISABLED opt_global.h # Resource Limits RCTL opt_global.h # Random number generator(s) # Alternative RNG algorithm. RANDOM_FENESTRASX opt_global.h # With this, no entropy processor is loaded, but the entropy # harvesting infrastructure is present. This means an entropy # processor may be loaded as a module. RANDOM_LOADABLE opt_global.h # This turns on high-rate and potentially expensive harvesting in # the uma slab allocator. RANDOM_ENABLE_UMA opt_global.h RANDOM_ENABLE_ETHER opt_global.h # This options turns TPM into entropy source. TPM_HARVEST opt_tpm.h # BHND(4) driver BHND_LOGLEVEL opt_global.h # GPIO and child devices GPIO_SPI_DEBUG opt_gpio.h # SPI devices SPIGEN_LEGACY_CDEVNAME opt_spi.h # etherswitch(4) driver RTL8366_SOFT_RESET opt_etherswitch.h # evdev protocol support EVDEV_SUPPORT opt_evdev.h EVDEV_DEBUG opt_evdev.h UINPUT_DEBUG opt_evdev.h # Hyper-V network driver HN_DEBUG opt_hn.h # CAM-based MMC stack MMCCAM # Encrypted kernel crash dumps EKCD opt_ekcd.h # NVME options NVME_USE_NVD opt_nvme.h # amdsbwd options AMDSBWD_DEBUG opt_amdsbwd.h # gcov support GCOV opt_global.h LINDEBUGFS # options for HID support HID_DEBUG opt_hid.h IICHID_DEBUG opt_hid.h IICHID_SAMPLING opt_hid.h HKBD_DFLT_KEYMAP opt_hkbd.h HIDRAW_MAKE_UHID_ALIAS opt_hid.h # kenv options # The early kernel environment (loader environment, config(8)-provided static) # is typically cleared after the dynamic environment comes up to ensure that # we're not inadvertently holding on to 'secret' values in these stale envs. # This option is insecure except in controlled environments where the static # environment's contents are known to be safe. PRESERVE_EARLY_KENV opt_global.h diff --git a/sys/conf/std.debug b/sys/conf/std.debug index 53789f269b80..f5ed5582c78d 100644 --- a/sys/conf/std.debug +++ b/sys/conf/std.debug @@ -1,17 +1,18 @@ # # std.debug -- Enable debug options for -CURRENT. # options BUF_TRACKING # Track buffer history options DDB # Support DDB. options FULL_BUF_TRACKING # Track more buffer history options GDB # Support remote GDB. options DEADLKRES # Enable the deadlock resolver options INVARIANTS # Enable calls of extra sanity checking options INVARIANT_SUPPORT # Extra sanity checks of internal structures, required by INVARIANTS options QUEUE_MACRO_DEBUG_TRASH # Trash queue(2) internal pointers on invalidation options WITNESS # Enable checks to detect deadlocks and cycles options WITNESS_SKIPSPIN # Don't run witness on spinlocks for speed options MALLOC_DEBUG_MAXZONES=8 # Separate malloc(9) zones options VERBOSE_SYSINIT=0 # Support debug.verbose_sysinit, off by default options ALT_BREAK_TO_DEBUGGER # Enter debugger on keyboard escape sequence +options KDTRACE_MIB_SDT # Add SDT probes to network counters diff --git a/sys/conf/std.nodebug b/sys/conf/std.nodebug index 38eb77c8d3a7..4035e28d2a62 100644 --- a/sys/conf/std.nodebug +++ b/sys/conf/std.nodebug @@ -1,28 +1,29 @@ # # std.nodebug -- Disable the debug options found in the GENERIC kernel config. # nooptions INVARIANTS nooptions INVARIANT_SUPPORT nooptions DIAGNOSTIC nooptions WITNESS nooptions WITNESS_SKIPSPIN nooptions DEBUG_VFS_LOCKS nooptions BUF_TRACKING nooptions FULL_BUF_TRACKING nooptions DEADLKRES nooptions COVERAGE nooptions KCOV nooptions MALLOC_DEBUG_MAXZONES nooptions QUEUE_MACRO_DEBUG_TRASH +nooptions KDTRACE_MIB_SDT # Net80211 debugging nooptions IEEE80211_DEBUG # USB debugging nooptions USB_DEBUG nooptions HID_DEBUG # CAM debugging nooptions CAMDEBUG nooptions CAM_DEBUG_FLAGS diff --git a/sys/netinet/in_kdtrace.c b/sys/netinet/in_kdtrace.c index bfa57bd8bf1e..7e0b9a6a9373 100644 --- a/sys/netinet/in_kdtrace.c +++ b/sys/netinet/in_kdtrace.c @@ -1,568 +1,568 @@ /*- * SPDX-License-Identifier: BSD-2-Clause * * Copyright (c) 2013 Mark Johnston * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #include #include #include SDT_PROVIDER_DEFINE(mib); SDT_PROVIDER_DEFINE(ip); SDT_PROVIDER_DEFINE(tcp); SDT_PROVIDER_DEFINE(udp); SDT_PROVIDER_DEFINE(udplite); -#ifndef KDTRACE_NO_MIB_SDT +#ifdef KDTRACE_MIB_SDT #define MIB_PROBE_IP(name) \ SDT_PROBE_DEFINE1(mib, ip, count, name, \ "int") MIB_PROBE_IP(ips_total); MIB_PROBE_IP(ips_badsum); MIB_PROBE_IP(ips_tooshort); MIB_PROBE_IP(ips_toosmall); MIB_PROBE_IP(ips_badhlen); MIB_PROBE_IP(ips_badlen); MIB_PROBE_IP(ips_fragments); MIB_PROBE_IP(ips_fragdropped); MIB_PROBE_IP(ips_fragtimeout); MIB_PROBE_IP(ips_forward); MIB_PROBE_IP(ips_fastforward); MIB_PROBE_IP(ips_cantforward); MIB_PROBE_IP(ips_redirectsent); MIB_PROBE_IP(ips_noproto); MIB_PROBE_IP(ips_delivered); MIB_PROBE_IP(ips_localout); MIB_PROBE_IP(ips_odropped); MIB_PROBE_IP(ips_reassembled); MIB_PROBE_IP(ips_fragmented); MIB_PROBE_IP(ips_ofragments); MIB_PROBE_IP(ips_cantfrag); MIB_PROBE_IP(ips_badoptions); MIB_PROBE_IP(ips_noroute); MIB_PROBE_IP(ips_badvers); MIB_PROBE_IP(ips_rawout); MIB_PROBE_IP(ips_toolong); MIB_PROBE_IP(ips_notmember); MIB_PROBE_IP(ips_nogif); MIB_PROBE_IP(ips_badaddr); #define MIB_PROBE_IP6(name) \ SDT_PROBE_DEFINE1(mib, ip6, count, name, \ "int") #define MIB_PROBE2_IP6(name) \ SDT_PROBE_DEFINE2(mib, ip6, count, name, \ "int", "int") MIB_PROBE_IP6(ip6s_total); MIB_PROBE_IP6(ip6s_tooshort); MIB_PROBE_IP6(ip6s_toosmall); MIB_PROBE_IP6(ip6s_fragments); MIB_PROBE_IP6(ip6s_fragdropped); MIB_PROBE_IP6(ip6s_fragtimeout); MIB_PROBE_IP6(ip6s_fragoverflow); MIB_PROBE_IP6(ip6s_forward); MIB_PROBE_IP6(ip6s_cantforward); MIB_PROBE_IP6(ip6s_redirectsent); MIB_PROBE_IP6(ip6s_delivered); MIB_PROBE_IP6(ip6s_localout); MIB_PROBE_IP6(ip6s_odropped); MIB_PROBE_IP6(ip6s_reassembled); MIB_PROBE_IP6(ip6s_atomicfrags); MIB_PROBE_IP6(ip6s_fragmented); MIB_PROBE_IP6(ip6s_ofragments); MIB_PROBE_IP6(ip6s_cantfrag); MIB_PROBE_IP6(ip6s_badoptions); MIB_PROBE_IP6(ip6s_noroute); MIB_PROBE_IP6(ip6s_badvers); MIB_PROBE_IP6(ip6s_rawout); MIB_PROBE_IP6(ip6s_badscope); MIB_PROBE_IP6(ip6s_notmember); MIB_PROBE2_IP6(ip6s_nxthist); MIB_PROBE_IP6(ip6s_m1); MIB_PROBE2_IP6(ip6s_m2m); MIB_PROBE_IP6(ip6s_mext1); MIB_PROBE_IP6(ip6s_mext2m); MIB_PROBE_IP6(ip6s_exthdrtoolong); MIB_PROBE_IP6(ip6s_nogif); MIB_PROBE_IP6(ip6s_toomanyhdr); MIB_PROBE_IP6(ip6s_sources_none); MIB_PROBE2_IP6(ip6s_sources_sameif); MIB_PROBE2_IP6(ip6s_sources_otherif); MIB_PROBE2_IP6(ip6s_sources_samescope); MIB_PROBE2_IP6(ip6s_sources_otherscope); MIB_PROBE2_IP6(ip6s_sources_deprecated); MIB_PROBE2_IP6(ip6s_sources_rule); #define MIB_PROBE_ICMP(name) \ SDT_PROBE_DEFINE1(mib, icmp, count, name, \ "int") #define MIB_PROBE2_ICMP(name) \ SDT_PROBE_DEFINE2(mib, icmp, count, name, \ "int", "int") MIB_PROBE_ICMP(icps_error); MIB_PROBE_ICMP(icps_oldshort); MIB_PROBE_ICMP(icps_oldicmp); MIB_PROBE2_ICMP(icps_outhist); MIB_PROBE_ICMP(icps_badcode); MIB_PROBE_ICMP(icps_tooshort); MIB_PROBE_ICMP(icps_checksum); MIB_PROBE_ICMP(icps_badlen); MIB_PROBE_ICMP(icps_reflect); MIB_PROBE2_ICMP(icps_inhist); MIB_PROBE_ICMP(icps_bmcastecho); MIB_PROBE_ICMP(icps_bmcasttstamp); MIB_PROBE_ICMP(icps_badaddr); MIB_PROBE_ICMP(icps_noroute); #define MIB_PROBE_ICMP6(name) \ SDT_PROBE_DEFINE1(mib, icmp6, count, name, \ "int") #define MIB_PROBE2_ICMP6(name) \ SDT_PROBE_DEFINE2(mib, icmp6, count, name, \ "int", "int") MIB_PROBE_ICMP6(icp6s_error); MIB_PROBE_ICMP6(icp6s_canterror); MIB_PROBE_ICMP6(icp6s_toofreq); MIB_PROBE2_ICMP6(icp6s_outhist); MIB_PROBE_ICMP6(icp6s_badcode); MIB_PROBE_ICMP6(icp6s_tooshort); MIB_PROBE_ICMP6(icp6s_checksum); MIB_PROBE_ICMP6(icp6s_badlen); MIB_PROBE_ICMP6(icp6s_dropped); MIB_PROBE_ICMP6(icp6s_reflect); MIB_PROBE2_ICMP6(icp6s_inhist); MIB_PROBE_ICMP6(icp6s_nd_toomanyopt); MIB_PROBE_ICMP6(icp6s_odst_unreach_noroute); MIB_PROBE_ICMP6(icp6s_odst_unreach_admin); MIB_PROBE_ICMP6(icp6s_odst_unreach_beyondscope); MIB_PROBE_ICMP6(icp6s_odst_unreach_addr); MIB_PROBE_ICMP6(icp6s_odst_unreach_noport); MIB_PROBE_ICMP6(icp6s_opacket_too_big); MIB_PROBE_ICMP6(icp6s_otime_exceed_transit); MIB_PROBE_ICMP6(icp6s_otime_exceed_reassembly); MIB_PROBE_ICMP6(icp6s_oparamprob_header); MIB_PROBE_ICMP6(icp6s_oparamprob_nextheader); MIB_PROBE_ICMP6(icp6s_oparamprob_option); MIB_PROBE_ICMP6(icp6s_oredirect); MIB_PROBE_ICMP6(icp6s_ounknown); MIB_PROBE_ICMP6(icp6s_pmtuchg); MIB_PROBE_ICMP6(icp6s_nd_badopt); MIB_PROBE_ICMP6(icp6s_badns); MIB_PROBE_ICMP6(icp6s_badna); MIB_PROBE_ICMP6(icp6s_badrs); MIB_PROBE_ICMP6(icp6s_badra); MIB_PROBE_ICMP6(icp6s_badredirect); MIB_PROBE_ICMP6(icp6s_overflowdefrtr); MIB_PROBE_ICMP6(icp6s_overflowprfx); MIB_PROBE_ICMP6(icp6s_overflownndp); MIB_PROBE_ICMP6(icp6s_overflowredirect); MIB_PROBE_ICMP6(icp6s_invlhlim); #define MIB_PROBE_UDP(name) SDT_PROBE_DEFINE1(mib, udp, count, name, "int") MIB_PROBE_UDP(udps_ipackets); MIB_PROBE_UDP(udps_hdrops); MIB_PROBE_UDP(udps_badsum); MIB_PROBE_UDP(udps_nosum); MIB_PROBE_UDP(udps_badlen); MIB_PROBE_UDP(udps_noport); MIB_PROBE_UDP(udps_noportbcast); MIB_PROBE_UDP(udps_fullsock); MIB_PROBE_UDP(udps_pcbcachemiss); MIB_PROBE_UDP(udps_pcbhashmiss); MIB_PROBE_UDP(udps_opackets); MIB_PROBE_UDP(udps_fastout); MIB_PROBE_UDP(udps_noportmcast); MIB_PROBE_UDP(udps_filtermcast); #define MIB_PROBE_TCP(name) SDT_PROBE_DEFINE1(mib, tcp, count, name, "int") MIB_PROBE_TCP(tcps_connattempt); MIB_PROBE_TCP(tcps_accepts); MIB_PROBE_TCP(tcps_connects); MIB_PROBE_TCP(tcps_drops); MIB_PROBE_TCP(tcps_conndrops); MIB_PROBE_TCP(tcps_minmmsdrops); MIB_PROBE_TCP(tcps_closed); MIB_PROBE_TCP(tcps_segstimed); MIB_PROBE_TCP(tcps_rttupdated); MIB_PROBE_TCP(tcps_delack); MIB_PROBE_TCP(tcps_timeoutdrop); MIB_PROBE_TCP(tcps_rexmttimeo); MIB_PROBE_TCP(tcps_persisttimeo); MIB_PROBE_TCP(tcps_keeptimeo); MIB_PROBE_TCP(tcps_keepprobe); MIB_PROBE_TCP(tcps_keepdrops); MIB_PROBE_TCP(tcps_progdrops); MIB_PROBE_TCP(tcps_sndtotal); MIB_PROBE_TCP(tcps_sndpack); MIB_PROBE_TCP(tcps_sndbyte); MIB_PROBE_TCP(tcps_sndrexmitpack); MIB_PROBE_TCP(tcps_sndrexmitbyte); MIB_PROBE_TCP(tcps_sndrexmitbad); MIB_PROBE_TCP(tcps_sndacks); MIB_PROBE_TCP(tcps_sndprobe); MIB_PROBE_TCP(tcps_sndurg); MIB_PROBE_TCP(tcps_sndwinup); MIB_PROBE_TCP(tcps_sndctrl); MIB_PROBE_TCP(tcps_rcvtotal); MIB_PROBE_TCP(tcps_rcvpack); MIB_PROBE_TCP(tcps_rcvbyte); MIB_PROBE_TCP(tcps_rcvbadsum); MIB_PROBE_TCP(tcps_rcvbadoff); MIB_PROBE_TCP(tcps_rcvreassfull); MIB_PROBE_TCP(tcps_rcvshort); MIB_PROBE_TCP(tcps_rcvduppack); MIB_PROBE_TCP(tcps_rcvdupbyte); MIB_PROBE_TCP(tcps_rcvpartduppack); MIB_PROBE_TCP(tcps_rcvpartdupbyte); MIB_PROBE_TCP(tcps_rcvoopack); MIB_PROBE_TCP(tcps_rcvoobyte); MIB_PROBE_TCP(tcps_rcvpackafterwin); MIB_PROBE_TCP(tcps_rcvbyteafterwin); MIB_PROBE_TCP(tcps_rcvafterclose); MIB_PROBE_TCP(tcps_rcvwinprobe); MIB_PROBE_TCP(tcps_rcvdupack); MIB_PROBE_TCP(tcps_rcvacktoomuch); MIB_PROBE_TCP(tcps_rcvackpack); MIB_PROBE_TCP(tcps_rcvackbyte); MIB_PROBE_TCP(tcps_rcvwinupd); MIB_PROBE_TCP(tcps_pawsdrop); MIB_PROBE_TCP(tcps_predack); MIB_PROBE_TCP(tcps_preddat); MIB_PROBE_TCP(tcps_pcbackemiss); MIB_PROBE_TCP(tcps_cachedrtt); MIB_PROBE_TCP(tcps_cachedrttvar); MIB_PROBE_TCP(tcps_cachedssthresh); MIB_PROBE_TCP(tcps_usedrtt); MIB_PROBE_TCP(tcps_usedrttvar); MIB_PROBE_TCP(tcps_usedssthresh); MIB_PROBE_TCP(tcps_persistdrop); MIB_PROBE_TCP(tcps_badsyn); MIB_PROBE_TCP(tcps_mturesent); MIB_PROBE_TCP(tcps_listendrop); MIB_PROBE_TCP(tcps_badrst); MIB_PROBE_TCP(tcps_sc_added); MIB_PROBE_TCP(tcps_sc_retransmitted); MIB_PROBE_TCP(tcps_sc_dupsyn); MIB_PROBE_TCP(tcps_sc_dropped); MIB_PROBE_TCP(tcps_sc_completed); MIB_PROBE_TCP(tcps_sc_bucketoverflow); MIB_PROBE_TCP(tcps_sc_cacheoverflow); MIB_PROBE_TCP(tcps_sc_reset); MIB_PROBE_TCP(tcps_sc_stale); MIB_PROBE_TCP(tcps_sc_aborted); MIB_PROBE_TCP(tcps_sc_badack); MIB_PROBE_TCP(tcps_sc_unreach); MIB_PROBE_TCP(tcps_sc_zonefail); MIB_PROBE_TCP(tcps_sc_sendcookie); MIB_PROBE_TCP(tcps_sc_recvcookie); MIB_PROBE_TCP(tcps_hc_added); MIB_PROBE_TCP(tcps_hc_bucketoverflow); MIB_PROBE_TCP(tcps_finwait2_drops); MIB_PROBE_TCP(tcps_sack_recovery_episode); MIB_PROBE_TCP(tcps_sack_rexmits); MIB_PROBE_TCP(tcps_sack_rexmits_tso); MIB_PROBE_TCP(tcps_sack_rexmit_bytes); MIB_PROBE_TCP(tcps_sack_rcv_blocks); MIB_PROBE_TCP(tcps_sack_send_blocks); MIB_PROBE_TCP(tcps_sack_lostrexmt); MIB_PROBE_TCP(tcps_sack_sboverflow); MIB_PROBE_TCP(tcps_ecn_rcvce); MIB_PROBE_TCP(tcps_ecn_rcvect0); MIB_PROBE_TCP(tcps_ecn_rcvect1); MIB_PROBE_TCP(tcps_ecn_shs); MIB_PROBE_TCP(tcps_ecn_rcwnd); MIB_PROBE_TCP(tcps_sig_rcvgoodsig); MIB_PROBE_TCP(tcps_sig_rcvbadsig); MIB_PROBE_TCP(tcps_sig_err_buildsig); MIB_PROBE_TCP(tcps_sig_err_sigopt); MIB_PROBE_TCP(tcps_sig_err_nosigopt); MIB_PROBE_TCP(tcps_pmtud_blackhole_activated); MIB_PROBE_TCP(tcps_pmtud_blackhole_activated_min_mss); MIB_PROBE_TCP(tcps_pmtud_blackhole_failed); MIB_PROBE_TCP(tcps_tunneled_pkts); MIB_PROBE_TCP(tcps_tunneled_errs); MIB_PROBE_TCP(tcps_dsack_count); MIB_PROBE_TCP(tcps_dsack_bytes); MIB_PROBE_TCP(tcps_dsack_tlp_bytes); MIB_PROBE_TCP(tcps_tw_recycles); MIB_PROBE_TCP(tcps_tw_resets); MIB_PROBE_TCP(tcps_tw_responds); MIB_PROBE_TCP(tcps_ace_nect); MIB_PROBE_TCP(tcps_ace_ect1); MIB_PROBE_TCP(tcps_ace_ect0); MIB_PROBE_TCP(tcps_ace_ce); MIB_PROBE_TCP(tcps_ecn_sndect0); MIB_PROBE_TCP(tcps_ecn_sndect1); MIB_PROBE_TCP(tcps_tlpresends); MIB_PROBE_TCP(tcps_tlpresend_bytes); MIB_PROBE_TCP(tcps_rcvghostack); MIB_PROBE_TCP(tcps_rcvacktooold); #define MIB_PROBE_IPSEC(name) SDT_PROBE_DEFINE1(mib, ipsec, count, name, "int") MIB_PROBE_IPSEC(ips_in_polvio); MIB_PROBE_IPSEC(ips_in_nomem); MIB_PROBE_IPSEC(ips_in_inval); MIB_PROBE_IPSEC(ips_out_polvio); MIB_PROBE_IPSEC(ips_out_nosa); MIB_PROBE_IPSEC(ips_out_nomem); MIB_PROBE_IPSEC(ips_out_noroute); MIB_PROBE_IPSEC(ips_out_inval); MIB_PROBE_IPSEC(ips_out_bundlesa); MIB_PROBE_IPSEC(ips_spdcache_hits); MIB_PROBE_IPSEC(ips_spdcache_misses); MIB_PROBE_IPSEC(ips_clcopied); MIB_PROBE_IPSEC(ips_mbinserted); MIB_PROBE_IPSEC(ips_input_front); MIB_PROBE_IPSEC(ips_input_middle); MIB_PROBE_IPSEC(ips_input_end); #define MIB_PROBE_ESP(name) SDT_PROBE_DEFINE1(mib, esp, count, name, "int") #define MIB_PROBE2_ESP(name) SDT_PROBE_DEFINE2(mib, esp, count, name, "int", "int") MIB_PROBE_ESP(esps_hdrops); MIB_PROBE_ESP(esps_nopf); MIB_PROBE_ESP(esps_notdb); MIB_PROBE_ESP(esps_badkcr); MIB_PROBE_ESP(esps_qfull); MIB_PROBE_ESP(esps_noxform); MIB_PROBE_ESP(esps_badilen); MIB_PROBE_ESP(esps_wrap); MIB_PROBE_ESP(esps_badenc); MIB_PROBE_ESP(esps_badauth); MIB_PROBE_ESP(esps_replay); MIB_PROBE_ESP(esps_input); MIB_PROBE_ESP(esps_output); MIB_PROBE_ESP(esps_invalid); MIB_PROBE_ESP(esps_ibytes); MIB_PROBE_ESP(esps_obytes); MIB_PROBE_ESP(esps_toobig); MIB_PROBE_ESP(esps_pdrops); MIB_PROBE_ESP(esps_crypto); MIB_PROBE_ESP(esps_tunnel); MIB_PROBE2_ESP(esps_hist); #define MIB_PROBE_AH(name) SDT_PROBE_DEFINE1(mib, ah, count, name, "int") #define MIB_PROBE_AH2(name) SDT_PROBE_DEFINE2(mib, ah, count, name, "int", "int") MIB_PROBE_AH(ahs_hdrops); MIB_PROBE_AH(ahs_nopf); MIB_PROBE_AH(ahs_notdb); MIB_PROBE_AH(ahs_badkcr); MIB_PROBE_AH(ahs_badauth); MIB_PROBE_AH(ahs_noxform); MIB_PROBE_AH(ahs_qfull); MIB_PROBE_AH(ahs_wrap); MIB_PROBE_AH(ahs_replay); MIB_PROBE_AH(ahs_badauthl); MIB_PROBE_AH(ahs_input); MIB_PROBE_AH(ahs_output); MIB_PROBE_AH(ahs_invalid); MIB_PROBE_AH(ahs_ibytes); MIB_PROBE_AH(ahs_obytes); MIB_PROBE_AH(ahs_toobig); MIB_PROBE_AH(ahs_pdrops); MIB_PROBE_AH(ahs_crypto); MIB_PROBE_AH(ahs_tunnel); MIB_PROBE_AH2(ahs_hist); #define MIB_PROBE_IPCOMP(name) SDT_PROBE_DEFINE1(mib, ipcomp, count, name, "int") #define MIB_PROBE_IPCOMP2(name) SDT_PROBE_DEFINE2(mib, ipcomp, count, name, "int", "int") MIB_PROBE_IPCOMP(ipcomps_hdrops); MIB_PROBE_IPCOMP(ipcomps_nopf); MIB_PROBE_IPCOMP(ipcomps_notdb); MIB_PROBE_IPCOMP(ipcomps_badkcr); MIB_PROBE_IPCOMP(ipcomps_qfull); MIB_PROBE_IPCOMP(ipcomps_noxform); MIB_PROBE_IPCOMP(ipcomps_wrap); MIB_PROBE_IPCOMP(ipcomps_input); MIB_PROBE_IPCOMP(ipcomps_output); MIB_PROBE_IPCOMP(ipcomps_invalid); MIB_PROBE_IPCOMP(ipcomps_ibytes); MIB_PROBE_IPCOMP(ipcomps_obytes); MIB_PROBE_IPCOMP(ipcomps_toobig); MIB_PROBE_IPCOMP(ipcomps_pdrops); MIB_PROBE_IPCOMP(ipcomps_crypto); MIB_PROBE_IPCOMP2(ipcomps_hist); MIB_PROBE_IPCOMP(ipcomps_threshold); MIB_PROBE_IPCOMP(ipcomps_uncompr); #endif SDT_PROBE_DEFINE6_XLATE(ip, , , receive, "void *", "pktinfo_t *", "void *", "csinfo_t *", "uint8_t *", "ipinfo_t *", "struct ifnet *", "ifinfo_t *", "struct ip *", "ipv4info_t *", "struct ip6_hdr *", "ipv6info_t *"); SDT_PROBE_DEFINE6_XLATE(ip, , , send, "void *", "pktinfo_t *", "void *", "csinfo_t *", "uint8_t *", "ipinfo_t *", "struct ifnet *", "ifinfo_t *", "struct ip *", "ipv4info_t *", "struct ip6_hdr *", "ipv6info_t *"); SDT_PROBE_DEFINE5_XLATE(tcp, , , accept__established, "void *", "pktinfo_t *", "struct tcpcb *", "csinfo_t *", "struct mbuf *", "ipinfo_t *", "struct tcpcb *", "tcpsinfo_t *" , "struct tcphdr *", "tcpinfoh_t *"); SDT_PROBE_DEFINE5_XLATE(tcp, , , accept__refused, "void *", "pktinfo_t *", "struct tcpcb *", "csinfo_t *", "struct mbuf *", "ipinfo_t *", "struct tcpcb *", "tcpsinfo_t *" , "struct tcphdr *", "tcpinfo_t *"); SDT_PROBE_DEFINE5_XLATE(tcp, , , connect__established, "void *", "pktinfo_t *", "struct tcpcb *", "csinfo_t *", "struct mbuf *", "ipinfo_t *", "struct tcpcb *", "tcpsinfo_t *" , "struct tcphdr *", "tcpinfoh_t *"); SDT_PROBE_DEFINE5_XLATE(tcp, , , connect__refused, "void *", "pktinfo_t *", "struct tcpcb *", "csinfo_t *", "struct mbuf *", "ipinfo_t *", "struct tcpcb *", "tcpsinfo_t *" , "struct tcphdr *", "tcpinfoh_t *"); SDT_PROBE_DEFINE5_XLATE(tcp, , , connect__request, "void *", "pktinfo_t *", "struct tcpcb *", "csinfo_t *", "uint8_t *", "ipinfo_t *", "struct tcpcb *", "tcpsinfo_t *" , "struct tcphdr *", "tcpinfo_t *"); SDT_PROBE_DEFINE5_XLATE(tcp, , , receive, "void *", "pktinfo_t *", "struct tcpcb *", "csinfo_t *", "struct mbuf *", "ipinfo_t *", "struct tcpcb *", "tcpsinfo_t *" , "struct tcphdr *", "tcpinfoh_t *"); SDT_PROBE_DEFINE5_XLATE(tcp, , , send, "void *", "pktinfo_t *", "struct tcpcb *", "csinfo_t *", "uint8_t *", "ipinfo_t *", "struct tcpcb *", "tcpsinfo_t *" , "struct tcphdr *", "tcpinfo_t *"); SDT_PROBE_DEFINE1_XLATE(tcp, , , siftr, "struct pkt_node *", "siftrinfo_t *"); SDT_PROBE_DEFINE3_XLATE(tcp, , , debug__input, "struct tcpcb *", "tcpsinfo_t *" , "struct tcphdr *", "tcpinfoh_t *", "struct mbuf *", "ipinfo_t *"); SDT_PROBE_DEFINE3_XLATE(tcp, , , debug__output, "struct tcpcb *", "tcpsinfo_t *" , "struct tcphdr *", "tcpinfo_t *", "struct mbuf *", "ipinfo_t *"); SDT_PROBE_DEFINE2_XLATE(tcp, , , debug__user, "struct tcpcb *", "tcpsinfo_t *" , "int", "int"); SDT_PROBE_DEFINE3_XLATE(tcp, , , debug__drop, "struct tcpcb *", "tcpsinfo_t *" , "struct tcphdr *", "tcpinfoh_t *", "struct mbuf *", "ipinfo_t *"); SDT_PROBE_DEFINE6_XLATE(tcp, , , state__change, "void *", "void *", "struct tcpcb *", "csinfo_t *", "void *", "void *", "struct tcpcb *", "tcpsinfo_t *", "void *", "void *", "int", "tcplsinfo_t *"); SDT_PROBE_DEFINE6_XLATE(tcp, , , receive__autoresize, "void *", "void *", "struct tcpcb *", "csinfo_t *", "struct mbuf *", "ipinfo_t *", "struct tcpcb *", "tcpsinfo_t *" , "struct tcphdr *", "tcpinfoh_t *", "int", "int"); SDT_PROBE_DEFINE5_XLATE(udp, , , receive, "void *", "pktinfo_t *", "struct inpcb *", "csinfo_t *", "uint8_t *", "ipinfo_t *", "struct inpcb *", "udpsinfo_t *", "struct udphdr *", "udpinfo_t *"); SDT_PROBE_DEFINE5_XLATE(udp, , , send, "void *", "pktinfo_t *", "struct inpcb *", "csinfo_t *", "uint8_t *", "ipinfo_t *", "struct inpcb *", "udpsinfo_t *", "struct udphdr *", "udpinfo_t *"); SDT_PROBE_DEFINE5_XLATE(udplite, , , receive, "void *", "pktinfo_t *", "struct inpcb *", "csinfo_t *", "uint8_t *", "ipinfo_t *", "struct inpcb *", "udplitesinfo_t *", "struct udphdr *", "udpliteinfo_t *"); SDT_PROBE_DEFINE5_XLATE(udplite, , , send, "void *", "pktinfo_t *", "struct inpcb *", "csinfo_t *", "uint8_t *", "ipinfo_t *", "struct inpcb *", "udplitesinfo_t *", "struct udphdr *", "udpliteinfo_t *"); diff --git a/sys/netinet/in_kdtrace.h b/sys/netinet/in_kdtrace.h index 3fb82ad961dd..7b0d433c60d8 100644 --- a/sys/netinet/in_kdtrace.h +++ b/sys/netinet/in_kdtrace.h @@ -1,495 +1,495 @@ /*- * SPDX-License-Identifier: BSD-2-Clause * * Copyright (c) 2013 Mark Johnston * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the * distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #ifndef _SYS_IN_KDTRACE_H_ #define _SYS_IN_KDTRACE_H_ #include #define IP_PROBE(probe, arg0, arg1, arg2, arg3, arg4, arg5) \ SDT_PROBE6(ip, , , probe, arg0, arg1, arg2, arg3, arg4, arg5) #define UDP_PROBE(probe, arg0, arg1, arg2, arg3, arg4) \ SDT_PROBE5(udp, , , probe, arg0, arg1, arg2, arg3, arg4) #define UDPLITE_PROBE(probe, arg0, arg1, arg2, arg3, arg4) \ SDT_PROBE5(udplite, , , probe, arg0, arg1, arg2, arg3, arg4) #define TCP_PROBE1(probe, arg0) \ SDT_PROBE1(tcp, , , probe, arg0) #define TCP_PROBE2(probe, arg0, arg1) \ SDT_PROBE2(tcp, , , probe, arg0, arg1) #define TCP_PROBE3(probe, arg0, arg1, arg2) \ SDT_PROBE3(tcp, , , probe, arg0, arg1, arg2) #define TCP_PROBE4(probe, arg0, arg1, arg2, arg3) \ SDT_PROBE4(tcp, , , probe, arg0, arg1, arg2, arg3) #define TCP_PROBE5(probe, arg0, arg1, arg2, arg3, arg4) \ SDT_PROBE5(tcp, , , probe, arg0, arg1, arg2, arg3, arg4) #define TCP_PROBE6(probe, arg0, arg1, arg2, arg3, arg4, arg5) \ SDT_PROBE6(tcp, , , probe, arg0, arg1, arg2, arg3, arg4, arg5) SDT_PROVIDER_DECLARE(ip); SDT_PROVIDER_DECLARE(tcp); SDT_PROVIDER_DECLARE(udp); SDT_PROVIDER_DECLARE(udplite); -#ifndef KDTRACE_NO_MIB_SDT +#ifdef KDTRACE_MIB_SDT SDT_PROVIDER_DECLARE(mib); SDT_PROBE_DECLARE(mib, ip, count, ips_total); SDT_PROBE_DECLARE(mib, ip, count, ips_badsum); SDT_PROBE_DECLARE(mib, ip, count, ips_tooshort); SDT_PROBE_DECLARE(mib, ip, count, ips_toosmall); SDT_PROBE_DECLARE(mib, ip, count, ips_badhlen); SDT_PROBE_DECLARE(mib, ip, count, ips_badlen); SDT_PROBE_DECLARE(mib, ip, count, ips_fragments); SDT_PROBE_DECLARE(mib, ip, count, ips_fragdropped); SDT_PROBE_DECLARE(mib, ip, count, ips_fragtimeout); SDT_PROBE_DECLARE(mib, ip, count, ips_forward); SDT_PROBE_DECLARE(mib, ip, count, ips_fastforward); SDT_PROBE_DECLARE(mib, ip, count, ips_cantforward); SDT_PROBE_DECLARE(mib, ip, count, ips_redirectsent); SDT_PROBE_DECLARE(mib, ip, count, ips_noproto); SDT_PROBE_DECLARE(mib, ip, count, ips_delivered); SDT_PROBE_DECLARE(mib, ip, count, ips_localout); SDT_PROBE_DECLARE(mib, ip, count, ips_odropped); SDT_PROBE_DECLARE(mib, ip, count, ips_reassembled); SDT_PROBE_DECLARE(mib, ip, count, ips_fragmented); SDT_PROBE_DECLARE(mib, ip, count, ips_ofragments); SDT_PROBE_DECLARE(mib, ip, count, ips_cantfrag); SDT_PROBE_DECLARE(mib, ip, count, ips_badoptions); SDT_PROBE_DECLARE(mib, ip, count, ips_noroute); SDT_PROBE_DECLARE(mib, ip, count, ips_badvers); SDT_PROBE_DECLARE(mib, ip, count, ips_rawout); SDT_PROBE_DECLARE(mib, ip, count, ips_toolong); SDT_PROBE_DECLARE(mib, ip, count, ips_notmember); SDT_PROBE_DECLARE(mib, ip, count, ips_nogif); SDT_PROBE_DECLARE(mib, ip, count, ips_badaddr); SDT_PROBE_DECLARE(mib, ip6, count, ip6s_total); SDT_PROBE_DECLARE(mib, ip6, count, ip6s_tooshort); SDT_PROBE_DECLARE(mib, ip6, count, ip6s_toosmall); SDT_PROBE_DECLARE(mib, ip6, count, ip6s_fragments); SDT_PROBE_DECLARE(mib, ip6, count, ip6s_fragdropped); SDT_PROBE_DECLARE(mib, ip6, count, ip6s_fragtimeout); SDT_PROBE_DECLARE(mib, ip6, count, ip6s_fragoverflow); SDT_PROBE_DECLARE(mib, ip6, count, ip6s_forward); SDT_PROBE_DECLARE(mib, ip6, count, ip6s_cantforward); SDT_PROBE_DECLARE(mib, ip6, count, ip6s_redirectsent); SDT_PROBE_DECLARE(mib, ip6, count, ip6s_delivered); SDT_PROBE_DECLARE(mib, ip6, count, ip6s_localout); SDT_PROBE_DECLARE(mib, ip6, count, ip6s_odropped); SDT_PROBE_DECLARE(mib, ip6, count, ip6s_reassembled); SDT_PROBE_DECLARE(mib, ip6, count, ip6s_atomicfrags); SDT_PROBE_DECLARE(mib, ip6, count, ip6s_fragmented); SDT_PROBE_DECLARE(mib, ip6, count, ip6s_ofragments); SDT_PROBE_DECLARE(mib, ip6, count, ip6s_cantfrag); SDT_PROBE_DECLARE(mib, ip6, count, ip6s_badoptions); SDT_PROBE_DECLARE(mib, ip6, count, ip6s_noroute); SDT_PROBE_DECLARE(mib, ip6, count, ip6s_badvers); SDT_PROBE_DECLARE(mib, ip6, count, ip6s_rawout); SDT_PROBE_DECLARE(mib, ip6, count, ip6s_badscope); SDT_PROBE_DECLARE(mib, ip6, count, ip6s_notmember); SDT_PROBE_DECLARE(mib, ip6, count, ip6s_nxthist); SDT_PROBE_DECLARE(mib, ip6, count, ip6s_m1); SDT_PROBE_DECLARE(mib, ip6, count, ip6s_m2m); SDT_PROBE_DECLARE(mib, ip6, count, ip6s_mext1); SDT_PROBE_DECLARE(mib, ip6, count, ip6s_mext2m); SDT_PROBE_DECLARE(mib, ip6, count, ip6s_exthdrtoolong); SDT_PROBE_DECLARE(mib, ip6, count, ip6s_nogif); SDT_PROBE_DECLARE(mib, ip6, count, ip6s_toomanyhdr); SDT_PROBE_DECLARE(mib, ip6, count, ip6s_sources_none); SDT_PROBE_DECLARE(mib, ip6, count, ip6s_sources_sameif); SDT_PROBE_DECLARE(mib, ip6, count, ip6s_sources_otherif); SDT_PROBE_DECLARE(mib, ip6, count, ip6s_sources_samescope); SDT_PROBE_DECLARE(mib, ip6, count, ip6s_sources_otherscope); SDT_PROBE_DECLARE(mib, ip6, count, ip6s_sources_deprecated); SDT_PROBE_DECLARE(mib, ip6, count, ip6s_sources_rule); SDT_PROBE_DECLARE(mib, icmp, count, icps_error); SDT_PROBE_DECLARE(mib, icmp, count, icps_oldshort); SDT_PROBE_DECLARE(mib, icmp, count, icps_oldicmp); SDT_PROBE_DECLARE(mib, icmp, count, icps_outhist); SDT_PROBE_DECLARE(mib, icmp, count, icps_badcode); SDT_PROBE_DECLARE(mib, icmp, count, icps_tooshort); SDT_PROBE_DECLARE(mib, icmp, count, icps_checksum); SDT_PROBE_DECLARE(mib, icmp, count, icps_badlen); SDT_PROBE_DECLARE(mib, icmp, count, icps_reflect); SDT_PROBE_DECLARE(mib, icmp, count, icps_inhist); SDT_PROBE_DECLARE(mib, icmp, count, icps_bmcastecho); SDT_PROBE_DECLARE(mib, icmp, count, icps_bmcasttstamp); SDT_PROBE_DECLARE(mib, icmp, count, icps_badaddr); SDT_PROBE_DECLARE(mib, icmp, count, icps_noroute); SDT_PROBE_DECLARE(mib, icmp6, count, icp6s_error); SDT_PROBE_DECLARE(mib, icmp6, count, icp6s_canterror); SDT_PROBE_DECLARE(mib, icmp6, count, icp6s_toofreq); SDT_PROBE_DECLARE(mib, icmp6, count, icp6s_outhist); SDT_PROBE_DECLARE(mib, icmp6, count, icp6s_badcode); SDT_PROBE_DECLARE(mib, icmp6, count, icp6s_tooshort); SDT_PROBE_DECLARE(mib, icmp6, count, icp6s_checksum); SDT_PROBE_DECLARE(mib, icmp6, count, icp6s_badlen); SDT_PROBE_DECLARE(mib, icmp6, count, icp6s_dropped); SDT_PROBE_DECLARE(mib, icmp6, count, icp6s_reflect); SDT_PROBE_DECLARE(mib, icmp6, count, icp6s_inhist); SDT_PROBE_DECLARE(mib, icmp6, count, icp6s_nd_toomanyopt); SDT_PROBE_DECLARE(mib, icmp6, count, icp6s_odst_unreach_noroute); SDT_PROBE_DECLARE(mib, icmp6, count, icp6s_odst_unreach_admin); SDT_PROBE_DECLARE(mib, icmp6, count, icp6s_odst_unreach_beyondscope); SDT_PROBE_DECLARE(mib, icmp6, count, icp6s_odst_unreach_addr); SDT_PROBE_DECLARE(mib, icmp6, count, icp6s_odst_unreach_noport); SDT_PROBE_DECLARE(mib, icmp6, count, icp6s_opacket_too_big); SDT_PROBE_DECLARE(mib, icmp6, count, icp6s_otime_exceed_transit); SDT_PROBE_DECLARE(mib, icmp6, count, icp6s_otime_exceed_reassembly); SDT_PROBE_DECLARE(mib, icmp6, count, icp6s_oparamprob_header); SDT_PROBE_DECLARE(mib, icmp6, count, icp6s_oparamprob_nextheader); SDT_PROBE_DECLARE(mib, icmp6, count, icp6s_oparamprob_option); SDT_PROBE_DECLARE(mib, icmp6, count, icp6s_oredirect); SDT_PROBE_DECLARE(mib, icmp6, count, icp6s_ounknown); SDT_PROBE_DECLARE(mib, icmp6, count, icp6s_pmtuchg); SDT_PROBE_DECLARE(mib, icmp6, count, icp6s_nd_badopt); SDT_PROBE_DECLARE(mib, icmp6, count, icp6s_badns); SDT_PROBE_DECLARE(mib, icmp6, count, icp6s_badna); SDT_PROBE_DECLARE(mib, icmp6, count, icp6s_badrs); SDT_PROBE_DECLARE(mib, icmp6, count, icp6s_badra); SDT_PROBE_DECLARE(mib, icmp6, count, icp6s_badredirect); SDT_PROBE_DECLARE(mib, icmp6, count, icp6s_overflowdefrtr); SDT_PROBE_DECLARE(mib, icmp6, count, icp6s_overflowprfx); SDT_PROBE_DECLARE(mib, icmp6, count, icp6s_overflownndp); SDT_PROBE_DECLARE(mib, icmp6, count, icp6s_overflowredirect); SDT_PROBE_DECLARE(mib, icmp6, count, icp6s_invlhlim); SDT_PROBE_DECLARE(mib, udp, count, udps_ipackets); SDT_PROBE_DECLARE(mib, udp, count, udps_hdrops); SDT_PROBE_DECLARE(mib, udp, count, udps_badsum); SDT_PROBE_DECLARE(mib, udp, count, udps_nosum); SDT_PROBE_DECLARE(mib, udp, count, udps_badlen); SDT_PROBE_DECLARE(mib, udp, count, udps_noport); SDT_PROBE_DECLARE(mib, udp, count, udps_noportbcast); SDT_PROBE_DECLARE(mib, udp, count, udps_fullsock); SDT_PROBE_DECLARE(mib, udp, count, udps_pcbcachemiss); SDT_PROBE_DECLARE(mib, udp, count, udps_pcbhashmiss); SDT_PROBE_DECLARE(mib, udp, count, udps_opackets); SDT_PROBE_DECLARE(mib, udp, count, udps_fastout); SDT_PROBE_DECLARE(mib, udp, count, udps_noportmcast); SDT_PROBE_DECLARE(mib, udp, count, udps_filtermcast); SDT_PROBE_DECLARE(mib, tcp, count, tcps_connattempt); SDT_PROBE_DECLARE(mib, tcp, count, tcps_accepts); SDT_PROBE_DECLARE(mib, tcp, count, tcps_connects); SDT_PROBE_DECLARE(mib, tcp, count, tcps_drops); SDT_PROBE_DECLARE(mib, tcp, count, tcps_conndrops); SDT_PROBE_DECLARE(mib, tcp, count, tcps_minmssdrops); SDT_PROBE_DECLARE(mib, tcp, count, tcps_closed); SDT_PROBE_DECLARE(mib, tcp, count, tcps_segstimed); SDT_PROBE_DECLARE(mib, tcp, count, tcps_rttupdated); SDT_PROBE_DECLARE(mib, tcp, count, tcps_delack); SDT_PROBE_DECLARE(mib, tcp, count, tcps_timeoutdrop); SDT_PROBE_DECLARE(mib, tcp, count, tcps_rexmttimeo); SDT_PROBE_DECLARE(mib, tcp, count, tcps_persisttimeo); SDT_PROBE_DECLARE(mib, tcp, count, tcps_keeptimeo); SDT_PROBE_DECLARE(mib, tcp, count, tcps_keepprobe); SDT_PROBE_DECLARE(mib, tcp, count, tcps_keepdrops); SDT_PROBE_DECLARE(mib, tcp, count, tcps_progdrops); SDT_PROBE_DECLARE(mib, tcp, count, tcps_sndtotal); SDT_PROBE_DECLARE(mib, tcp, count, tcps_sndpack); SDT_PROBE_DECLARE(mib, tcp, count, tcps_sndbyte); SDT_PROBE_DECLARE(mib, tcp, count, tcps_sndrexmitpack); SDT_PROBE_DECLARE(mib, tcp, count, tcps_sndrexmitbyte); SDT_PROBE_DECLARE(mib, tcp, count, tcps_sndrexmitbad); SDT_PROBE_DECLARE(mib, tcp, count, tcps_sndacks); SDT_PROBE_DECLARE(mib, tcp, count, tcps_sndprobe); SDT_PROBE_DECLARE(mib, tcp, count, tcps_sndurg); SDT_PROBE_DECLARE(mib, tcp, count, tcps_sndwinup); SDT_PROBE_DECLARE(mib, tcp, count, tcps_sndctrl); SDT_PROBE_DECLARE(mib, tcp, count, tcps_rcvtotal); SDT_PROBE_DECLARE(mib, tcp, count, tcps_rcvpack); SDT_PROBE_DECLARE(mib, tcp, count, tcps_rcvbyte); SDT_PROBE_DECLARE(mib, tcp, count, tcps_rcvbadsum); SDT_PROBE_DECLARE(mib, tcp, count, tcps_rcvbadoff); SDT_PROBE_DECLARE(mib, tcp, count, tcps_rcvreassfull); SDT_PROBE_DECLARE(mib, tcp, count, tcps_rcvshort); SDT_PROBE_DECLARE(mib, tcp, count, tcps_rcvduppack); SDT_PROBE_DECLARE(mib, tcp, count, tcps_rcvdupbyte); SDT_PROBE_DECLARE(mib, tcp, count, tcps_rcvpartduppack); SDT_PROBE_DECLARE(mib, tcp, count, tcps_rcvpartdupbyte); SDT_PROBE_DECLARE(mib, tcp, count, tcps_rcvoopack); SDT_PROBE_DECLARE(mib, tcp, count, tcps_rcvoobyte); SDT_PROBE_DECLARE(mib, tcp, count, tcps_rcvpackafterwin); SDT_PROBE_DECLARE(mib, tcp, count, tcps_rcvbyteafterwin); SDT_PROBE_DECLARE(mib, tcp, count, tcps_rcvafterclose); SDT_PROBE_DECLARE(mib, tcp, count, tcps_rcvwinprobe); SDT_PROBE_DECLARE(mib, tcp, count, tcps_rcvdupack); SDT_PROBE_DECLARE(mib, tcp, count, tcps_rcvacktoomuch); SDT_PROBE_DECLARE(mib, tcp, count, tcps_rcvackpack); SDT_PROBE_DECLARE(mib, tcp, count, tcps_rcvackbyte); SDT_PROBE_DECLARE(mib, tcp, count, tcps_rcvwinupd); SDT_PROBE_DECLARE(mib, tcp, count, tcps_pawsdrop); SDT_PROBE_DECLARE(mib, tcp, count, tcps_predack); SDT_PROBE_DECLARE(mib, tcp, count, tcps_preddat); SDT_PROBE_DECLARE(mib, tcp, count, tcps_pcbcachemiss); SDT_PROBE_DECLARE(mib, tcp, count, tcps_cachedrtt); SDT_PROBE_DECLARE(mib, tcp, count, tcps_cachedrttvar); SDT_PROBE_DECLARE(mib, tcp, count, tcps_cachedssthresh); SDT_PROBE_DECLARE(mib, tcp, count, tcps_usedrtt); SDT_PROBE_DECLARE(mib, tcp, count, tcps_usedrttvar); SDT_PROBE_DECLARE(mib, tcp, count, tcps_usedssthresh); SDT_PROBE_DECLARE(mib, tcp, count, tcps_persistdrop); SDT_PROBE_DECLARE(mib, tcp, count, tcps_badsyn); SDT_PROBE_DECLARE(mib, tcp, count, tcps_mturesent); SDT_PROBE_DECLARE(mib, tcp, count, tcps_listendrop); SDT_PROBE_DECLARE(mib, tcp, count, tcps_badrst); SDT_PROBE_DECLARE(mib, tcp, count, tcps_sc_added); SDT_PROBE_DECLARE(mib, tcp, count, tcps_sc_retransmitted); SDT_PROBE_DECLARE(mib, tcp, count, tcps_sc_dupsyn); SDT_PROBE_DECLARE(mib, tcp, count, tcps_sc_dropped); SDT_PROBE_DECLARE(mib, tcp, count, tcps_sc_completed); SDT_PROBE_DECLARE(mib, tcp, count, tcps_sc_bucketoverflow); SDT_PROBE_DECLARE(mib, tcp, count, tcps_sc_cacheoverflow); SDT_PROBE_DECLARE(mib, tcp, count, tcps_sc_reset); SDT_PROBE_DECLARE(mib, tcp, count, tcps_sc_stale); SDT_PROBE_DECLARE(mib, tcp, count, tcps_sc_aborted); SDT_PROBE_DECLARE(mib, tcp, count, tcps_sc_badack); SDT_PROBE_DECLARE(mib, tcp, count, tcps_sc_unreach); SDT_PROBE_DECLARE(mib, tcp, count, tcps_sc_zonefail); SDT_PROBE_DECLARE(mib, tcp, count, tcps_sc_sendcookie); SDT_PROBE_DECLARE(mib, tcp, count, tcps_sc_recvcookie); SDT_PROBE_DECLARE(mib, tcp, count, tcps_hc_added); SDT_PROBE_DECLARE(mib, tcp, count, tcps_hc_bucketoverflow); SDT_PROBE_DECLARE(mib, tcp, count, tcps_finwait2_drops); SDT_PROBE_DECLARE(mib, tcp, count, tcps_sack_recovery_episode); SDT_PROBE_DECLARE(mib, tcp, count, tcps_sack_rexmits); SDT_PROBE_DECLARE(mib, tcp, count, tcps_sack_rexmits_tso); SDT_PROBE_DECLARE(mib, tcp, count, tcps_sack_rexmit_bytes); SDT_PROBE_DECLARE(mib, tcp, count, tcps_sack_rcv_blocks); SDT_PROBE_DECLARE(mib, tcp, count, tcps_sack_send_blocks); SDT_PROBE_DECLARE(mib, tcp, count, tcps_sack_lostrexmt); SDT_PROBE_DECLARE(mib, tcp, count, tcps_sack_sboverflow); SDT_PROBE_DECLARE(mib, tcp, count, tcps_ecn_rcvce); SDT_PROBE_DECLARE(mib, tcp, count, tcps_ecn_rcvect0); SDT_PROBE_DECLARE(mib, tcp, count, tcps_ecn_rcvect1); SDT_PROBE_DECLARE(mib, tcp, count, tcps_ecn_shs); SDT_PROBE_DECLARE(mib, tcp, count, tcps_ecn_rcwnd); SDT_PROBE_DECLARE(mib, tcp, count, tcps_sig_rcvgoodsig); SDT_PROBE_DECLARE(mib, tcp, count, tcps_sig_rcvbadsig); SDT_PROBE_DECLARE(mib, tcp, count, tcps_sig_err_buildsig); SDT_PROBE_DECLARE(mib, tcp, count, tcps_sig_err_sigopt); SDT_PROBE_DECLARE(mib, tcp, count, tcps_sig_err_nosigopt); SDT_PROBE_DECLARE(mib, tcp, count, tcps_pmtud_blackhole_activated); SDT_PROBE_DECLARE(mib, tcp, count, tcps_pmtud_blackhole_activated_min_mss); SDT_PROBE_DECLARE(mib, tcp, count, tcps_pmtud_blackhole_failed); SDT_PROBE_DECLARE(mib, tcp, count, tcps_tunneled_pkts); SDT_PROBE_DECLARE(mib, tcp, count, tcps_tunneled_errs); SDT_PROBE_DECLARE(mib, tcp, count, tcps_dsack_count); SDT_PROBE_DECLARE(mib, tcp, count, tcps_dsack_bytes); SDT_PROBE_DECLARE(mib, tcp, count, tcps_dsack_tlp_bytes); SDT_PROBE_DECLARE(mib, tcp, count, tcps_tw_recycles); SDT_PROBE_DECLARE(mib, tcp, count, tcps_tw_resets); SDT_PROBE_DECLARE(mib, tcp, count, tcps_tw_responds); SDT_PROBE_DECLARE(mib, tcp, count, tcps_ace_nect); SDT_PROBE_DECLARE(mib, tcp, count, tcps_ace_ect1); SDT_PROBE_DECLARE(mib, tcp, count, tcps_ace_ect0); SDT_PROBE_DECLARE(mib, tcp, count, tcps_ace_ce); SDT_PROBE_DECLARE(mib, tcp, count, tcps_ecn_sndect0); SDT_PROBE_DECLARE(mib, tcp, count, tcps_ecn_sndect1); SDT_PROBE_DECLARE(mib, tcp, count, tcps_tlpresends); SDT_PROBE_DECLARE(mib, tcp, count, tcps_tlpresend_bytes); SDT_PROBE_DECLARE(mib, tcp, count, tcps_rcvghostack); SDT_PROBE_DECLARE(mib, tcp, count, tcps_rcvacktooold); SDT_PROBE_DECLARE(mib, ipsec, count, ips_in_polvio); SDT_PROBE_DECLARE(mib, ipsec, count, ips_in_nomem); SDT_PROBE_DECLARE(mib, ipsec, count, ips_in_inval); SDT_PROBE_DECLARE(mib, ipsec, count, ips_out_polvio); SDT_PROBE_DECLARE(mib, ipsec, count, ips_out_nosa); SDT_PROBE_DECLARE(mib, ipsec, count, ips_out_nomem); SDT_PROBE_DECLARE(mib, ipsec, count, ips_out_noroute); SDT_PROBE_DECLARE(mib, ipsec, count, ips_out_inval); SDT_PROBE_DECLARE(mib, ipsec, count, ips_out_bundlesa); SDT_PROBE_DECLARE(mib, ipsec, count, ips_spdcache_hits); SDT_PROBE_DECLARE(mib, ipsec, count, ips_spdcache_misses); SDT_PROBE_DECLARE(mib, ipsec, count, ips_clcopied); SDT_PROBE_DECLARE(mib, ipsec, count, ips_mbinserted); SDT_PROBE_DECLARE(mib, ipsec, count, ips_input_front); SDT_PROBE_DECLARE(mib, ipsec, count, ips_input_middle); SDT_PROBE_DECLARE(mib, ipsec, count, ips_input_end); SDT_PROBE_DECLARE(mib, esp, count, esps_hdrops); SDT_PROBE_DECLARE(mib, esp, count, esps_nopf); SDT_PROBE_DECLARE(mib, esp, count, esps_notdb); SDT_PROBE_DECLARE(mib, esp, count, esps_badkcr); SDT_PROBE_DECLARE(mib, esp, count, esps_qfull); SDT_PROBE_DECLARE(mib, esp, count, esps_noxform); SDT_PROBE_DECLARE(mib, esp, count, esps_badilen); SDT_PROBE_DECLARE(mib, esp, count, esps_wrap); SDT_PROBE_DECLARE(mib, esp, count, esps_badenc); SDT_PROBE_DECLARE(mib, esp, count, esps_badauth); SDT_PROBE_DECLARE(mib, esp, count, esps_replay); SDT_PROBE_DECLARE(mib, esp, count, esps_input); SDT_PROBE_DECLARE(mib, esp, count, esps_output); SDT_PROBE_DECLARE(mib, esp, count, esps_invalid); SDT_PROBE_DECLARE(mib, esp, count, esps_ibytes); SDT_PROBE_DECLARE(mib, esp, count, esps_obytes); SDT_PROBE_DECLARE(mib, esp, count, esps_toobig); SDT_PROBE_DECLARE(mib, esp, count, esps_pdrops); SDT_PROBE_DECLARE(mib, esp, count, esps_crypto); SDT_PROBE_DECLARE(mib, esp, count, esps_tunnel); SDT_PROBE_DECLARE(mib, esp, count, esps_hist); SDT_PROBE_DECLARE(mib, ah, count, ahs_hdrops); SDT_PROBE_DECLARE(mib, ah, count, ahs_nopf); SDT_PROBE_DECLARE(mib, ah, count, ahs_notdb); SDT_PROBE_DECLARE(mib, ah, count, ahs_badkcr); SDT_PROBE_DECLARE(mib, ah, count, ahs_badauth); SDT_PROBE_DECLARE(mib, ah, count, ahs_noxform); SDT_PROBE_DECLARE(mib, ah, count, ahs_qfull); SDT_PROBE_DECLARE(mib, ah, count, ahs_wrap); SDT_PROBE_DECLARE(mib, ah, count, ahs_replay); SDT_PROBE_DECLARE(mib, ah, count, ahs_badauthl); SDT_PROBE_DECLARE(mib, ah, count, ahs_input); SDT_PROBE_DECLARE(mib, ah, count, ahs_output); SDT_PROBE_DECLARE(mib, ah, count, ahs_invalid); SDT_PROBE_DECLARE(mib, ah, count, ahs_ibytes); SDT_PROBE_DECLARE(mib, ah, count, ahs_obytes); SDT_PROBE_DECLARE(mib, ah, count, ahs_toobig); SDT_PROBE_DECLARE(mib, ah, count, ahs_pdrops); SDT_PROBE_DECLARE(mib, ah, count, ahs_crypto); SDT_PROBE_DECLARE(mib, ah, count, ahs_tunnel); SDT_PROBE_DECLARE(mib, ah, count, ahs_hist); SDT_PROBE_DECLARE(mib, ipcomp, count, ipcomps_hdrops); SDT_PROBE_DECLARE(mib, ipcomp, count, ipcomps_nopf); SDT_PROBE_DECLARE(mib, ipcomp, count, ipcomps_notdb); SDT_PROBE_DECLARE(mib, ipcomp, count, ipcomps_badkcr); SDT_PROBE_DECLARE(mib, ipcomp, count, ipcomps_qfull); SDT_PROBE_DECLARE(mib, ipcomp, count, ipcomps_noxform); SDT_PROBE_DECLARE(mib, ipcomp, count, ipcomps_wrap); SDT_PROBE_DECLARE(mib, ipcomp, count, ipcomps_input); SDT_PROBE_DECLARE(mib, ipcomp, count, ipcomps_output); SDT_PROBE_DECLARE(mib, ipcomp, count, ipcomps_invalid); SDT_PROBE_DECLARE(mib, ipcomp, count, ipcomps_ibytes); SDT_PROBE_DECLARE(mib, ipcomp, count, ipcomps_obytes); SDT_PROBE_DECLARE(mib, ipcomp, count, ipcomps_toobig); SDT_PROBE_DECLARE(mib, ipcomp, count, ipcomps_pdrops); SDT_PROBE_DECLARE(mib, ipcomp, count, ipcomps_crypto); SDT_PROBE_DECLARE(mib, ipcomp, count, ipcomps_hist); SDT_PROBE_DECLARE(mib, ipcomp, count, ipcomps_threshold); SDT_PROBE_DECLARE(mib, ipcomp, count, ipcomps_uncompr); #endif SDT_PROBE_DECLARE(ip, , , receive); SDT_PROBE_DECLARE(ip, , , send); SDT_PROBE_DECLARE(tcp, , , accept__established); SDT_PROBE_DECLARE(tcp, , , accept__refused); SDT_PROBE_DECLARE(tcp, , , connect__established); SDT_PROBE_DECLARE(tcp, , , connect__refused); SDT_PROBE_DECLARE(tcp, , , connect__request); SDT_PROBE_DECLARE(tcp, , , receive); SDT_PROBE_DECLARE(tcp, , , send); SDT_PROBE_DECLARE(tcp, , , siftr); SDT_PROBE_DECLARE(tcp, , , state__change); SDT_PROBE_DECLARE(tcp, , , debug__input); SDT_PROBE_DECLARE(tcp, , , debug__output); SDT_PROBE_DECLARE(tcp, , , debug__user); SDT_PROBE_DECLARE(tcp, , , debug__drop); SDT_PROBE_DECLARE(tcp, , , receive__autoresize); SDT_PROBE_DECLARE(udp, , , receive); SDT_PROBE_DECLARE(udp, , , send); SDT_PROBE_DECLARE(udplite, , , receive); SDT_PROBE_DECLARE(udplite, , , send); /* * These constants originate from the 4.4BSD sys/protosw.h. They lost * their initial purpose in 2c37256e5a59, when single pr_usrreq method * was split into multiple methods. However, they were used by TCPDEBUG, * a feature barely used, but it kept them in the tree for many years. * In 5d06879adb95 DTrace probes started to use them. Note that they * are not documented in dtrace_tcp(4), so they are likely to be * eventually renamed to something better and extended/trimmed. */ #define PRU_ATTACH 0 /* attach protocol to up */ #define PRU_DETACH 1 /* detach protocol from up */ #define PRU_BIND 2 /* bind socket to address */ #define PRU_LISTEN 3 /* listen for connection */ #define PRU_CONNECT 4 /* establish connection to peer */ #define PRU_ACCEPT 5 /* accept connection from peer */ #define PRU_DISCONNECT 6 /* disconnect from peer */ #define PRU_SHUTDOWN 7 /* won't send any more data */ #define PRU_RCVD 8 /* have taken data; more room now */ #define PRU_SEND 9 /* send this data */ #define PRU_ABORT 10 /* abort (fast DISCONNECT, DETATCH) */ #define PRU_CONTROL 11 /* control operations on protocol */ #define PRU_SENSE 12 /* return status into m */ #define PRU_RCVOOB 13 /* retrieve out of band data */ #define PRU_SENDOOB 14 /* send out of band data */ #define PRU_SOCKADDR 15 /* fetch socket's address */ #define PRU_PEERADDR 16 /* fetch peer's address */ #define PRU_CONNECT2 17 /* connect two sockets */ /* begin for protocols internal use */ #define PRU_FASTTIMO 18 /* 200ms timeout */ #define PRU_SLOWTIMO 19 /* 500ms timeout */ #define PRU_PROTORCV 20 /* receive from below */ #define PRU_PROTOSEND 21 /* send to below */ /* end for protocol's internal use */ #define PRU_SEND_EOF 22 /* send and close */ #define PRU_SOSETLABEL 23 /* MAC label change */ #define PRU_CLOSE 24 /* socket close */ #define PRU_FLUSH 25 /* flush the socket */ #define PRU_NREQ 25 #ifdef PRUREQUESTS const char *prurequests[] = { "ATTACH", "DETACH", "BIND", "LISTEN", "CONNECT", "ACCEPT", "DISCONNECT", "SHUTDOWN", "RCVD", "SEND", "ABORT", "CONTROL", "SENSE", "RCVOOB", "SENDOOB", "SOCKADDR", "PEERADDR", "CONNECT2", "FASTTIMO", "SLOWTIMO", "PROTORCV", "PROTOSEND", "SEND_EOF", "SOSETLABEL", "CLOSE", "FLUSH", }; #endif #endif diff --git a/sys/sys/sdt.h b/sys/sys/sdt.h index 5fa612fcf632..cd45bc1a1ffd 100644 --- a/sys/sys/sdt.h +++ b/sys/sys/sdt.h @@ -1,470 +1,470 @@ /*- * SPDX-License-Identifier: BSD-2-Clause * * Copyright 2006-2008 John Birrell * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * * Statically Defined Tracing (SDT) definitions. * */ #ifndef _SYS_SDT_H #define _SYS_SDT_H #ifndef _KERNEL #define _DTRACE_VERSION 1 #define DTRACE_PROBE(prov, name) { \ extern void __dtrace_##prov##___##name(void); \ __dtrace_##prov##___##name(); \ } #define DTRACE_PROBE1(prov, name, arg1) { \ extern void __dtrace_##prov##___##name(unsigned long); \ __dtrace_##prov##___##name((unsigned long)arg1); \ } #define DTRACE_PROBE2(prov, name, arg1, arg2) { \ extern void __dtrace_##prov##___##name(unsigned long, \ unsigned long); \ __dtrace_##prov##___##name((unsigned long)arg1, \ (unsigned long)arg2); \ } #define DTRACE_PROBE3(prov, name, arg1, arg2, arg3) { \ extern void __dtrace_##prov##___##name(unsigned long, \ unsigned long, unsigned long); \ __dtrace_##prov##___##name((unsigned long)arg1, \ (unsigned long)arg2, (unsigned long)arg3); \ } #define DTRACE_PROBE4(prov, name, arg1, arg2, arg3, arg4) { \ extern void __dtrace_##prov##___##name(unsigned long, \ unsigned long, unsigned long, unsigned long); \ __dtrace_##prov##___##name((unsigned long)arg1, \ (unsigned long)arg2, (unsigned long)arg3, \ (unsigned long)arg4); \ } #define DTRACE_PROBE5(prov, name, arg1, arg2, arg3, arg4, arg5) { \ extern void __dtrace_##prov##___##name(unsigned long, \ unsigned long, unsigned long, unsigned long, unsigned long);\ __dtrace_##prov##___##name((unsigned long)arg1, \ (unsigned long)arg2, (unsigned long)arg3, \ (unsigned long)arg4, (unsigned long)arg5); \ } #else /* _KERNEL */ #include #include extern volatile bool sdt_probes_enabled; #ifndef KDTRACE_HOOKS #define __sdt_used __unused #define SDT_PROVIDER_DEFINE(prov) #define SDT_PROVIDER_DECLARE(prov) #define SDT_PROBE_DEFINE(prov, mod, func, name) #define SDT_PROBE_DECLARE(prov, mod, func, name) #define SDT_PROBES_ENABLED() 0 #define SDT_PROBE(prov, mod, func, name, arg0, arg1, arg2, arg3, arg4) #define SDT_PROBE_ARGTYPE(prov, mod, func, name, num, type, xtype) #define SDT_PROBE_DEFINE0(prov, mod, func, name) #define SDT_PROBE_DEFINE1(prov, mod, func, name, arg0) #define SDT_PROBE_DEFINE2(prov, mod, func, name, arg0, arg1) #define SDT_PROBE_DEFINE3(prov, mod, func, name, arg0, arg1, arg2) #define SDT_PROBE_DEFINE4(prov, mod, func, name, arg0, arg1, arg2, arg3) #define SDT_PROBE_DEFINE5(prov, mod, func, name, arg0, arg1, arg2, arg3, arg4) #define SDT_PROBE_DEFINE6(prov, mod, func, name, arg0, arg1, arg2, \ arg3, arg4, arg5) #define SDT_PROBE0(prov, mod, func, name) #define SDT_PROBE1(prov, mod, func, name, arg0) #define SDT_PROBE2(prov, mod, func, name, arg0, arg1) #define SDT_PROBE3(prov, mod, func, name, arg0, arg1, arg2) #define SDT_PROBE4(prov, mod, func, name, arg0, arg1, arg2, arg3) #define SDT_PROBE5(prov, mod, func, name, arg0, arg1, arg2, arg3, arg4) #define SDT_PROBE6(prov, mod, func, name, arg0, arg1, arg2, arg3, arg4, arg5) #define MIB_SDT_PROBE1(...) #define MIB_SDT_PROBE2(...) #define SDT_PROBE_DEFINE0_XLATE(prov, mod, func, name) #define SDT_PROBE_DEFINE1_XLATE(prov, mod, func, name, arg0, xarg0) #define SDT_PROBE_DEFINE2_XLATE(prov, mod, func, name, arg0, xarg0, \ arg1, xarg1) #define SDT_PROBE_DEFINE3_XLATE(prov, mod, func, name, arg0, xarg0, \ arg1, xarg1, arg2, xarg2) #define SDT_PROBE_DEFINE4_XLATE(prov, mod, func, name, arg0, xarg0, \ arg1, xarg1, arg2, xarg2, arg3, xarg3) #define SDT_PROBE_DEFINE5_XLATE(prov, mod, func, name, arg0, xarg0, \ arg1, xarg1, arg2, xarg2, arg3, xarg3, arg4, xarg4) #define SDT_PROBE_DEFINE6_XLATE(prov, mod, func, name, arg0, xarg0, \ arg1, xarg1, arg2, xarg2, arg3, xarg3, arg4, xarg4, arg5, xarg5) #define DTRACE_PROBE(name) #define DTRACE_PROBE1(name, type0, arg0) #define DTRACE_PROBE2(name, type0, arg0, type1, arg1) #define DTRACE_PROBE3(name, type0, arg0, type1, arg1, type2, arg2) #define DTRACE_PROBE4(name, type0, arg0, type1, arg1, type2, arg2, type3, arg3) #define DTRACE_PROBE5(name, type0, arg0, type1, arg1, type2, arg2, type3, arg3,\ type4, arg4) #else void sdt_probe(uint32_t, uintptr_t, uintptr_t, uintptr_t, uintptr_t, uintptr_t); void sdt_probe6(uint32_t, uintptr_t, uintptr_t, uintptr_t, uintptr_t, uintptr_t, uintptr_t); #define _SDT_TRACEPOINT_SET sdt_tracepoint_set #define _SDT_TRACEPOINT_SECTION "set_sdt_tracepoint_set" bool sdt_tracepoint_valid(uintptr_t patchpoint, uintptr_t target); void sdt_tracepoint_patch(uintptr_t patchpoint, uintptr_t target); void sdt_tracepoint_restore(uintptr_t patchpoint); #define __sdt_used SET_DECLARE(sdt_providers_set, struct sdt_provider); SET_DECLARE(sdt_probes_set, struct sdt_probe); SET_DECLARE(sdt_argtypes_set, struct sdt_argtype); #define _SDT_PROBE_NAME(prov, mod, func, name) \ sdt_##prov##_##mod##_##func##_##name #define _SDT_PROVIDER_NAME(prov) \ sdt_provider_##prov #define SDT_PROVIDER_DEFINE(_prov) \ struct sdt_provider _SDT_PROVIDER_NAME(_prov) = { \ .name = #_prov, \ }; \ DATA_SET(sdt_providers_set, _SDT_PROVIDER_NAME(_prov)) #define SDT_PROVIDER_DECLARE(prov) \ extern struct sdt_provider _SDT_PROVIDER_NAME(prov) #define SDT_PROBE_DEFINE(_prov, _mod, _func, _name) \ struct sdt_probe _SDT_PROBE_NAME(_prov, _mod, _func, _name) = { \ .version = sizeof(struct sdt_probe), \ .prov = &_SDT_PROVIDER_NAME(_prov), \ .mod = #_mod, \ .func = #_func, \ .name = #_name, \ }; \ DATA_SET(sdt_probes_set, _SDT_PROBE_NAME(_prov, _mod, _func, _name)) #define SDT_PROBE_DECLARE(prov, mod, func, name) \ extern struct sdt_probe _SDT_PROBE_NAME(prov, mod, func, name) #define SDT_PROBES_ENABLED() __predict_false(sdt_probes_enabled) #ifdef _ILP32 #define _SDT_ASM_WORD ".long" #else #define _SDT_ASM_WORD ".quad" #endif #ifndef _SDT_ASM_PROBE_CONSTRAINT #define _SDT_ASM_PROBE_CONSTRAINT "i" #endif #ifndef _SDT_ASM_PROBE_OPERAND #define _SDT_ASM_PROBE_OPERAND "c" #endif /* * The asm below generates records corresponding to the structure's layout, so * the two must be kept in sync. */ struct sdt_tracepoint { struct sdt_probe *probe; uintptr_t patchpoint; uintptr_t target; STAILQ_ENTRY(sdt_tracepoint) tracepoint_entry; }; #define __SDT_PROBE(prov, mod, func, name, uniq, f, ...) do { \ __WEAK(__CONCAT(__start_set_, _SDT_TRACEPOINT_SET)); \ __WEAK(__CONCAT(__stop_set_, _SDT_TRACEPOINT_SET)); \ asm goto( \ "0:\n" \ _SDT_ASM_PATCH_INSTR "\n" \ ".pushsection " _SDT_TRACEPOINT_SECTION ", \"aw\"\n" \ _SDT_ASM_WORD " %" _SDT_ASM_PROBE_OPERAND "0\n" \ _SDT_ASM_WORD " 0b\n" \ _SDT_ASM_WORD " %l1\n" \ _SDT_ASM_WORD " 0\n" \ ".popsection\n" \ : \ : _SDT_ASM_PROBE_CONSTRAINT (&_SDT_PROBE_NAME(prov, mod, \ func, name)) \ : \ : __sdt_probe##uniq); \ if (0) { \ __sdt_probe##uniq:; \ f(_SDT_PROBE_NAME(prov, mod, func, name).id, __VA_ARGS__); \ } \ } while (0) #define _SDT_PROBE(prov, mod, func, name, uniq, f, ...) \ __SDT_PROBE(prov, mod, func, name, uniq, f, __VA_ARGS__) #define SDT_PROBE(prov, mod, func, name, arg0, arg1, arg2, arg3, arg4) \ _SDT_PROBE(prov, mod, func, name, __COUNTER__, sdt_probe, \ (uintptr_t)arg0, (uintptr_t)arg1, (uintptr_t)arg2, \ (uintptr_t)arg3, (uintptr_t)arg4) #define SDT_PROBE_ARGTYPE(_prov, _mod, _func, _name, _num, _type, _xtype) \ static struct sdt_argtype \ sdta_##_prov##_##_mod##_##_func##_##_name##_num[1] = { \ [0] = { \ .ndx = _num, \ .type = _type, \ .xtype = _xtype, \ .probe = &_SDT_PROBE_NAME(_prov, _mod, _func, _name), \ }, \ }; \ DATA_SET(sdt_argtypes_set, \ sdta_##_prov##_##_mod##_##_func##_##_name##_num); #define SDT_PROBE_DEFINE0(prov, mod, func, name) \ SDT_PROBE_DEFINE(prov, mod, func, name) #define SDT_PROBE_DEFINE1(prov, mod, func, name, arg0) \ SDT_PROBE_DEFINE(prov, mod, func, name); \ SDT_PROBE_ARGTYPE(prov, mod, func, name, 0, arg0, NULL) #define SDT_PROBE_DEFINE2(prov, mod, func, name, arg0, arg1) \ SDT_PROBE_DEFINE(prov, mod, func, name); \ SDT_PROBE_ARGTYPE(prov, mod, func, name, 0, arg0, NULL); \ SDT_PROBE_ARGTYPE(prov, mod, func, name, 1, arg1, NULL) #define SDT_PROBE_DEFINE3(prov, mod, func, name, arg0, arg1, arg2)\ SDT_PROBE_DEFINE(prov, mod, func, name); \ SDT_PROBE_ARGTYPE(prov, mod, func, name, 0, arg0, NULL); \ SDT_PROBE_ARGTYPE(prov, mod, func, name, 1, arg1, NULL); \ SDT_PROBE_ARGTYPE(prov, mod, func, name, 2, arg2, NULL) #define SDT_PROBE_DEFINE4(prov, mod, func, name, arg0, arg1, arg2, arg3) \ SDT_PROBE_DEFINE(prov, mod, func, name); \ SDT_PROBE_ARGTYPE(prov, mod, func, name, 0, arg0, NULL); \ SDT_PROBE_ARGTYPE(prov, mod, func, name, 1, arg1, NULL); \ SDT_PROBE_ARGTYPE(prov, mod, func, name, 2, arg2, NULL); \ SDT_PROBE_ARGTYPE(prov, mod, func, name, 3, arg3, NULL) #define SDT_PROBE_DEFINE5(prov, mod, func, name, arg0, arg1, arg2, arg3, arg4) \ SDT_PROBE_DEFINE(prov, mod, func, name); \ SDT_PROBE_ARGTYPE(prov, mod, func, name, 0, arg0, NULL); \ SDT_PROBE_ARGTYPE(prov, mod, func, name, 1, arg1, NULL); \ SDT_PROBE_ARGTYPE(prov, mod, func, name, 2, arg2, NULL); \ SDT_PROBE_ARGTYPE(prov, mod, func, name, 3, arg3, NULL); \ SDT_PROBE_ARGTYPE(prov, mod, func, name, 4, arg4, NULL) #define SDT_PROBE_DEFINE6(prov, mod, func, name, arg0, arg1, arg2, arg3,\ arg4, arg5) \ SDT_PROBE_DEFINE(prov, mod, func, name); \ SDT_PROBE_ARGTYPE(prov, mod, func, name, 0, arg0, NULL); \ SDT_PROBE_ARGTYPE(prov, mod, func, name, 1, arg1, NULL); \ SDT_PROBE_ARGTYPE(prov, mod, func, name, 2, arg2, NULL); \ SDT_PROBE_ARGTYPE(prov, mod, func, name, 3, arg3, NULL); \ SDT_PROBE_ARGTYPE(prov, mod, func, name, 4, arg4, NULL); \ SDT_PROBE_ARGTYPE(prov, mod, func, name, 5, arg5, NULL) #define SDT_PROBE_DEFINE0_XLATE(prov, mod, func, name) \ SDT_PROBE_DEFINE(prov, mod, func, name) #define SDT_PROBE_DEFINE1_XLATE(prov, mod, func, name, arg0, xarg0) \ SDT_PROBE_DEFINE(prov, mod, func, name); \ SDT_PROBE_ARGTYPE(prov, mod, func, name, 0, arg0, xarg0) #define SDT_PROBE_DEFINE2_XLATE(prov, mod, func, name, arg0, xarg0, \ arg1, xarg1) \ SDT_PROBE_DEFINE(prov, mod, func, name); \ SDT_PROBE_ARGTYPE(prov, mod, func, name, 0, arg0, xarg0); \ SDT_PROBE_ARGTYPE(prov, mod, func, name, 1, arg1, xarg1) #define SDT_PROBE_DEFINE3_XLATE(prov, mod, func, name, arg0, xarg0, \ arg1, xarg1, arg2, xarg2) \ SDT_PROBE_DEFINE(prov, mod, func, name); \ SDT_PROBE_ARGTYPE(prov, mod, func, name, 0, arg0, xarg0); \ SDT_PROBE_ARGTYPE(prov, mod, func, name, 1, arg1, xarg1); \ SDT_PROBE_ARGTYPE(prov, mod, func, name, 2, arg2, xarg2) #define SDT_PROBE_DEFINE4_XLATE(prov, mod, func, name, arg0, xarg0, \ arg1, xarg1, arg2, xarg2, arg3, xarg3) \ SDT_PROBE_DEFINE(prov, mod, func, name); \ SDT_PROBE_ARGTYPE(prov, mod, func, name, 0, arg0, xarg0); \ SDT_PROBE_ARGTYPE(prov, mod, func, name, 1, arg1, xarg1); \ SDT_PROBE_ARGTYPE(prov, mod, func, name, 2, arg2, xarg2); \ SDT_PROBE_ARGTYPE(prov, mod, func, name, 3, arg3, xarg3) #define SDT_PROBE_DEFINE5_XLATE(prov, mod, func, name, arg0, xarg0, \ arg1, xarg1, arg2, xarg2, arg3, xarg3, arg4, xarg4) \ SDT_PROBE_DEFINE(prov, mod, func, name); \ SDT_PROBE_ARGTYPE(prov, mod, func, name, 0, arg0, xarg0); \ SDT_PROBE_ARGTYPE(prov, mod, func, name, 1, arg1, xarg1); \ SDT_PROBE_ARGTYPE(prov, mod, func, name, 2, arg2, xarg2); \ SDT_PROBE_ARGTYPE(prov, mod, func, name, 3, arg3, xarg3); \ SDT_PROBE_ARGTYPE(prov, mod, func, name, 4, arg4, xarg4) #define SDT_PROBE_DEFINE6_XLATE(prov, mod, func, name, arg0, xarg0, \ arg1, xarg1, arg2, xarg2, arg3, xarg3, arg4, xarg4, arg5, xarg5) \ SDT_PROBE_DEFINE(prov, mod, func, name); \ SDT_PROBE_ARGTYPE(prov, mod, func, name, 0, arg0, xarg0); \ SDT_PROBE_ARGTYPE(prov, mod, func, name, 1, arg1, xarg1); \ SDT_PROBE_ARGTYPE(prov, mod, func, name, 2, arg2, xarg2); \ SDT_PROBE_ARGTYPE(prov, mod, func, name, 3, arg3, xarg3); \ SDT_PROBE_ARGTYPE(prov, mod, func, name, 4, arg4, xarg4); \ SDT_PROBE_ARGTYPE(prov, mod, func, name, 5, arg5, xarg5) #define SDT_PROBE0(prov, mod, func, name) \ SDT_PROBE(prov, mod, func, name, 0, 0, 0, 0, 0) #define SDT_PROBE1(prov, mod, func, name, arg0) \ SDT_PROBE(prov, mod, func, name, arg0, 0, 0, 0, 0) #define SDT_PROBE2(prov, mod, func, name, arg0, arg1) \ SDT_PROBE(prov, mod, func, name, arg0, arg1, 0, 0, 0) #define SDT_PROBE3(prov, mod, func, name, arg0, arg1, arg2) \ SDT_PROBE(prov, mod, func, name, arg0, arg1, arg2, 0, 0) #define SDT_PROBE4(prov, mod, func, name, arg0, arg1, arg2, arg3) \ SDT_PROBE(prov, mod, func, name, arg0, arg1, arg2, arg3, 0) #define SDT_PROBE5(prov, mod, func, name, arg0, arg1, arg2, arg3, arg4) \ SDT_PROBE(prov, mod, func, name, arg0, arg1, arg2, arg3, arg4) #define SDT_PROBE6(prov, mod, func, name, arg0, arg1, arg2, arg3, arg4, arg5) \ _SDT_PROBE(prov, mod, func, name, __COUNTER__, sdt_probe6, \ (uintptr_t)arg0, (uintptr_t)arg1, (uintptr_t)arg2, \ (uintptr_t)arg3, (uintptr_t)arg4, (uintptr_t)arg5) -#ifndef KDTRACE_NO_MIB_SDT +#ifdef KDTRACE_MIB_SDT #define MIB_SDT_PROBE1(...) SDT_PROBE1(mib, __VA_ARGS__) #define MIB_SDT_PROBE2(...) SDT_PROBE2(mib, __VA_ARGS__) #else #define MIB_SDT_PROBE1(...) #define MIB_SDT_PROBE2(...) #endif #define DTRACE_PROBE_IMPL_START(name, arg0, arg1, arg2, arg3, arg4) do { \ static SDT_PROBE_DEFINE(sdt, , , name); \ SDT_PROBE(sdt, , , name, arg0, arg1, arg2, arg3, arg4); #define DTRACE_PROBE_IMPL_END } while (0) #define DTRACE_PROBE(name) \ DTRACE_PROBE_IMPL_START(name, 0, 0, 0, 0, 0) \ DTRACE_PROBE_IMPL_END #define DTRACE_PROBE1(name, type0, arg0) \ DTRACE_PROBE_IMPL_START(name, arg0, 0, 0, 0, 0) \ SDT_PROBE_ARGTYPE(sdt, , , name, 0, #type0, NULL); \ DTRACE_PROBE_IMPL_END #define DTRACE_PROBE2(name, type0, arg0, type1, arg1) \ DTRACE_PROBE_IMPL_START(name, arg0, arg1, 0, 0, 0) \ SDT_PROBE_ARGTYPE(sdt, , , name, 0, #type0, NULL); \ SDT_PROBE_ARGTYPE(sdt, , , name, 1, #type1, NULL); \ DTRACE_PROBE_IMPL_END #define DTRACE_PROBE3(name, type0, arg0, type1, arg1, type2, arg2) \ DTRACE_PROBE_IMPL_START(name, arg0, arg1, arg2, 0, 0) \ SDT_PROBE_ARGTYPE(sdt, , , name, 0, #type0, NULL); \ SDT_PROBE_ARGTYPE(sdt, , , name, 1, #type1, NULL); \ SDT_PROBE_ARGTYPE(sdt, , , name, 2, #type2, NULL); \ DTRACE_PROBE_IMPL_END #define DTRACE_PROBE4(name, type0, arg0, type1, arg1, type2, arg2, type3, arg3) \ DTRACE_PROBE_IMPL_START(name, arg0, arg1, arg2, arg3, 0) \ SDT_PROBE_ARGTYPE(sdt, , , name, 0, #type0, NULL); \ SDT_PROBE_ARGTYPE(sdt, , , name, 1, #type1, NULL); \ SDT_PROBE_ARGTYPE(sdt, , , name, 2, #type2, NULL); \ SDT_PROBE_ARGTYPE(sdt, , , name, 3, #type3, NULL); \ DTRACE_PROBE_IMPL_END #define DTRACE_PROBE5(name, type0, arg0, type1, arg1, type2, arg2, type3, arg3, \ type4, arg4) \ DTRACE_PROBE_IMPL_START(name, arg0, arg1, arg2, arg3, arg4) \ SDT_PROBE_ARGTYPE(sdt, , , name, 0, #type0, NULL); \ SDT_PROBE_ARGTYPE(sdt, , , name, 1, #type1, NULL); \ SDT_PROBE_ARGTYPE(sdt, , , name, 2, #type2, NULL); \ SDT_PROBE_ARGTYPE(sdt, , , name, 3, #type3, NULL); \ SDT_PROBE_ARGTYPE(sdt, , , name, 4, #type4, NULL); \ DTRACE_PROBE_IMPL_END #endif /* KDTRACE_HOOKS */ /* * This type definition must match that of dtrace_probe. It is defined this * way to avoid having to rely on CDDL code. */ typedef void (*sdt_probe_func_t)(uint32_t, uintptr_t arg0, uintptr_t arg1, uintptr_t arg2, uintptr_t arg3, uintptr_t arg4, uintptr_t arg5); /* * The 'sdt' provider will set it to dtrace_probe when it loads. */ extern sdt_probe_func_t sdt_probe_func; struct sdt_probe; struct sdt_provider; struct linker_file; struct sdt_argtype { int ndx; /* Argument index. */ const char *type; /* Argument type string. */ const char *xtype; /* Translated argument type. */ TAILQ_ENTRY(sdt_argtype) argtype_entry; /* Argument type list entry. */ struct sdt_probe *probe; /* Ptr to the probe structure. */ }; struct sdt_probe { int version; /* Set to sizeof(struct sdt_probe). */ struct sdt_provider *prov; /* Ptr to the provider structure. */ TAILQ_ENTRY(sdt_probe) probe_entry; /* SDT probe list entry. */ TAILQ_HEAD(, sdt_argtype) argtype_list; STAILQ_HEAD(, sdt_tracepoint) tracepoint_list; const char *mod; const char *func; const char *name; id_t id; /* DTrace probe ID. */ int n_args; /* Number of arguments. */ struct linker_file *sdtp_lf; /* Module in which we're defined. */ }; struct sdt_provider { char *name; /* Provider name. */ TAILQ_ENTRY(sdt_provider) prov_entry; /* SDT provider list entry. */ uintptr_t id; /* DTrace provider ID. */ int sdt_refs; /* Number of module references. */ }; void sdt_probe_stub(uint32_t, uintptr_t, uintptr_t, uintptr_t, uintptr_t, uintptr_t, uintptr_t); SDT_PROVIDER_DECLARE(sdt); #endif /* _KERNEL */ #endif /* _SYS_SDT_H */