Lines Matching refs:TLD

317     auto &TLD = getThreadLocalData();
318 if (TLD.Controller != nullptr)
319 TLD.Controller->flush();
355 auto &TLD = getThreadLocalData();
356 if (TLD.Controller != nullptr)
357 TLD.Controller->flush();
445 static bool setupTLD(ThreadLocalData &TLD) XRAY_NEVER_INSTRUMENT {
451 if (TLD.Controller != nullptr) {
452 TLD.Controller->flush();
453 TLD.Controller = nullptr;
459 if (UNLIKELY(TLD.Controller == nullptr)) {
460 // Set up the TLD buffer queue.
463 TLD.BQ = BQ;
466 if (TLD.Buffer.Generation != BQ->generation() &&
467 TLD.BQ->releaseBuffer(TLD.Buffer) != BufferQueue::ErrorCode::Ok)
471 if (TLD.BQ->getBuffer(TLD.Buffer) != BufferQueue::ErrorCode::Ok)
475 if (UNLIKELY(TLD.Writer == nullptr)) {
476 auto *LWStorage = reinterpret_cast<FDRLogWriter *>(&TLD.LWStorage);
477 new (LWStorage) FDRLogWriter(TLD.Buffer);
478 TLD.Writer = LWStorage;
480 TLD.Writer->resetRecord();
483 auto *CStorage = reinterpret_cast<FDRController<> *>(&TLD.CStorage);
485 FDRController<>(TLD.BQ, TLD.Buffer, *TLD.Writer, clock_gettime,
487 TLD.Controller = CStorage;
490 DCHECK_NE(TLD.Controller, nullptr);
503 auto &TLD = getThreadLocalData();
504 if (!setupTLD(TLD))
510 TLD.Controller->functionEnter(FuncId, TSC, CPU);
513 TLD.Controller->functionExit(FuncId, TSC, CPU);
516 TLD.Controller->functionTailExit(FuncId, TSC, CPU);
533 auto &TLD = getThreadLocalData();
534 if (!setupTLD(TLD))
540 TLD.Controller->functionEnterArg(FuncId, TSC, CPU, Arg);
543 TLD.Controller->functionExit(FuncId, TSC, CPU);
546 TLD.Controller->functionTailExit(FuncId, TSC, CPU);
575 auto &TLD = getThreadLocalData();
576 if (!setupTLD(TLD))
580 TLD.Controller->customEvent(TSC, CPU, Event, ReducedEventSize);
605 auto &TLD = getThreadLocalData();
606 if (!setupTLD(TLD))
610 TLD.Controller->typedEvent(TSC, CPU, EventType, Event, ReducedEventSize);
690 auto &TLD = *reinterpret_cast<ThreadLocalData *>(TLDPtr);
691 if (TLD.BQ == nullptr)
693 if (TLD.Buffer.Data == nullptr)
695 auto EC = TLD.BQ->releaseBuffer(TLD.Buffer);
699 TLD.Buffer.Data, BufferQueue::getErrorString(EC));