#include "xray/xray_log_interface.h"
#include "sanitizer_common/sanitizer_allocator_internal.h"
#include "sanitizer_common/sanitizer_atomic.h"
#include "sanitizer_common/sanitizer_mutex.h"
#include "xray/xray_interface.h"
#include "xray_defs.h"
namespace __xray {
static SpinMutex XRayImplMutex;
static XRayLogImpl CurrentXRayImpl{ … };
static XRayLogImpl *GlobalXRayImpl = …;
XRayBuffer NullBufferIterator(XRayBuffer) XRAY_NEVER_INSTRUMENT { … }
atomic_uintptr_t XRayBufferIterator{ … };
struct ModeImpl { … };
static ModeImpl SentinelModeImpl{ … };
static ModeImpl *ModeImpls = …;
static const ModeImpl *CurrentMode = …;
}
usingnamespace__xray;
void __xray_log_set_buffer_iterator(XRayBuffer (*Iterator)(XRayBuffer))
XRAY_NEVER_INSTRUMENT { … }
void __xray_log_remove_buffer_iterator() XRAY_NEVER_INSTRUMENT { … }
XRayLogRegisterStatus
__xray_log_register_mode(const char *Mode,
XRayLogImpl Impl) XRAY_NEVER_INSTRUMENT { … }
XRayLogRegisterStatus
__xray_log_select_mode(const char *Mode) XRAY_NEVER_INSTRUMENT { … }
const char *__xray_log_get_current_mode() XRAY_NEVER_INSTRUMENT { … }
void __xray_set_log_impl(XRayLogImpl Impl) XRAY_NEVER_INSTRUMENT { … }
void __xray_remove_log_impl() XRAY_NEVER_INSTRUMENT { … }
XRayLogInitStatus __xray_log_init(size_t BufferSize, size_t MaxBuffers,
void *Args,
size_t ArgsSize) XRAY_NEVER_INSTRUMENT { … }
XRayLogInitStatus __xray_log_init_mode(const char *Mode, const char *Config)
XRAY_NEVER_INSTRUMENT { … }
XRayLogInitStatus
__xray_log_init_mode_bin(const char *Mode, const char *Config,
size_t ConfigSize) XRAY_NEVER_INSTRUMENT { … }
XRayLogInitStatus __xray_log_finalize() XRAY_NEVER_INSTRUMENT { … }
XRayLogFlushStatus __xray_log_flushLog() XRAY_NEVER_INSTRUMENT { … }
XRayLogFlushStatus __xray_log_process_buffers(
void (*Processor)(const char *, XRayBuffer)) XRAY_NEVER_INSTRUMENT { … }