diff options
author | Jeff Hostetler <jeffhost@microsoft.com> | 2019-04-15 22:39:43 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2019-04-16 06:37:06 +0200 |
commit | a089724958a99924d9ec7ff60a6aea63d03448f2 (patch) | |
tree | f1064e35b8f752995f275c0c78fb642228d95857 /trace2/tr2_tls.h | |
parent | config: initialize opts structure in repo_read_config() (diff) | |
download | git-a089724958a99924d9ec7ff60a6aea63d03448f2.tar.xz git-a089724958a99924d9ec7ff60a6aea63d03448f2.zip |
trace2: refactor setting process starting time
Create trace2_initialize_clock() and call from main() to capture
process start time in isolation and before other sub-systems are
ready.
Signed-off-by: Jeff Hostetler <jeffhost@microsoft.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'trace2/tr2_tls.h')
-rw-r--r-- | trace2/tr2_tls.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/trace2/tr2_tls.h b/trace2/tr2_tls.h index bb80e3f8e7..b1e327a928 100644 --- a/trace2/tr2_tls.h +++ b/trace2/tr2_tls.h @@ -31,7 +31,8 @@ struct tr2tls_thread_ctx { * In this and all following functions the term "self" refers to the * current thread. */ -struct tr2tls_thread_ctx *tr2tls_create_self(const char *thread_name); +struct tr2tls_thread_ctx *tr2tls_create_self(const char *thread_name, + uint64_t us_thread_start); /* * Get our TLS data. @@ -94,4 +95,9 @@ void tr2tls_release(void); */ int tr2tls_locked_increment(int *p); +/* + * Capture the process start time and do nothing else. + */ +void tr2tls_start_process_clock(void); + #endif /* TR2_TLS_H */ |