Flutter Engine
The Flutter Engine
Public Member Functions | List of all members
fml::tracing::TraceFlow Class Reference

#include <trace_event.h>

Public Member Functions

 TraceFlow (const char *label)
 
 ~TraceFlow ()
 
 TraceFlow (TraceFlow &&other)
 
void Step (const char *label=nullptr) const
 
void End (const char *label=nullptr)
 

Detailed Description

Definition at line 469 of file trace_event.h.

Constructor & Destructor Documentation

◆ TraceFlow() [1/2]

fml::tracing::TraceFlow::TraceFlow ( const char *  label)
inlineexplicit

Definition at line 471 of file trace_event.h.

471 : label_(label), nonce_(TraceNonce()) {
472 TraceEvent0("flutter", label_, /*flow_id_count=*/1,
473 /*flow_ids=*/&nonce_);
474 TraceEventFlowBegin0("flutter", label_, nonce_);
475 TraceEventEnd(label_);
476 }
void TraceEventFlowBegin0(TraceArg category_group, TraceArg name, TraceIDArg id)
Definition: trace_event.cc:481
void TraceEvent0(TraceArg category_group, TraceArg name, size_t flow_id_count, const uint64_t *flow_ids)
Definition: trace_event.cc:408
size_t TraceNonce()
Definition: trace_event.cc:385
void TraceEventEnd(TraceArg name)
Definition: trace_event.cc:429

◆ ~TraceFlow()

fml::tracing::TraceFlow::~TraceFlow ( )
inline

Definition at line 478 of file trace_event.h.

478{ End(label_); }
void End(const char *label=nullptr)
Definition: trace_event.h:491

◆ TraceFlow() [2/2]

fml::tracing::TraceFlow::TraceFlow ( TraceFlow &&  other)
inline

Definition at line 480 of file trace_event.h.

480 : label_(other.label_), nonce_(other.nonce_) {
481 other.nonce_ = 0;
482 }

Member Function Documentation

◆ End()

void fml::tracing::TraceFlow::End ( const char *  label = nullptr)
inline

Definition at line 491 of file trace_event.h.

491 {
492 if (nonce_ != 0) {
493 TraceEvent0("flutter", label ? label : label_, /*flow_id_count=*/1,
494 /*flow_ids=*/&nonce_);
495 TraceEventFlowEnd0("flutter", label ? label : label_, nonce_);
496 TraceEventEnd(label ? label : label_);
497 nonce_ = 0;
498 }
499 }
void TraceEventFlowEnd0(TraceArg category_group, TraceArg name, TraceIDArg id)
Definition: trace_event.cc:489

◆ Step()

void fml::tracing::TraceFlow::Step ( const char *  label = nullptr) const
inline

Definition at line 484 of file trace_event.h.

484 {
485 TraceEvent0("flutter", label ? label : label_, /*flow_id_count=*/1,
486 /*flow_ids=*/&nonce_);
487 TraceEventFlowStep0("flutter", label ? label : label_, nonce_);
488 TraceEventEnd(label ? label : label_);
489 }
void TraceEventFlowStep0(TraceArg category_group, TraceArg name, TraceIDArg id)
Definition: trace_event.cc:485

The documentation for this class was generated from the following file: