Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
Classes | Functions
EventTracingPriv.h File Reference
#include "include/private/base/SkMutex.h"

Go to the source code of this file.

Classes

class  SkEventTracingCategories
 

Functions

void initializeEventTracingForTools (const char *mode=nullptr)
 

Function Documentation

◆ initializeEventTracingForTools()

void initializeEventTracingForTools ( const char *  mode = nullptr)

Construct and install an SkEventTracer, based on the mode, defaulting to the –trace command line argument.

Definition at line 44 of file EventTracingPriv.cpp.

44 {
45 if (!traceFlag) {
46 if (FLAGS_trace.isEmpty()) {
47 return;
48 }
49 traceFlag = FLAGS_trace[0];
50 }
51
52 SkEventTracer* eventTracer = nullptr;
53 if (0 == strcmp(traceFlag, "atrace")) {
54 eventTracer = new SkATrace();
55 } else if (0 == strcmp(traceFlag, "debugf")) {
56 eventTracer = new SkDebugfTracer();
57 } else if (0 == strcmp(traceFlag, "perfetto")) {
58 #if defined(SK_USE_PERFETTO)
59 eventTracer = new SkPerfettoTrace();
60 #else
61 // TODO(b/259248961): update this explanation (and associated docs) as the Perfetto
62 // transition progresses.
63 SkDebugf("Perfetto is not enabled (SK_USE_PERFETTO is false). Perfetto tracing will not "
64 "be performed.\nTracing tools with Perfetto is only enabled for Linux, Android, "
65 "and Mac.\n");
66 return;
67 #endif
68 }
69 else {
70 eventTracer = new ChromeTracingTracer(traceFlag);
71 }
72
74}
#define SkAssertResult(cond)
Definition SkAssert.h:123
void SK_SPI SkDebugf(const char format[],...) SK_PRINTF_LIKE(1
static bool SetInstance(SkEventTracer *, bool leakTracer=false)