• Home
  • Raw
  • Download

Lines Matching refs:handle_desc

198     HandleDescription handle_desc{handle};  in Create()  local
199 handle_desc.handle_ = handle; in Create()
200 handle_desc.callback_ = callback; in Create()
201 handle_desc.callback_arg_ = callback_arg; in Create()
202 UpdateHandleDescription(/*inout*/&handle_desc, StateKind::kCreated); in Create()
205 bool inserted = states_.insert({handle, handle_desc}).second; in Create()
223 HandleDescription& handle_desc = it->second; in StartTracing() local
226 UpdateHandleDescription(/*inout*/&handle_desc, StateKind::kStartedTracing); in StartTracing()
251 HandleDescription& handle_desc = it->second; in ReadTrace() local
254 UpdateHandleDescription(/*inout*/&handle_desc, StateKind::kReadTracing); in ReadTrace()
260 HandleDescription handle_desc{handle}; in Destroy() local
261 TryDestroy(handle, /*do_destroy*/true, /*out*/&handle_desc);; in Destroy()
278 HandleDescription& handle_desc = it->second; in TryDestroy() local
283 UpdateHandleDescription(/*inout*/&handle_desc, StateKind::kDestroyed); in TryDestroy()
285 *handle_desc_out = handle_desc; in TryDestroy()
323 HandleDescription handle_desc{handle}; in OnTraceMessage() local
335 handle_desc = it->second; in OnTraceMessage()
340 if (handle_desc.kind_ == StateKind::kStartedTracing) { in OnTraceMessage()
342 CHECK(handle_desc.started_tracing_ns_.has_value()) << static_cast<int64_t>(handle); in OnTraceMessage()
344 uint64_t started_tracing_ns = *handle_desc.started_tracing_ns_; in OnTraceMessage()
351 handle_desc.callback_(handle, State::kTraceFailed, handle_desc.callback_arg_); in OnTraceMessage()
379 for (HandleDescription& handle_desc : handle_list) { in OnTraceMessage()
383 handle_desc.callback_(handle, State::kTraceFailed, handle_desc.callback_arg_); in OnTraceMessage()
400 void UpdateHandleDescription(/*inout*/HandleDescription* handle_desc, StateKind kind) { in UpdateHandleDescription()
401 CHECK(handle_desc != nullptr); in UpdateHandleDescription()
402 handle_desc->kind_ = kind; in UpdateHandleDescription()
403 handle_desc->state_ = raw_->PollState(handle_desc->handle_); in UpdateHandleDescription()
405 handle_desc->last_transition_ns_ = GetTimeNanoseconds(); in UpdateHandleDescription()
407 if (!handle_desc->started_tracing_ns_) { in UpdateHandleDescription()
408 handle_desc->started_tracing_ns_ = handle_desc->last_transition_ns_; in UpdateHandleDescription()
410 handle_desc->trace_cookie_ = ++trace_cookie_; in UpdateHandleDescription()
414 *handle_desc->trace_cookie_); in UpdateHandleDescription()
417 static_cast<int32_t>(handle_desc->handle_)); in UpdateHandleDescription()
422 if (!handle_desc->read_trace_ns_) { in UpdateHandleDescription()
423 handle_desc->read_trace_ns_ = handle_desc->last_transition_ns_; in UpdateHandleDescription()
425 if (handle_desc->trace_cookie_.has_value() && !handle_desc->trace_ended_) { in UpdateHandleDescription()
428 handle_desc->trace_cookie_.value()); in UpdateHandleDescription()
430 handle_desc->trace_ended_ = true; in UpdateHandleDescription()
436 if (kind == StateKind::kDestroyed && handle_desc->trace_cookie_ && !handle_desc->trace_ended_) { in UpdateHandleDescription()
439 *handle_desc->trace_cookie_); in UpdateHandleDescription()
440 handle_desc->trace_ended_ = true; in UpdateHandleDescription()
530 HandleDescription& handle_desc = it->second; in Dump() local
532 handle_desc.started_tracing_ns_ ? *handle_desc.started_tracing_ns_ : 0; in Dump()
533 printer.printFormatLine(" Handle %" PRId64, handle_desc.handle_); in Dump()
534 printer.printFormatLine(" Kind: %s", ToString(handle_desc.kind_).c_str()); in Dump()
535 printer.printFormatLine(" Perfetto State: %d", static_cast<int>(handle_desc.state_)); in Dump()
538 handle_desc.last_transition_ns_); in Dump()