| 540 | void fxPushProfilerSample(txMachine* the, txID recordID, txU4 delta, txU4 deltaMeter) |
| 541 | #else |
| 542 | void fxPushProfilerSample(txMachine* the, txID recordID, txU4 delta) |
| 543 | #endif |
| 544 | { |
| 545 | txProfiler* profiler = the->profiler; |
| 546 | txU8 sampleCount = profiler->sampleCount; |
| 547 | txU8 sampleIndex = profiler->sampleIndex; |
| 548 | txProfilerSample* sample; |
| 549 | if (sampleIndex == sampleCount) { |
| 550 | sampleCount += 1024; |
| 551 | profiler->samples = (txProfilerSample*)c_realloc(profiler->samples, (size_t)(sampleCount * sizeof(txProfilerSample))); |
| 552 | if (profiler->samples == C_NULL) |
| 553 | fxAbort(the, XS_NOT_ENOUGH_MEMORY_EXIT); |
| 554 | profiler->sampleCount = sampleCount; |
| 555 | } |
| 556 | sample = profiler->samples + sampleIndex; |
| 557 | sample->recordID = recordID; |
| 558 | sample->delta = delta; |
| 559 | #ifdef mxMetering |
| 560 | sample->deltaMeter = deltaMeter; |
| 561 | #endif |
| 562 | profiler->sampleIndex = sampleIndex + 1; |
| 563 | } |
| 564 | |
| 565 | txID fxRemoveProfilerCycle(txMachine* the, txProfiler* profiler, txID recordID) |
| 566 | { |
no test coverage detected