]> git.ipfire.org Git - thirdparty/git.git/commitdiff
trace2: add a public function for getting the SID
authorJosh Steadmon <steadmon@google.com>
Wed, 11 Nov 2020 23:29:26 +0000 (15:29 -0800)
committerJunio C Hamano <gitster@pobox.com>
Thu, 12 Nov 2020 02:26:52 +0000 (18:26 -0800)
Add a public wrapper, trace2_session_id(), around tr2_sid_get(), which
is intended to be private trace2 implementation.

Signed-off-by: Josh Steadmon <steadmon@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
trace2.c
trace2.h

index 2c6b570077b3980e9ecfeb088d49a125362610f7..256120c7fd553e81d82a1a6e1c883af6213e46b6 100644 (file)
--- a/trace2.c
+++ b/trace2.c
@@ -792,3 +792,8 @@ void trace2_printf(const char *fmt, ...)
        va_end(ap);
 }
 #endif
+
+const char *trace2_session_id(void)
+{
+       return tr2_sid_get();
+}
index b18bc5529c6e9a4692f30005ec1ca3d1803821b5..ede18c2e06373f30679a6c0ecf77b794225edbc5 100644 (file)
--- a/trace2.h
+++ b/trace2.h
@@ -500,4 +500,6 @@ void trace2_collect_process_info(enum trace2_process_info_reason reason);
        } while (0)
 #endif
 
+const char *trace2_session_id(void);
+
 #endif /* TRACE2_H */