llvm-project/compiler-rt/lib
Dean Michael Berris 9b57ca171d [XRay] [compiler-rt] Write buffer length to FDR log before writing buffer.
Summary:
Currently the FDR log writer, upon flushing, dumps a sequence of buffers from
its freelist to disk. A reader can read the first buffer up to an EOB record,
but then it is unclear how far ahead to scan to find the next threads traces.

There are a few ways to handle this problem.
1. The reader has externalized knowledge of the buffer size.
2. The size of buffers is in the file header or otherwise encoded in the log.
3. Only write out the portion of the buffer with records. When released, the
   buffers are marked with a size.
4. The reader looks for memory that matches a pattern and synchronizes on it.

2 and 3 seem the most flexible and 2 does not rule 3 out.

This is an implementation of 2.

In addition, the function handler for fdr more aggressively checks for
finalization and makes an attempt to release its buffer.

Reviewers: pelikan, dberris

Reviewed By: dberris

Subscribers: llvm-commits

Differential Revision: https://reviews.llvm.org/D31384

llvm-svn: 298982
2017-03-29 05:56:37 +00:00
..
BlocksRuntime Move tests for BlocksRuntime and builtins to corresponding directories under test/ 2014-02-14 09:47:31 +00:00
asan [powerpc] deactivate ManyThreadsTest asan test on powerpc64 2017-03-27 18:36:06 +00:00
builtins [Builtin] Unxfail tests for armhf 2017-03-29 03:36:46 +00:00
cfi Revert "[sancov] moving sancov rt to sancov/ directory" 2017-01-12 01:37:35 +00:00
dfsan Revert "[sancov] moving sancov rt to sancov/ directory" 2017-01-12 01:37:35 +00:00
esan Revert "[sancov] moving sancov rt to sancov/ directory" 2017-01-12 01:37:35 +00:00
interception [interception] Check for export table's size before referring to its elements. 2017-01-30 18:23:37 +00:00
lsan Postpone lsan tls allocation until required 2017-03-28 21:56:45 +00:00
msan [msan] Intercept wcsncpy, wcsnlen. 2017-03-14 23:48:37 +00:00
profile Resubmit r295469 [PGO] Suspend SIGKILL for PR_SET_PDEATHSIG in profile-write 2017-03-17 18:41:33 +00:00
safestack [compiler-rt] Do not introduce __sanitizer namespace globally 2016-09-15 21:02:18 +00:00
sanitizer_common Enable i386 builds for darwin lsan 2017-03-28 21:56:44 +00:00
scudo [scudo] 32-bit quarantine sizes adjustments and bug fixes 2017-02-03 20:49:42 +00:00
stats Revert "[sancov] moving sancov rt to sancov/ directory" 2017-01-12 01:37:35 +00:00
tsan [tsan] Only Acquire/Release GCD queues if they're not NULL 2017-03-26 20:59:23 +00:00
ubsan [ubsan] Add nullability handlers to interface file 2017-03-14 16:36:03 +00:00
xray [XRay] [compiler-rt] Write buffer length to FDR log before writing buffer. 2017-03-29 05:56:37 +00:00
CMakeLists.txt Revert "[sancov] moving sancov rt to sancov/ directory" 2017-01-12 01:37:35 +00:00