| 442 | } |
| 443 | |
| 444 | void 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 | |
| 467 | void hx::Telemetry::HXTAllocation(void* obj, size_t inSize, const char* type) |
| 468 | { |