#include "git-compat-util.h"
#include "strbuf.h"
#include "thread-utils.h"
#include "trace.h"
#include "trace2/tr2_tls.h"
#define TR2_REGION_NESTING_INITIAL_SIZE …
static struct tr2tls_thread_ctx *tr2tls_thread_main;
static uint64_t tr2tls_us_start_process;
static pthread_mutex_t tr2tls_mutex;
static pthread_key_t tr2tls_key;
static int tr2_next_thread_id;
void tr2tls_start_process_clock(void)
{ … }
struct tr2tls_thread_ctx *tr2tls_create_self(const char *thread_base_name,
uint64_t us_thread_start)
{ … }
struct tr2tls_thread_ctx *tr2tls_get_self(void)
{ … }
int tr2tls_is_main_thread(void)
{ … }
void tr2tls_unset_self(void)
{ … }
void tr2tls_push_self(uint64_t us_now)
{ … }
void tr2tls_pop_self(void)
{ … }
void tr2tls_pop_unwind_self(void)
{ … }
uint64_t tr2tls_region_elasped_self(uint64_t us)
{ … }
uint64_t tr2tls_absolute_elapsed(uint64_t us)
{ … }
static void tr2tls_key_destructor(void *payload)
{ … }
void tr2tls_init(void)
{ … }
void tr2tls_release(void)
{ … }
int tr2tls_locked_increment(int *p)
{ … }
void tr2tls_lock(void)
{ … }
void tr2tls_unlock(void)
{ … }