/* date = September 2nd 2023 6:10 pm */

#ifndef BASE_PROFILING_BY_SPALL_H
#define BASE_PROFILING_BY_SPALL_H

////////////////////////////////
// NOTE(allen): Profiling by Spall

#include "spall/spall.h"

link_global    SpallProfile spall_ctx;
link_threadvar SpallBuffer  spall_buffer;

#define prof_begin_inl(n,z) \
spall_buffer_begin(&spall_ctx, &spall_buffer, (n), (z), intrinsic_rdtsc())
#define prof_end_inl() \
spall_buffer_end(&spall_ctx, &spall_buffer, intrinsic_rdtsc())

#endif //BASE_PROFILING_BY_SPALL_H
