92 #ifndef XRAY_XRAY_LOG_INTERFACE_H
93 #define XRAY_XRAY_LOG_INTERFACE_H
273 void *Args,
size_t ArgsSize);
static __inline__ int32_t
__SIZE_TYPE__ size_t
The unsigned integer type of the result of the sizeof operator.
An XRayBuffer represents a section of memory which can be treated by log processing functions as byte...
A valid XRay logging implementation MUST provide all of the function pointers in XRayLogImpl when bei...
XRayLogFlushStatus(* flush_log)()
The log implementation provided routine for when __xray_log_flushLog() is called.
XRayLogInitStatus(* log_finalize)()
The log finalization routine provided by the implementation.
void(* handle_arg0)(int32_t, XRayEntryType)
The 0-argument function call handler.
XRayLogInitStatus(* log_init)(size_t, size_t, void *, size_t)
The log initialization routine provided by the implementation, always provided with the following par...
XRayEntryType
Synchronize this with AsmPrinter::SledKind in LLVM.
XRayLogFlushStatus __xray_log_flushLog()
Invokes the install implementation log flushing routine.
void __xray_log_set_buffer_iterator(XRayBuffer(*Iterator)(XRayBuffer))
Registers an iterator function which takes an XRayBuffer argument, then returns another XRayBuffer fu...
void __xray_set_log_impl(XRayLogImpl Impl)
DEPRECATED: Use the mode registration workflow instead with __xray_log_register_mode(....
void __xray_log_remove_buffer_iterator()
Removes the currently registered buffer iterator function.
XRayLogRegisterStatus __xray_log_register_mode(const char *Mode, XRayLogImpl Impl)
This function registers a logging implementation against a "mode" identifier.
XRayLogFlushStatus
This enum allows an implementation to signal log flushing operations via `__xray_log_flushLog()`,...
XRayLogFlushStatus __xray_log_process_buffers(void(*Processor)(const char *, XRayBuffer))
Invokes the provided handler to process data maintained by the logging handler.
XRayLogInitStatus __xray_log_init_mode(const char *Mode, const char *Config)
Invokes the installed initialization routine, which *must* support the string based form.
void __xray_remove_log_impl()
This function removes the currently installed implementation.
XRayLogInitStatus __xray_log_init_mode_bin(const char *Mode, const char *Config, size_t ConfigSize)
Like __xray_log_init_mode(...) this version allows for providing configurations that might have non-n...
const char * __xray_log_get_current_mode()
Returns an identifier for the currently selected XRay mode chosen through the __xray_log_select_mode(...
XRayLogInitStatus __xray_log_init(size_t BufferSize, size_t MaxBuffers, void *Args, size_t ArgsSize)
DEPRECATED: Use __xray_log_init_mode() instead, and provide all the options in string form.
XRayLogRegisterStatus __xray_log_select_mode(const char *Mode)
This function selects the implementation associated with Mode that has been registered through __xray...
XRayLogInitStatus __xray_log_finalize()
Invokes the installed implementation finalization routine.
XRayLogInitStatus
XRay allows users to implement their own logging handlers and install them to replace the default run...
@ XRAY_LOG_FINALIZED
When an implementation is done finalizing, it MUST return XRAY_LOG_FINALIZED.
@ XRAY_LOG_INITIALIZING
Some implementations support multi-stage init (or asynchronous init), and may return XRAY_LOG_INITIAL...
@ XRAY_LOG_FINALIZING
Some implementations might support multi-stage finalization (or asynchronous finalization),...
@ XRAY_LOG_UNINITIALIZED
The default state is uninitialized, and in case there were errors in the initialization,...
@ XRAY_LOG_INITIALIZED
When an implementation is done initializing, it MUST return XRAY_LOG_INITIALIZED.
XRayLogRegisterStatus
This enum indicates the installation state of a logging implementation, when associating a mode to a ...