+#define MACH_PROMOTE 0x7 /* promoted due to resource (replaced by MACH_PROMOTED) */
+#define MACH_DEMOTE 0x8 /* promotion undone (replaced by MACH_UNPROMOTED) */
+#define MACH_IDLE 0x9 /* processor idling */
+#define MACH_STACK_DEPTH 0xa /* stack depth at switch */
+#define MACH_MOVED 0xb /* did not use original scheduling decision */
+#define MACH_PSET_LOAD_AVERAGE 0xc
+#define MACH_AMP_DEBUG 0xd
+#define MACH_FAILSAFE 0xe /* tripped fixed-pri/RT failsafe */
+#define MACH_BLOCK 0xf /* thread block */
+#define MACH_WAIT 0x10 /* thread wait assertion */
+#define MACH_GET_URGENCY 0x14 /* Urgency queried by platform */
+#define MACH_URGENCY 0x15 /* Urgency (RT/BG/NORMAL) communicated
+ * to platform
+ */
+#define MACH_REDISPATCH 0x16 /* "next thread" thread redispatched */
+#define MACH_REMOTE_AST 0x17 /* AST signal issued to remote processor */
+#define MACH_SCHED_CHOOSE_PROCESSOR 0x18 /* Result of choose_processor */
+#define MACH_DEEP_IDLE 0x19 /* deep idle on master processor */
+/* unused 0x1a was MACH_SCHED_DECAY_PRIORITY */
+#define MACH_CPU_THROTTLE_DISABLE 0x1b /* Global CPU Throttle Disable */
+#define MACH_RW_PROMOTE 0x1c /* promoted due to RW lock promotion */
+#define MACH_RW_DEMOTE 0x1d /* promotion due to RW lock undone */
+#define MACH_SCHED_MAINTENANCE 0x1f /* periodic maintenance thread */
+#define MACH_DISPATCH 0x20 /* context switch completed */
+#define MACH_QUANTUM_HANDOFF 0x21 /* quantum handoff occurred */
+#define MACH_MULTIQ_DEQUEUE 0x22 /* Result of multiq dequeue */
+#define MACH_SCHED_THREAD_SWITCH 0x23 /* attempt direct context switch to hinted thread */
+#define MACH_SCHED_SMT_BALANCE 0x24 /* SMT load balancing ASTs */
+#define MACH_REMOTE_DEFERRED_AST 0x25 /* Deferred AST started against remote processor */
+#define MACH_REMOTE_CANCEL_AST 0x26 /* Canceled deferred AST for remote processor */
+#define MACH_SCHED_CHANGE_PRIORITY 0x27 /* thread sched priority changed */
+#define MACH_SCHED_UPDATE_REC_CORES 0x28 /* Change to recommended processor bitmask */
+#define MACH_STACK_WAIT 0x29 /* Thread could not be switched-to because of kernel stack shortage */
+#define MACH_THREAD_BIND 0x2a /* Thread was bound (or unbound) to a processor */
+#define MACH_WAITQ_PROMOTE 0x2b /* Thread promoted by waitq boost */
+#define MACH_WAITQ_DEMOTE 0x2c /* Thread demoted from waitq boost */
+#define MACH_SCHED_LOAD 0x2d /* load update */
+#define MACH_REC_CORES_FAILSAFE 0x2e /* recommended processor failsafe kicked in */
+#define MACH_SCHED_QUANTUM_EXPIRED 0x2f /* thread quantum expired */
+#define MACH_EXEC_PROMOTE 0x30 /* Thread promoted by exec boost */
+#define MACH_EXEC_DEMOTE 0x31 /* Thread demoted from exec boost */
+#define MACH_AMP_SIGNAL_SPILL 0x32 /* AMP spill signal sent to cpuid */
+#define MACH_AMP_STEAL 0x33 /* AMP thread stolen or spilled */
+#define MACH_SCHED_LOAD_EFFECTIVE 0x34 /* Effective scheduler load */
+/* unused MACH_PROMOTED 0x35 was: thread promoted due to mutex priority promotion */
+/* unused MACH_UNPROMOTED 0x36 was: thread unpromoted due to mutex priority promotion */
+/* unused MACH_PROMOTED_UPDATE 0x37 was: thread already promoted, but promotion priority changed */
+#define MACH_QUIESCENT_COUNTER 0x38 /* quiescent counter tick */
+#define MACH_TURNSTILE_USER_CHANGE 0x39 /* base priority change because of turnstile */
+#define MACH_AMP_RECOMMENDATION_CHANGE 0x3a /* Thread group recommendation change */
+#define MACH_TURNSTILE_KERNEL_CHANGE 0x40 /* sched priority change because of turnstile */
+
+/* Codes for Clutch Scheduler (DBG_MACH_SCHED_CLUTCH) */
+#define MACH_SCHED_CLUTCH_ROOT_BUCKET_STATE 0x0
+#define MACH_SCHED_CLUTCH_TG_BUCKET_STATE 0x1
+#define MACH_SCHED_CLUTCH_THREAD_SELECT 0x2
+#define MACH_SCHED_CLUTCH_THREAD_STATE 0x3
+#define MACH_SCHED_CLUTCH_TG_BUCKET_PRI 0x4
+
+/* Variants for MACH_MULTIQ_DEQUEUE */
+#define MACH_MULTIQ_BOUND 1
+#define MACH_MULTIQ_GROUP 2
+#define MACH_MULTIQ_GLOBAL 3
+
+/* Arguments for vm_fault (DBG_MACH_VM) */
+#define DBG_ZERO_FILL_FAULT 1
+#define DBG_PAGEIN_FAULT 2
+#define DBG_COW_FAULT 3
+#define DBG_CACHE_HIT_FAULT 4
+#define DBG_NZF_PAGE_FAULT 5
+#define DBG_GUARD_FAULT 6
+#define DBG_PAGEINV_FAULT 7
+#define DBG_PAGEIND_FAULT 8
+#define DBG_COMPRESSOR_FAULT 9
+#define DBG_COMPRESSOR_SWAPIN_FAULT 10
+
+/* Codes for IPC (DBG_MACH_IPC) */
+#define MACH_TASK_SUSPEND 0x0 /* Suspended a task */
+#define MACH_TASK_RESUME 0x1 /* Resumed a task */
+#define MACH_THREAD_SET_VOUCHER 0x2
+#define MACH_IPC_MSG_SEND 0x3 /* mach msg send, uniq msg info */
+#define MACH_IPC_MSG_RECV 0x4 /* mach_msg receive */
+#define MACH_IPC_MSG_RECV_VOUCHER_REFUSED 0x5 /* mach_msg receive, voucher refused */
+#define MACH_IPC_KMSG_FREE 0x6 /* kernel free of kmsg data */
+#define MACH_IPC_VOUCHER_CREATE 0x7 /* Voucher added to global voucher hashtable */
+#define MACH_IPC_VOUCHER_CREATE_ATTR_DATA 0x8 /* Attr data for newly created voucher */
+#define MACH_IPC_VOUCHER_DESTROY 0x9 /* Voucher removed from global voucher hashtable */
+#define MACH_IPC_KMSG_INFO 0xa /* Send/Receive info for a kmsg */
+#define MACH_IPC_KMSG_LINK 0xb /* link a kernel kmsg pointer to user mach_msg_header_t */
+#define MACH_IPC_PORT_ENTRY_MODIFY 0xc /* A port space gained or lost a port right (reference) */
+#define MACH_IPC_DESTROY_GUARDED_DESC 0xd /* Unable to receive a guarded descriptor */
+
+/* Codes for thread groups (DBG_MACH_THREAD_GROUP) */
+#define MACH_THREAD_GROUP_NEW 0x0
+#define MACH_THREAD_GROUP_FREE 0x1
+#define MACH_THREAD_GROUP_SET 0x2
+#define MACH_THREAD_GROUP_NAME 0x3
+#define MACH_THREAD_GROUP_NAME_FREE 0x4
+#define MACH_THREAD_GROUP_FLAGS 0x5
+
+/* Codes for coalitions (DBG_MACH_COALITION) */
+#define MACH_COALITION_NEW 0x0
+#define MACH_COALITION_FREE 0x1
+#define MACH_COALITION_ADOPT 0x2
+#define MACH_COALITION_REMOVE 0x3
+#define MACH_COALITION_THREAD_GROUP_SET 0x4
+
+/* Codes for pmap (DBG_MACH_PMAP) */
+#define PMAP__CREATE 0x0
+#define PMAP__DESTROY 0x1
+#define PMAP__PROTECT 0x2
+#define PMAP__PAGE_PROTECT 0x3
+#define PMAP__ENTER 0x4
+#define PMAP__REMOVE 0x5
+#define PMAP__NEST 0x6
+#define PMAP__UNNEST 0x7
+#define PMAP__FLUSH_TLBS 0x8
+#define PMAP__UPDATE_INTERRUPT 0x9
+#define PMAP__ATTRIBUTE_CLEAR 0xa
+#define PMAP__REUSABLE 0xb /* This appears to be unused */
+#define PMAP__QUERY_RESIDENT 0xc
+#define PMAP__FLUSH_KERN_TLBS 0xd
+#define PMAP__FLUSH_DELAYED_TLBS 0xe
+#define PMAP__FLUSH_TLBS_TO 0xf
+#define PMAP__FLUSH_EPT 0x10
+#define PMAP__FAST_FAULT 0x11
+#define PMAP__SWITCH 0x12
+#define PMAP__TTE 0x13
+#define PMAP__SWITCH_USER_TTB 0x14
+#define PMAP__UPDATE_CACHING 0x15
+
+/* Codes for clock (DBG_MACH_CLOCK) */
+#define MACH_EPOCH_CHANGE 0x0 /* wake epoch change */
+#define MACH_BRIDGE_RCV_TS 0x1 /* receive timestamp pair from interrupt handler */
+#define MACH_BRIDGE_REMOTE_TIME 0x2 /* calculate remote timestamp */
+#define MACH_BRIDGE_RESET_TS 0x3 /* reset timestamp conversion parameters */
+#define MACH_BRIDGE_TS_PARAMS 0x4 /* recompute timestamp conversion parameters */
+#define MACH_BRIDGE_SKIP_TS 0x5 /* skip timestamp */
+#define MACH_BRIDGE_TS_MISMATCH 0x6 /* mismatch between predicted and received remote timestamp */
+#define MACH_BRIDGE_OBSV_RATE 0x7 /* out of range observed rates */
+
+/* Codes for Stackshot/Microstackshot (DBG_MACH_STACKSHOT) */
+#define MICROSTACKSHOT_RECORD 0x0
+#define MICROSTACKSHOT_GATHER 0x1
+
+/* Codes for sysdiagnose (DBG_MACH_SYSDIAGNOSE) */
+#define SYSDIAGNOSE_NOTIFY_USER 0x0
+#define SYSDIAGNOSE_FULL 0x1
+#define SYSDIAGNOSE_STACKSHOT 0x2
+#define SYSDIAGNOSE_TAILSPIN 0x3
+
+/* Codes for Selective Forced Idle (DBG_MACH_SFI) */
+#define SFI_SET_WINDOW 0x0
+#define SFI_CANCEL_WINDOW 0x1
+#define SFI_SET_CLASS_OFFTIME 0x2
+#define SFI_CANCEL_CLASS_OFFTIME 0x3
+#define SFI_THREAD_DEFER 0x4
+#define SFI_OFF_TIMER 0x5
+#define SFI_ON_TIMER 0x6
+#define SFI_WAIT_CANCELED 0x7
+#define SFI_PID_SET_MANAGED 0x8
+#define SFI_PID_CLEAR_MANAGED 0x9
+#define SFI_GLOBAL_DEFER 0xa
+
+/* Codes for Zone Allocator (DBG_MACH_ZALLOC) */
+#define ZALLOC_ZCRAM 0x0
+
+/* Codes for Mach resource management (DBG_MACH_RESOURCE) */
+/* _K32A/B codes start at double the low nibble */
+#define RMON_ENABLE_CPUUSAGE_MONITOR 0x001
+#define RMON_CPUUSAGE_VIOLATED 0x002
+#define RMON_CPUUSAGE_SUSPENDED 0x003
+#define RMON_CPUUSAGE_VIOLATED_K32A 0x004
+#define RMON_CPUUSAGE_VIOLATED_K32B 0x005
+#define RMON_CPUUSAGE_RESUMED 0x006
+#define RMON_DISABLE_CPUUSAGE_MONITOR 0x00f
+
+#define RMON_ENABLE_CPUWAKES_MONITOR 0x011
+#define RMON_CPUWAKES_VIOLATED 0x012
+#define RMON_CPUWAKES_VIOLATED_K32A 0x014
+#define RMON_CPUWAKES_VIOLATED_K32B 0x015
+#define RMON_DISABLE_CPUWAKES_MONITOR 0x01f
+
+#define RMON_ENABLE_IO_MONITOR 0x021
+#define RMON_LOGWRITES_VIOLATED 0x022
+#define RMON_PHYSWRITES_VIOLATED 0x023
+#define RMON_LOGWRITES_VIOLATED_K32A 0x024
+#define RMON_LOGWRITES_VIOLATED_K32B 0x025
+#define RMON_DISABLE_IO_MONITOR 0x02f