diff options
| author | Dean Michael Berris <dberris@google.com> | 2018-10-22 06:11:50 +0000 |
|---|---|---|
| committer | Dean Michael Berris <dberris@google.com> | 2018-10-22 06:11:50 +0000 |
| commit | 2336dc3c51c8883a1ef171a4236c448b54f6993c (patch) | |
| tree | 706b410922303a2ff75a694e5c0d6981373f5530 | |
| parent | 788b17ca78e25f7eb079ce7836ce45c1dde3bb67 (diff) | |
| download | bcm5719-llvm-2336dc3c51c8883a1ef171a4236c448b54f6993c.tar.gz bcm5719-llvm-2336dc3c51c8883a1ef171a4236c448b54f6993c.zip | |
[XRay] Account for virtual memory re-use
Change the assumption when releasing memory to a buffer queue that new
generations might not be able to re-use the memory mapped addresses.
llvm-svn: 344882
| -rw-r--r-- | compiler-rt/lib/xray/xray_buffer_queue.cc | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/compiler-rt/lib/xray/xray_buffer_queue.cc b/compiler-rt/lib/xray/xray_buffer_queue.cc index fd41e5ff942..35d875a3284 100644 --- a/compiler-rt/lib/xray/xray_buffer_queue.cc +++ b/compiler-rt/lib/xray/xray_buffer_queue.cc @@ -124,13 +124,11 @@ BufferQueue::ErrorCode BufferQueue::releaseBuffer(Buffer &Buf) { return BufferQueue::ErrorCode::UnrecognizedBuffer; } - // This points to a semantic bug, we really ought to not be releasing more - // buffers than we actually get. if (LiveBuffers == 0) { Buf.Data = nullptr; Buf.Size = Buf.Size; Buf.Generation = 0; - return ErrorCode::NotEnoughMemory; + return ErrorCode::Ok; } --LiveBuffers; |

