blob: 0a3b2b96ab4207d69901568176c84cc31d6b0715 [file] [log] [blame]
Zachary Turnerbac69d32016-07-22 19:56:05 +00001//===- MappedBlockStream.cpp - Reads stream data from an MSF file ---------===//
Zachary Turner6ba65de2016-04-29 17:22:58 +00002//
3// The LLVM Compiler Infrastructure
4//
5// This file is distributed under the University of Illinois Open Source
6// License. See LICENSE.TXT for details.
7//
8//===----------------------------------------------------------------------===//
9
Zachary Turnera3225b02016-07-29 20:56:36 +000010#include "llvm/DebugInfo/MSF/MappedBlockStream.h"
Zachary Turner199f48a2016-07-28 19:11:09 +000011
Zachary Turnera3225b02016-07-29 20:56:36 +000012#include "llvm/DebugInfo/MSF/IMSFFile.h"
13#include "llvm/DebugInfo/MSF/MSFCommon.h"
14#include "llvm/DebugInfo/MSF/MSFError.h"
15#include "llvm/DebugInfo/MSF/MSFStreamLayout.h"
Zachary Turner6ba65de2016-04-29 17:22:58 +000016
17using namespace llvm;
Zachary Turnerbac69d32016-07-22 19:56:05 +000018using namespace llvm::msf;
Zachary Turner6ba65de2016-04-29 17:22:58 +000019
Zachary Turnera1657a92016-06-08 17:26:39 +000020namespace {
Zachary Turnerd66889c2016-07-28 19:12:28 +000021template <typename Base> class MappedBlockStreamImpl : public Base {
Zachary Turnera1657a92016-06-08 17:26:39 +000022public:
Zachary Turnerd66889c2016-07-28 19:12:28 +000023 template <typename... Args>
24 MappedBlockStreamImpl(Args &&... Params)
25 : Base(std::forward<Args>(Params)...) {}
Zachary Turnera1657a92016-06-08 17:26:39 +000026};
27}
28
Zachary Turner5acb4ac2016-06-10 05:09:12 +000029typedef std::pair<uint32_t, uint32_t> Interval;
30static Interval intersect(const Interval &I1, const Interval &I2) {
31 return std::make_pair(std::max(I1.first, I2.first),
32 std::min(I1.second, I2.second));
33}
34
Zachary Turnerd66889c2016-07-28 19:12:28 +000035MappedBlockStream::MappedBlockStream(uint32_t BlockSize, uint32_t NumBlocks,
Zachary Turnera3225b02016-07-29 20:56:36 +000036 const MSFStreamLayout &Layout,
Zachary Turnerd66889c2016-07-28 19:12:28 +000037 const ReadableStream &MsfData)
38 : BlockSize(BlockSize), NumBlocks(NumBlocks), StreamLayout(Layout),
39 MsfData(MsfData) {}
40
41std::unique_ptr<MappedBlockStream>
42MappedBlockStream::createStream(uint32_t BlockSize, uint32_t NumBlocks,
Zachary Turnera3225b02016-07-29 20:56:36 +000043 const MSFStreamLayout &Layout,
Zachary Turnerd66889c2016-07-28 19:12:28 +000044 const ReadableStream &MsfData) {
45 return llvm::make_unique<MappedBlockStreamImpl<MappedBlockStream>>(
46 BlockSize, NumBlocks, Layout, MsfData);
47}
48
49std::unique_ptr<MappedBlockStream>
Zachary Turnera3225b02016-07-29 20:56:36 +000050MappedBlockStream::createIndexedStream(const MSFLayout &Layout,
Zachary Turnerd66889c2016-07-28 19:12:28 +000051 const ReadableStream &MsfData,
52 uint32_t StreamIndex) {
Zachary Turnera3225b02016-07-29 20:56:36 +000053 MSFStreamLayout SL;
Zachary Turnerd66889c2016-07-28 19:12:28 +000054 SL.Blocks = Layout.StreamMap[StreamIndex];
55 SL.Length = Layout.StreamSizes[StreamIndex];
56 return llvm::make_unique<MappedBlockStreamImpl<MappedBlockStream>>(
57 Layout.SB->BlockSize, Layout.SB->NumBlocks, SL, MsfData);
58}
59
60std::unique_ptr<MappedBlockStream>
Zachary Turnera3225b02016-07-29 20:56:36 +000061MappedBlockStream::createDirectoryStream(const MSFLayout &Layout,
Zachary Turnerd66889c2016-07-28 19:12:28 +000062 const ReadableStream &MsfData) {
Zachary Turnera3225b02016-07-29 20:56:36 +000063 MSFStreamLayout SL;
Zachary Turnerd66889c2016-07-28 19:12:28 +000064 SL.Blocks = Layout.DirectoryBlocks;
65 SL.Length = Layout.SB->NumDirectoryBytes;
66 return createStream(Layout.SB->BlockSize, Layout.SB->NumBlocks, SL, MsfData);
67}
Zachary Turner6ba65de2016-04-29 17:22:58 +000068
Zachary Turner8dbe3622016-05-27 01:54:44 +000069Error MappedBlockStream::readBytes(uint32_t Offset, uint32_t Size,
70 ArrayRef<uint8_t> &Buffer) const {
71 // Make sure we aren't trying to read beyond the end of the stream.
Zachary Turnerd66889c2016-07-28 19:12:28 +000072 if (Size > StreamLayout.Length)
Zachary Turnera3225b02016-07-29 20:56:36 +000073 return make_error<MSFError>(msf_error_code::insufficient_buffer);
Zachary Turnerd66889c2016-07-28 19:12:28 +000074 if (Offset > StreamLayout.Length - Size)
Zachary Turnera3225b02016-07-29 20:56:36 +000075 return make_error<MSFError>(msf_error_code::insufficient_buffer);
Zachary Turner8dbe3622016-05-27 01:54:44 +000076
77 if (tryReadContiguously(Offset, Size, Buffer))
78 return Error::success();
79
80 auto CacheIter = CacheMap.find(Offset);
81 if (CacheIter != CacheMap.end()) {
Zachary Turner5acb4ac2016-06-10 05:09:12 +000082 // Try to find an alloc that was large enough for this request.
83 for (auto &Entry : CacheIter->second) {
84 if (Entry.size() >= Size) {
85 Buffer = Entry.slice(0, Size);
86 return Error::success();
87 }
88 }
89 }
90
91 // We couldn't find a buffer that started at the correct offset (the most
92 // common scenario). Try to see if there is a buffer that starts at some
93 // other offset but overlaps the desired range.
94 for (auto &CacheItem : CacheMap) {
95 Interval RequestExtent = std::make_pair(Offset, Offset + Size);
96
97 // We already checked this one on the fast path above.
98 if (CacheItem.first == Offset)
99 continue;
100 // If the initial extent of the cached item is beyond the ending extent
101 // of the request, there is no overlap.
102 if (CacheItem.first >= Offset + Size)
103 continue;
104
105 // We really only have to check the last item in the list, since we append
106 // in order of increasing length.
107 if (CacheItem.second.empty())
108 continue;
109
110 auto CachedAlloc = CacheItem.second.back();
111 // If the initial extent of the request is beyond the ending extent of
112 // the cached item, there is no overlap.
113 Interval CachedExtent =
114 std::make_pair(CacheItem.first, CacheItem.first + CachedAlloc.size());
115 if (RequestExtent.first >= CachedExtent.first + CachedExtent.second)
116 continue;
117
118 Interval Intersection = intersect(CachedExtent, RequestExtent);
119 // Only use this if the entire request extent is contained in the cached
120 // extent.
121 if (Intersection != RequestExtent)
122 continue;
123
124 uint32_t CacheRangeOffset =
125 AbsoluteDifference(CachedExtent.first, Intersection.first);
126 Buffer = CachedAlloc.slice(CacheRangeOffset, Size);
Zachary Turner8dbe3622016-05-27 01:54:44 +0000127 return Error::success();
128 }
129
130 // Otherwise allocate a large enough buffer in the pool, memcpy the data
Zachary Turner5acb4ac2016-06-10 05:09:12 +0000131 // into it, and return an ArrayRef to that. Do not touch existing pool
132 // allocations, as existing clients may be holding a pointer which must
133 // not be invalidated.
Zachary Turner97609bb2016-06-10 21:47:26 +0000134 uint8_t *WriteBuffer = static_cast<uint8_t *>(Pool.Allocate(Size, 8));
Zachary Turner8dbe3622016-05-27 01:54:44 +0000135 if (auto EC = readBytes(Offset, MutableArrayRef<uint8_t>(WriteBuffer, Size)))
136 return EC;
Zachary Turner5acb4ac2016-06-10 05:09:12 +0000137
138 if (CacheIter != CacheMap.end()) {
139 CacheIter->second.emplace_back(WriteBuffer, Size);
140 } else {
141 std::vector<CacheEntry> List;
142 List.emplace_back(WriteBuffer, Size);
143 CacheMap.insert(std::make_pair(Offset, List));
144 }
Zachary Turner8dbe3622016-05-27 01:54:44 +0000145 Buffer = ArrayRef<uint8_t>(WriteBuffer, Size);
146 return Error::success();
147}
148
Zachary Turner5acb4ac2016-06-10 05:09:12 +0000149Error MappedBlockStream::readLongestContiguousChunk(
150 uint32_t Offset, ArrayRef<uint8_t> &Buffer) const {
151 // Make sure we aren't trying to read beyond the end of the stream.
Zachary Turnerd66889c2016-07-28 19:12:28 +0000152 if (Offset >= StreamLayout.Length)
Zachary Turnera3225b02016-07-29 20:56:36 +0000153 return make_error<MSFError>(msf_error_code::insufficient_buffer);
Zachary Turnerd66889c2016-07-28 19:12:28 +0000154 uint32_t First = Offset / BlockSize;
Zachary Turner5acb4ac2016-06-10 05:09:12 +0000155 uint32_t Last = First;
156
Zachary Turnerd66889c2016-07-28 19:12:28 +0000157 while (Last < NumBlocks - 1) {
158 if (StreamLayout.Blocks[Last] != StreamLayout.Blocks[Last + 1] - 1)
Zachary Turner5acb4ac2016-06-10 05:09:12 +0000159 break;
160 ++Last;
161 }
162
Zachary Turnerd66889c2016-07-28 19:12:28 +0000163 uint32_t OffsetInFirstBlock = Offset % BlockSize;
164 uint32_t BytesFromFirstBlock = BlockSize - OffsetInFirstBlock;
Zachary Turner5acb4ac2016-06-10 05:09:12 +0000165 uint32_t BlockSpan = Last - First + 1;
Zachary Turnerd66889c2016-07-28 19:12:28 +0000166 uint32_t ByteSpan = BytesFromFirstBlock + (BlockSpan - 1) * BlockSize;
167
168 ArrayRef<uint8_t> BlockData;
169 uint32_t MsfOffset = blockToOffset(StreamLayout.Blocks[First], BlockSize);
170 if (auto EC = MsfData.readBytes(MsfOffset, BlockSize, BlockData))
171 return EC;
172
173 BlockData = BlockData.drop_front(OffsetInFirstBlock);
174 Buffer = ArrayRef<uint8_t>(BlockData.data(), ByteSpan);
Zachary Turner5acb4ac2016-06-10 05:09:12 +0000175 return Error::success();
176}
177
Zachary Turnerd66889c2016-07-28 19:12:28 +0000178uint32_t MappedBlockStream::getLength() const { return StreamLayout.Length; }
Zachary Turnerab58ae82016-06-30 17:43:00 +0000179
Zachary Turner8dbe3622016-05-27 01:54:44 +0000180bool MappedBlockStream::tryReadContiguously(uint32_t Offset, uint32_t Size,
181 ArrayRef<uint8_t> &Buffer) const {
182 // Attempt to fulfill the request with a reference directly into the stream.
183 // This can work even if the request crosses a block boundary, provided that
184 // all subsequent blocks are contiguous. For example, a 10k read with a 4k
185 // block size can be filled with a reference if, from the starting offset,
186 // 3 blocks in a row are contiguous.
Zachary Turnerd66889c2016-07-28 19:12:28 +0000187 uint32_t BlockNum = Offset / BlockSize;
188 uint32_t OffsetInBlock = Offset % BlockSize;
189 uint32_t BytesFromFirstBlock = std::min(Size, BlockSize - OffsetInBlock);
Zachary Turner8dbe3622016-05-27 01:54:44 +0000190 uint32_t NumAdditionalBlocks =
Zachary Turnerd66889c2016-07-28 19:12:28 +0000191 llvm::alignTo(Size - BytesFromFirstBlock, BlockSize) / BlockSize;
Zachary Turner8dbe3622016-05-27 01:54:44 +0000192
193 uint32_t RequiredContiguousBlocks = NumAdditionalBlocks + 1;
Zachary Turnerd66889c2016-07-28 19:12:28 +0000194 uint32_t E = StreamLayout.Blocks[BlockNum];
Zachary Turner8dbe3622016-05-27 01:54:44 +0000195 for (uint32_t I = 0; I < RequiredContiguousBlocks; ++I, ++E) {
Zachary Turnerd66889c2016-07-28 19:12:28 +0000196 if (StreamLayout.Blocks[I + BlockNum] != E)
Zachary Turner8dbe3622016-05-27 01:54:44 +0000197 return false;
198 }
199
Zachary Turnerd66889c2016-07-28 19:12:28 +0000200 // Read out the entire block where the requested offset starts. Then drop
201 // bytes from the beginning so that the actual starting byte lines up with
202 // the requested starting byte. Then, since we know this is a contiguous
203 // cross-block span, explicitly resize the ArrayRef to cover the entire
204 // request length.
205 ArrayRef<uint8_t> BlockData;
206 uint32_t FirstBlockAddr = StreamLayout.Blocks[BlockNum];
207 uint32_t MsfOffset = blockToOffset(FirstBlockAddr, BlockSize);
208 if (auto EC = MsfData.readBytes(MsfOffset, BlockSize, BlockData)) {
209 consumeError(std::move(EC));
David Majnemer6211b1f2016-07-10 03:34:47 +0000210 return false;
211 }
Zachary Turnerd66889c2016-07-28 19:12:28 +0000212 BlockData = BlockData.drop_front(OffsetInBlock);
213 Buffer = ArrayRef<uint8_t>(BlockData.data(), Size);
Zachary Turner8dbe3622016-05-27 01:54:44 +0000214 return true;
215}
216
Zachary Turner819e77d2016-05-06 20:51:57 +0000217Error MappedBlockStream::readBytes(uint32_t Offset,
218 MutableArrayRef<uint8_t> Buffer) const {
Zachary Turnerd66889c2016-07-28 19:12:28 +0000219 uint32_t BlockNum = Offset / BlockSize;
220 uint32_t OffsetInBlock = Offset % BlockSize;
Zachary Turner6ba65de2016-04-29 17:22:58 +0000221
222 // Make sure we aren't trying to read beyond the end of the stream.
Zachary Turnerd66889c2016-07-28 19:12:28 +0000223 if (Buffer.size() > StreamLayout.Length)
Zachary Turnera3225b02016-07-29 20:56:36 +0000224 return make_error<MSFError>(msf_error_code::insufficient_buffer);
Zachary Turnerd66889c2016-07-28 19:12:28 +0000225 if (Offset > StreamLayout.Length - Buffer.size())
Zachary Turnera3225b02016-07-29 20:56:36 +0000226 return make_error<MSFError>(msf_error_code::insufficient_buffer);
Zachary Turner6ba65de2016-04-29 17:22:58 +0000227
228 uint32_t BytesLeft = Buffer.size();
229 uint32_t BytesWritten = 0;
230 uint8_t *WriteBuffer = Buffer.data();
231 while (BytesLeft > 0) {
Zachary Turnerd66889c2016-07-28 19:12:28 +0000232 uint32_t StreamBlockAddr = StreamLayout.Blocks[BlockNum];
Zachary Turner6ba65de2016-04-29 17:22:58 +0000233
Zachary Turnerd66889c2016-07-28 19:12:28 +0000234 ArrayRef<uint8_t> BlockData;
235 uint32_t Offset = blockToOffset(StreamBlockAddr, BlockSize);
236 if (auto EC = MsfData.readBytes(Offset, BlockSize, BlockData))
237 return EC;
Zachary Turner6ba65de2016-04-29 17:22:58 +0000238
Zachary Turnerd66889c2016-07-28 19:12:28 +0000239 const uint8_t *ChunkStart = BlockData.data() + OffsetInBlock;
240 uint32_t BytesInChunk = std::min(BytesLeft, BlockSize - OffsetInBlock);
Zachary Turner6ba65de2016-04-29 17:22:58 +0000241 ::memcpy(WriteBuffer + BytesWritten, ChunkStart, BytesInChunk);
242
243 BytesWritten += BytesInChunk;
244 BytesLeft -= BytesInChunk;
245 ++BlockNum;
246 OffsetInBlock = 0;
247 }
248
Zachary Turner819e77d2016-05-06 20:51:57 +0000249 return Error::success();
Zachary Turner5acb4ac2016-06-10 05:09:12 +0000250}
Zachary Turnerf5c59652016-05-03 00:28:21 +0000251
Zachary Turnerd66889c2016-07-28 19:12:28 +0000252uint32_t MappedBlockStream::getNumBytesCopied() const {
253 return static_cast<uint32_t>(Pool.getBytesAllocated());
254}
Zachary Turner5acb4ac2016-06-10 05:09:12 +0000255
Zachary Turnerd66889c2016-07-28 19:12:28 +0000256void MappedBlockStream::invalidateCache() { CacheMap.shrink_and_clear(); }
Zachary Turner5acb4ac2016-06-10 05:09:12 +0000257
Zachary Turnerd66889c2016-07-28 19:12:28 +0000258void MappedBlockStream::fixCacheAfterWrite(uint32_t Offset,
259 ArrayRef<uint8_t> Data) const {
Zachary Turner5acb4ac2016-06-10 05:09:12 +0000260 // If this write overlapped a read which previously came from the pool,
261 // someone may still be holding a pointer to that alloc which is now invalid.
262 // Compute the overlapping range and update the cache entry, so any
263 // outstanding buffers are automatically updated.
264 for (const auto &MapEntry : CacheMap) {
265 // If the end of the written extent precedes the beginning of the cached
266 // extent, ignore this map entry.
Zachary Turnerd66889c2016-07-28 19:12:28 +0000267 if (Offset + Data.size() < MapEntry.first)
Zachary Turner5acb4ac2016-06-10 05:09:12 +0000268 continue;
269 for (const auto &Alloc : MapEntry.second) {
270 // If the end of the cached extent precedes the beginning of the written
271 // extent, ignore this alloc.
272 if (MapEntry.first + Alloc.size() < Offset)
273 continue;
274
275 // If we get here, they are guaranteed to overlap.
Zachary Turnerd66889c2016-07-28 19:12:28 +0000276 Interval WriteInterval = std::make_pair(Offset, Offset + Data.size());
Zachary Turner5acb4ac2016-06-10 05:09:12 +0000277 Interval CachedInterval =
278 std::make_pair(MapEntry.first, MapEntry.first + Alloc.size());
279 // If they overlap, we need to write the new data into the overlapping
280 // range.
281 auto Intersection = intersect(WriteInterval, CachedInterval);
282 assert(Intersection.first <= Intersection.second);
283
284 uint32_t Length = Intersection.second - Intersection.first;
285 uint32_t SrcOffset =
286 AbsoluteDifference(WriteInterval.first, Intersection.first);
287 uint32_t DestOffset =
288 AbsoluteDifference(CachedInterval.first, Intersection.first);
Zachary Turnerd66889c2016-07-28 19:12:28 +0000289 ::memcpy(Alloc.data() + DestOffset, Data.data() + SrcOffset, Length);
Zachary Turner5acb4ac2016-06-10 05:09:12 +0000290 }
291 }
Zachary Turnerd66889c2016-07-28 19:12:28 +0000292}
293
294WritableMappedBlockStream::WritableMappedBlockStream(
Zachary Turnera3225b02016-07-29 20:56:36 +0000295 uint32_t BlockSize, uint32_t NumBlocks, const MSFStreamLayout &Layout,
Zachary Turnerd66889c2016-07-28 19:12:28 +0000296 const WritableStream &MsfData)
297 : ReadInterface(BlockSize, NumBlocks, Layout, MsfData),
298 WriteInterface(MsfData) {}
299
300std::unique_ptr<WritableMappedBlockStream>
301WritableMappedBlockStream::createStream(uint32_t BlockSize, uint32_t NumBlocks,
Zachary Turnera3225b02016-07-29 20:56:36 +0000302 const MSFStreamLayout &Layout,
Zachary Turnerd66889c2016-07-28 19:12:28 +0000303 const WritableStream &MsfData) {
304 return llvm::make_unique<MappedBlockStreamImpl<WritableMappedBlockStream>>(
305 BlockSize, NumBlocks, Layout, MsfData);
306}
307
308std::unique_ptr<WritableMappedBlockStream>
Zachary Turnera3225b02016-07-29 20:56:36 +0000309WritableMappedBlockStream::createIndexedStream(const MSFLayout &Layout,
Zachary Turnerd66889c2016-07-28 19:12:28 +0000310 const WritableStream &MsfData,
311 uint32_t StreamIndex) {
Zachary Turnera3225b02016-07-29 20:56:36 +0000312 MSFStreamLayout SL;
Zachary Turnerd66889c2016-07-28 19:12:28 +0000313 SL.Blocks = Layout.StreamMap[StreamIndex];
314 SL.Length = Layout.StreamSizes[StreamIndex];
315 return createStream(Layout.SB->BlockSize, Layout.SB->NumBlocks, SL, MsfData);
316}
317
318std::unique_ptr<WritableMappedBlockStream>
319WritableMappedBlockStream::createDirectoryStream(
Zachary Turnera3225b02016-07-29 20:56:36 +0000320 const MSFLayout &Layout, const WritableStream &MsfData) {
321 MSFStreamLayout SL;
Zachary Turnerd66889c2016-07-28 19:12:28 +0000322 SL.Blocks = Layout.DirectoryBlocks;
323 SL.Length = Layout.SB->NumDirectoryBytes;
324 return createStream(Layout.SB->BlockSize, Layout.SB->NumBlocks, SL, MsfData);
325}
326
327Error WritableMappedBlockStream::readBytes(uint32_t Offset, uint32_t Size,
328 ArrayRef<uint8_t> &Buffer) const {
329 return ReadInterface.readBytes(Offset, Size, Buffer);
330}
331
332Error WritableMappedBlockStream::readLongestContiguousChunk(
333 uint32_t Offset, ArrayRef<uint8_t> &Buffer) const {
334 return ReadInterface.readLongestContiguousChunk(Offset, Buffer);
335}
336
337uint32_t WritableMappedBlockStream::getLength() const {
338 return ReadInterface.getLength();
339}
340
341Error WritableMappedBlockStream::writeBytes(uint32_t Offset,
342 ArrayRef<uint8_t> Buffer) const {
343 // Make sure we aren't trying to write beyond the end of the stream.
344 if (Buffer.size() > getStreamLength())
Zachary Turnera3225b02016-07-29 20:56:36 +0000345 return make_error<MSFError>(msf_error_code::insufficient_buffer);
Zachary Turnerd66889c2016-07-28 19:12:28 +0000346
347 if (Offset > getStreamLayout().Length - Buffer.size())
Zachary Turnera3225b02016-07-29 20:56:36 +0000348 return make_error<MSFError>(msf_error_code::insufficient_buffer);
Zachary Turnerd66889c2016-07-28 19:12:28 +0000349
350 uint32_t BlockNum = Offset / getBlockSize();
351 uint32_t OffsetInBlock = Offset % getBlockSize();
352
353 uint32_t BytesLeft = Buffer.size();
354 uint32_t BytesWritten = 0;
355 while (BytesLeft > 0) {
356 uint32_t StreamBlockAddr = getStreamLayout().Blocks[BlockNum];
357 uint32_t BytesToWriteInChunk =
358 std::min(BytesLeft, getBlockSize() - OffsetInBlock);
359
360 const uint8_t *Chunk = Buffer.data() + BytesWritten;
361 ArrayRef<uint8_t> ChunkData(Chunk, BytesToWriteInChunk);
362 uint32_t MsfOffset = blockToOffset(StreamBlockAddr, getBlockSize());
363 MsfOffset += OffsetInBlock;
364 if (auto EC = WriteInterface.writeBytes(MsfOffset, ChunkData))
365 return EC;
366
367 BytesLeft -= BytesToWriteInChunk;
368 BytesWritten += BytesToWriteInChunk;
369 ++BlockNum;
370 OffsetInBlock = 0;
371 }
372
373 ReadInterface.fixCacheAfterWrite(Offset, Buffer);
Zachary Turner5acb4ac2016-06-10 05:09:12 +0000374
375 return Error::success();
Zachary Turnerf5c59652016-05-03 00:28:21 +0000376}
Zachary Turner90b8b8d2016-05-31 22:41:52 +0000377
Zachary Turnerd66889c2016-07-28 19:12:28 +0000378Error WritableMappedBlockStream::commit() const {
379 return WriteInterface.commit();
Zachary Turnera1657a92016-06-08 17:26:39 +0000380}