MCPcopy Create free account
hub / github.com/HaxeFoundation/hxcpp / Dump

Method Dump

src/hx/Telemetry.cpp:158–179  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

156 }
157
158 TelemetryFrame* Dump()
159 {
160 std::lock_guard<std::recursive_mutex> lock(gStashMutex);
161 if (stashed.size()<1) {
162 return 0;
163 }
164
165 // Destroy item that was dumped last call
166 TelemetryFrame *front = &stashed.front();
167 if (front->samples!=0) delete front->samples;
168 if (front->names!=0) delete front->names;
169 if (front->allocation_data!=0) delete front->allocation_data;
170 if (front->stacks!=0) delete front->stacks;
171 //delete front; // delete happens via pop_front:
172 stashed.pop_front(); // Destroy item that was Dumped last call
173
174 front = &stashed.front();
175
176 //printf(" -- dumped stash, allocs=%d, alloc[max]=%d\n", front->allocations->size(), front->allocations->size()>0 ? front->allocations->at(front->allocations->size()-1) : 0);
177
178 return front;
179 }
180
181 void IgnoreAllocs(int delta)
182 {

Callers 1

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected