+/*!
+ * @function OSKextGrabPgoData
+ *
+ * @abstract
+ * Grab a LLVM profile data buffer from a loaded kext.
+ *
+ * @param uuid the uuid identifying the kext to retrieve data from
+ * @param pSize pointer of where to store the size of the buffer. May be NULL.
+ * @param pBuffer pointer to the output buffer. May be NULL.
+ * @param bufferSize size of the buffer pointed to by pBuffer
+ * @param wait_for_unload (boolean) sleep until the kext is unloaded
+ * @param metadata (boolean) include metadata footer
+ *
+ * @result
+ * 0 on success
+ * ENOTSUP if the kext does not have profile data to retrieve.
+ * ENOTSUP if no kext with the given UUID is found
+ * ERRORS if the provided buffer is too small
+ * EIO internal error, such as if __llvm_profile_write_buffer_internal fails
+ */
+int
+OSKextGrabPgoData(uuid_t uuid,
+ uint64_t *pSize,
+ char *pBuffer,
+ uint64_t bufferSize,
+ int wait_for_unload,
+ int metadata);
+
+/*!
+ * @function OSKextResetPgoCountersLock
+ *
+ * @abstract
+ * Call this function before trapping into the debugger to call OSKextResetPgoCounters.
+ */
+void
+OSKextResetPgoCountersLock(void);
+
+/*!
+ * @function OSKextResetPgoCountersUnlock
+ *
+ * @abstract
+ * Call this function after trapping into the debugger to call OSKextResetPgoCounters.
+ */
+void
+OSKextResetPgoCountersUnlock(void);
+
+/*!
+ * @function OSKextResetPgoCounters
+ *
+ * @abstract Reset the PGO counters for all kexts. Call only from debugger
+ * context, while holding OSKextResetPgoCountersLock().
+ */
+void
+OSKextResetPgoCounters(void);
+
+