MCPcopy Create free account
hub / github.com/baldurk/renderdoc / TickDeviceLogcat

Function TickDeviceLogcat

renderdoc/android/android_utils.cpp:331–348  ·  view source on GitHub ↗

on android only when we hit this function we write a marker that isn't a standard log. The purpose is to always try and have a unique message in the last N lines so that we can detect if we ever lose messages.

Source from the content-addressed store, hash-verified

329// purpose is to always try and have a unique message in the last N lines so that we can detect if
330// we ever lose messages.
331void TickDeviceLogcat()
332{
333#if ENABLED(RDOC_ANDROID)
334 static uint64_t freq = (uint64_t)Timing::GetTickFrequency();
335
336 const uint64_t timeMS = uint64_t(Timing::GetTick() / freq);
337
338 static uint64_t prevTimeMS = 0;
339
340 // don't spam more than once every 100ms to avoid saturating our log
341 if(timeMS > prevTimeMS + 100)
342 {
343 prevTimeMS = timeMS;
344 OSUtility::WriteOutput(OSUtility::Output_DebugMon,
345 StringFormat::Fmt("__rdoc_internal_android_logcat %llu", timeMS).c_str());
346 }
347#endif
348}
349
350struct LogLine
351{

Callers 1

ActiveRemoteClientThreadFunction · 0.85

Calls 3

FmtFunction · 0.85
WriteOutputFunction · 0.50
c_strMethod · 0.45

Tested by

no test coverage detected