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

Method StackUpdate

src/hx/Telemetry.cpp:444–465  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

442}
443
444void hx::Telemetry::StackUpdate(StackFrame *pushed_frame)
445{
446 if (mT0 == gProfileClock || !profiler_enabled) {
447 return;
448 }
449
450 // Latch the profile clock and calculate the time since the last profile
451 // clock tick
452 int clock = gProfileClock;
453 int delta = clock - mT0;
454 if (delta < 0) {
455 delta = 1;
456 }
457 mT0 = clock;
458
459 int size = stack->getDepth();
460
461 // Collect function names and callstacks (as indexes into the names vector)
462 samples->push_back(size);
463 push_callstack_ids_into(samples);
464 samples->push_back(delta);
465}
466
467void hx::Telemetry::HXTAllocation(void* obj, size_t inSize, const char* type)
468{

Callers

nothing calls this directly

Calls 1

getDepthMethod · 0.80

Tested by

no test coverage detected