25 std::optional<uint64_t> lowest_tsc;
26 Error err =
m_trace.OnThreadBufferRead(
27 m_thread_sp->GetID(), [&](llvm::ArrayRef<uint8_t> data) -> llvm::Error {
28 Expected<std::optional<uint64_t>> tsc =
29 FindLowestTSCInTrace(m_trace, data);
31 return tsc.takeError();
33 return Error::success();
36 return std::move(err);
53 .TimeTask(
"Decoding instructions", [&]() -> Expected<DecodedThreadSP> {
57 Error err =
m_trace.OnThreadBufferRead(
58 m_thread_sp->GetID(), [&](llvm::ArrayRef<uint8_t> data) {
59 return DecodeSingleTraceForThread(*decoded_thread_sp, m_trace,
64 return std::move(err);
65 return decoded_thread_sp;