MCPcopy Create free account
hub / github.com/Moddable-OpenSource/moddable / espSampleInstrumentation

Function espSampleInstrumentation

xs/platforms/pebble/xsHost.c:192–220  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

190}
191
192void espSampleInstrumentation(modTimer timer, void *refcon, int refconSize)
193{
194 txInteger values[espInstrumentCount];
195 int what;
196 xsMachine *the = *(xsMachine **)refcon;
197
198 // xSemaphoreTake(gInstrumentMutex, portMAX_DELAY);
199
200 for (what = kModInstrumentationPixelsDrawn; what <= (kModInstrumentationSlotHeapSize - 1); what++)
201 values[what - kModInstrumentationPixelsDrawn] = modInstrumentationGet_(the, what);
202
203#if kModInstrumentationHasTurns
204 if (values[kModInstrumentationTurns - kModInstrumentationPixelsDrawn])
205 values[kModInstrumentationTurns - kModInstrumentationPixelsDrawn] -= 1; // ignore the turn that generates instrumentation
206#endif
207
208 fxSampleInstrumentation(the, espInstrumentCount, values);
209
210 modInstrumentationSet(PixelsDrawn, 0);
211 modInstrumentationSet(FramesDrawn, 0);
212 modInstrumentationSet(PocoDisplayListUsed, 0);
213 modInstrumentationSet(PiuCommandListUsed, 0);
214#if kModInstrumentationHasTurns
215 modInstrumentationSet(Turns, 0);
216#endif
217 modInstrumentMachineReset(the);
218
219 // xSemaphoreGive(gInstrumentMutex);
220}
221
222#endif
223

Callers

nothing calls this directly

Calls 3

modInstrumentationGet_Function · 0.85
fxSampleInstrumentationFunction · 0.85

Tested by

no test coverage detected