summaryrefslogtreecommitdiff
path: root/Documentation
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 /Documentation
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 'Documentation')
-rw-r--r--Documentation/technical/api-trace2.txt12
1 files changed, 9 insertions, 3 deletions
diff --git a/Documentation/technical/api-trace2.txt b/Documentation/technical/api-trace2.txt
index 2de565f..f37fccf 100644
--- a/Documentation/technical/api-trace2.txt
+++ b/Documentation/technical/api-trace2.txt
@@ -160,17 +160,23 @@ purposes.
These are concerned with the lifetime of the overall git process.
+`void trace2_initialize_clock()`::
+
+ Initialize the Trace2 start clock and nothing else. This should
+ be called at the very top of main() to capture the process start
+ time and reduce startup order dependencies.
+
`void trace2_initialize()`::
Determines if any Trace2 Targets should be enabled and
- initializes the Trace2 facility. This includes starting the
- elapsed time clocks and thread local storage (TLS).
+ initializes the Trace2 facility. This includes setting up the
+ Trace2 thread local storage (TLS).
+
This function emits a "version" message containing the version of git
and the Trace2 protocol.
+
This function should be called from `main()` as early as possible in
-the life of the process.
+the life of the process after essential process initialization.
`int trace2_is_enabled()`::