[compiler-rt] r344882 - [XRay] Account for virtual memory re-use
Dean Michael Berris via llvm-commits
llvm-commits at lists.llvm.org
Sun Oct 21 23:11:50 PDT 2018
Author: dberris
Date: Sun Oct 21 23:11:50 2018
New Revision: 344882
URL: http://llvm.org/viewvc/llvm-project?rev=344882&view=rev
Log:
[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.
Modified:
compiler-rt/trunk/lib/xray/xray_buffer_queue.cc
Modified: compiler-rt/trunk/lib/xray/xray_buffer_queue.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/xray/xray_buffer_queue.cc?rev=344882&r1=344881&r2=344882&view=diff
==============================================================================
--- compiler-rt/trunk/lib/xray/xray_buffer_queue.cc (original)
+++ compiler-rt/trunk/lib/xray/xray_buffer_queue.cc Sun Oct 21 23:11:50 2018
@@ -124,13 +124,11 @@ BufferQueue::ErrorCode BufferQueue::rele
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;
More information about the llvm-commits
mailing list