[PATCH] D37248: [XRay][compiler-rt][NFC] Refactor global TLS variables behind an accessor function.
Dean Michael Berris via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 28 21:42:38 PDT 2017
dberris created this revision.
This change hides all the initialization of thread_local variables used
by the XRay FDR mode implementation behind a function call. This makes
initialization of thread-local data to be done lazily, instead of
eagerly when they're done as globals. It also gives us an isolation
mechanism if/when we want to change the TLS implementation from using
the C++ thread_local keyword, for something more ad-hoc (potentialy
using pthread directly) on some platforms or set-ups where we cannot use
the C++ thread_local variables.
https://reviews.llvm.org/D37248
Files:
lib/xray/xray_fdr_logging.cc
lib/xray/xray_fdr_logging_impl.h
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D37248.113017.patch
Type: text/x-patch
Size: 20925 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170829/3df43bcd/attachment.bin>
More information about the llvm-commits
mailing list