summaryrefslogtreecommitdiff
path: root/trace2/tr2_tls.h
diff options
context:
space:
mode:
authorJeff Hostetler <jeffhost@microsoft.com>2019-04-15 20:39:43 (GMT)
committerJunio C Hamano <gitster@pobox.com>2019-04-16 04:37:06 (GMT)
commita089724958a99924d9ec7ff60a6aea63d03448f2 (patch)
treef1064e35b8f752995f275c0c78fb642228d95857 /trace2/tr2_tls.h
parent1703751f21d286b383c198157a1342c35ebc11b7 (diff)
downloadgit-a089724958a99924d9ec7ff60a6aea63d03448f2.zip
git-a089724958a99924d9ec7ff60a6aea63d03448f2.tar.gz
git-a089724958a99924d9ec7ff60a6aea63d03448f2.tar.bz2
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.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/trace2/tr2_tls.h b/trace2/tr2_tls.h
index bb80e3f..b1e327a 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 */