Go to the source code of this file.
|
static | DEFINE_string (trace, "", "Log trace events in one of several modes:\n" " debugf : Show events using SkDebugf\n" " atrace : Send events to Android ATrace\n" " perfetto : Send events to Perfetto (Linux, Android, and Mac only)\n" " <filename> : Any other string is interpreted as a filename. Writes\n" " trace events to specified file as JSON, for viewing\n" " with chrome://tracing") |
|
static | DEFINE_string (traceMatch, "", "Filter which categories are traced.\n" "Uses same format as --match\n") |
|
void | initializeEventTracingForTools (const char *traceFlag) |
|
◆ DEFINE_string() [1/2]
static DEFINE_string |
( |
trace |
, |
|
|
"" |
, |
|
|
"Log trace events in one of several modes:\n" " debugf : Show events using SkDebugf\n" " atrace : Send events to Android ATrace\n" " perfetto : Send events to Perfetto (Linux, Android, and Mac only)\n" " <filename> : Any other string is interpreted as a filename. Writes\n" " trace events to specified file as |
JSON, |
|
|
for viewing\n" " with chrome://tracing" |
|
|
) |
| |
|
static |
◆ DEFINE_string() [2/2]
static DEFINE_string |
( |
traceMatch |
, |
|
|
"" |
, |
|
|
"Filter which categories are traced.\n" "Uses same format as --match\n" |
|
|
) |
| |
|
static |
◆ 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
53 if (0 == strcmp(traceFlag, "atrace")) {
55 } else if (0 == strcmp(traceFlag, "debugf")) {
57 } else if (0 == strcmp(traceFlag, "perfetto")) {
58 #if defined(SK_USE_PERFETTO)
60 #else
61
62
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 {
71 }
72
74}
#define SkAssertResult(cond)
void SK_SPI SkDebugf(const char format[],...) SK_PRINTF_LIKE(1
static bool SetInstance(SkEventTracer *, bool leakTracer=false)