MCPcopy Create free account
hub / github.com/apache/impala / GetChunk

Method GetChunk

be/src/kudu/util/debug/trace_event_impl.cc:304–315  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

302 }
303
304 virtual unique_ptr<TraceBufferChunk> GetChunk(size_t* index) OVERRIDE {
305 // This function may be called when adding normal events or indirectly from
306 // AddMetadataEventsWhileLocked(). We can not DECHECK(!IsFull()) because we
307 // have to add the metadata events and flush thread-local buffers even if
308 // the buffer is full.
309 *index = chunks_.size();
310 chunks_.push_back(nullptr); // Put NULL in the slot of a in-flight chunk.
311 ++in_flight_chunk_count_;
312 // + 1 because zero chunk_seq is not allowed.
313 return unique_ptr<TraceBufferChunk>(
314 new TraceBufferChunk(static_cast<uint32_t>(*index) + 1));
315 }
316
317 virtual void ReturnChunk(size_t index,
318 unique_ptr<TraceBufferChunk> chunk) OVERRIDE {

Callers 2

AddTraceEventMethod · 0.45

Calls 2

push_backMethod · 0.80
sizeMethod · 0.45

Tested by

no test coverage detected