Skip to content

Commit

Permalink
trace2: add a public function for getting the SID
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
steadmon authored and gitster committed Nov 12, 2020
1 parent 81bd549 commit e97e1cf
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
5 changes: 5 additions & 0 deletions trace2.c
Original file line number Diff line number Diff line change
Expand Up @@ -792,3 +792,8 @@ void trace2_printf(const char *fmt, ...)
va_end(ap);
}
#endif

const char *trace2_session_id(void)
{
return tr2_sid_get();
}
2 changes: 2 additions & 0 deletions trace2.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 */

0 comments on commit e97e1cf

Please sign in to comment.