} \
} while (0)
-#define KERNEL_DEBUG_EARLY(x, a, b, c, d) \
- do { \
- kernel_debug_early((uint32_t)(x), (uintptr_t)(a), (uintptr_t)(b), \
- (uintptr_t)(c), (uintptr_t)(d)); \
- } while (0)
#else /* (KDEBUG_LEVEL >= KDEBUG_LEVEL_STANDARD) */
#define KERNEL_DEBUG_CONSTANT(x, a, b, c, d, e) do {} while (0)
#define KERNEL_DEBUG_CONSTANT1(x, a, b, c, d, e) do {} while (0)
-#define KERNEL_DEBUG_EARLY(x, a, b, c, d) do {} while (0)
#endif /* (KDEBUG_LEVEL >= KDEBUG_LEVEL_STANDARD) */
/*
(uintptr_t)(d), 0); \
} \
} while (0)
+
#define KERNEL_DEBUG_CONSTANT_IST1(x, a, b, c, d, e) \
do { \
if (KDBG_IMPROBABLE(kdebug_enable)) { \
(uintptr_t)(d), (uintptr_t)(e)); \
} \
} while (0)
+
+#define KERNEL_DEBUG_EARLY(x, a, b, c, d) \
+ do { \
+ kernel_debug_early((uint32_t)(x), (uintptr_t)(a), (uintptr_t)(b), \
+ (uintptr_t)(c), (uintptr_t)(d)); \
+ } while (0)
+
#else /* (KDEBUG_LEVEL >= KDEBUG_LEVEL_IST) */
#define KERNEL_DEBUG_CONSTANT_IST(type, x, a, b, c, d, e) do {} while (0)
#define KERNEL_DEBUG_CONSTANT_IST1(x, a, b, c, d, e) do {} while (0)
+#define KERNEL_DEBUG_EARLY(x, a, b, c, d) do {} while (0)
#endif /* (KDEBUG_LEVEL >= KDEBUG_LEVEL_IST) */
#if NO_KDEBUG
#pragma mark - xnu API
#ifdef XNU_KERNEL_PRIVATE
+
/* Used in early boot to log events. */
void kernel_debug_early(uint32_t debugid, uintptr_t arg1, uintptr_t arg2,
uintptr_t arg3, uintptr_t arg4);
extern void kdebug_reset(void);
void kdbg_dump_trace_to_file(const char *);
-void kdebug_init(unsigned int n_events, char *filterdesc, bool wrapping);
+
+enum kdebug_opts {
+ KDOPT_WRAPPING = 0x1,
+ KDOPT_ATBOOT = 0x2,
+};
+
+void kdebug_init(unsigned int n_events, char *filterdesc,
+ enum kdebug_opts opts);
void kdebug_trace_start(unsigned int n_events, const char *filterdesc,
- bool wrapping, bool at_wake);
+ enum kdebug_opts opts);
+uint64_t kdebug_wake(void);
void kdebug_free_early_buf(void);
void release_storage_unit(int cpu, uint32_t storage_unit);
bool allocate_storage_unit(int cpu);
#define KDBG_VFS_LOOKUP_FLAG_LOOKUP 0x01
#define KDBG_VFS_LOOKUP_FLAG_NOPROCFILT 0x02
-void kdebug_vfs_lookup(long *dbg_parms, int dbg_namelen, void *dp,
+void kdebug_vfs_lookup(unsigned long *path_words, int path_len, void *vnp,
uint32_t flags);
#endif /* XNU_KERNEL_PRIVATE */
#ifdef KERNEL_PRIVATE
#define NUMPARMS 23
-void kdebug_lookup_gen_events(long *dbg_parms, int dbg_namelen, void *dp,
+void kdebug_lookup_gen_events(long *path_words, int path_len, void *vnp,
bool lookup);
#pragma mark - EnergyTracing