Flutter Engine
The Flutter Engine
trace_event.h
Go to the documentation of this file.
1// Copyright 2013 The Flutter Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#ifndef FLUTTER_FML_TRACE_EVENT_H_
6#define FLUTTER_FML_TRACE_EVENT_H_
7
8#include <functional>
9
10#include "flutter/fml/build_config.h"
11
12#if defined(OS_FUCHSIA)
13
14// Forward to the system tracing mechanism on Fuchsia.
15
16#include <lib/trace/event.h>
17
18// TODO(DNO-448): This is disabled because the Fuchsia counter id json parsing
19// only handles ints whereas this can produce ints or strings.
20#define FML_TRACE_COUNTER(a, b, c, arg1, ...) \
21 ::fml::tracing::TraceCounterNopHACK((a), (b), (c), (arg1), __VA_ARGS__);
22
23#define FML_TRACE_EVENT(a, b, args...) TRACE_DURATION(a, b)
24// On Fuchsia, the flow_id arguments to this macro are ignored.
25#define FML_TRACE_EVENT_WITH_FLOW_IDS(category_group, name, flow_id_count, \
26 flow_ids, ...) \
27 FML_TRACE_EVENT(category_group, name)
28
29#define TRACE_EVENT0(a, b) TRACE_DURATION(a, b)
30// On Fuchsia, the flow_id arguments to this macro are ignored.
31#define TRACE_EVENT0_WITH_FLOW_IDS(category_group, name, flow_id_count, \
32 flow_ids) \
33 TRACE_EVENT0(category_group, name)
34#define TRACE_EVENT1(a, b, c, d) TRACE_DURATION(a, b, c, d)
35// On Fuchsia, the flow_id arguments to this macro are ignored.
36#define TRACE_EVENT1_WITH_FLOW_IDS(category_group, name, flow_id_count, \
37 flow_ids, arg1_name, arg1_val) \
38 TRACE_EVENT1(category_group, name, arg1_name, arg1_val)
39#define TRACE_EVENT2(a, b, c, d, e, f) TRACE_DURATION(a, b, c, d, e, f)
40#define TRACE_EVENT_ASYNC_BEGIN0(a, b, c) TRACE_ASYNC_BEGIN(a, b, c)
41// On Fuchsia, the flow_id arguments to this macro are ignored.
42#define TRACE_EVENT_ASYNC_BEGIN0_WITH_FLOW_IDS(category_group, name, id, \
43 flow_id_count, flow_ids) \
44 TRACE_EVENT_ASYNC_BEGIN0(category_group, name, id)
45#define TRACE_EVENT_ASYNC_END0(a, b, c) TRACE_ASYNC_END(a, b, c)
46#define TRACE_EVENT_ASYNC_BEGIN1(a, b, c, d, e) TRACE_ASYNC_BEGIN(a, b, c, d, e)
47#define TRACE_EVENT_ASYNC_END1(a, b, c, d, e) TRACE_ASYNC_END(a, b, c, d, e)
48#define TRACE_EVENT_INSTANT0(a, b) TRACE_INSTANT(a, b, TRACE_SCOPE_THREAD)
49#define TRACE_EVENT_INSTANT1(a, b, k1, v1) \
50 TRACE_INSTANT(a, b, TRACE_SCOPE_THREAD, k1, v1)
51#define TRACE_EVENT_INSTANT2(a, b, k1, v1, k2, v2) \
52 TRACE_INSTANT(a, b, TRACE_SCOPE_THREAD, k1, v1, k2, v2)
53
54#endif // defined(OS_FUCHSIA)
55
56#include <cstddef>
57#include <cstdint>
58#include <string>
59#include <type_traits>
60#include <vector>
61
62#include "flutter/fml/macros.h"
63#include "flutter/fml/time/time_point.h"
64#include "third_party/dart/runtime/include/dart_tools_api.h"
65
66#if (FLUTTER_RELEASE && !defined(OS_FUCHSIA) && !defined(FML_OS_ANDROID))
67#define FLUTTER_TIMELINE_ENABLED 0
68#else
69#define FLUTTER_TIMELINE_ENABLED 1
70#endif
71
72#if !defined(OS_FUCHSIA)
73#ifndef TRACE_EVENT_HIDE_MACROS
74
75#define __FML__TOKEN_CAT__(x, y) x##y
76#define __FML__TOKEN_CAT__2(x, y) __FML__TOKEN_CAT__(x, y)
77#define __FML__AUTO_TRACE_END(name) \
78 ::fml::tracing::ScopedInstantEnd __FML__TOKEN_CAT__2(__trace_end_, \
79 __LINE__)(name);
80
81// This macro has the FML_ prefix so that it does not collide with the macros
82// from lib/trace/event.h on Fuchsia.
83//
84// TODO(chinmaygarde): All macros here should have the FML prefix.
85#define FML_TRACE_COUNTER(category_group, name, counter_id, arg1, ...) \
86 ::fml::tracing::TraceCounter((category_group), (name), (counter_id), (arg1), \
87 __VA_ARGS__);
88
89// Avoid using the same `name` and `argX_name` for nested traces, which can
90// lead to double free errors. E.g. the following code should be avoided:
91//
92// ```cpp
93// {
94// TRACE_EVENT1("flutter", "Foo::Bar", "count", "initial_count_value");
95// ...
96// TRACE_EVENT_INSTANT1("flutter", "Foo::Bar",
97// "count", "updated_count_value");
98// }
99// ```
100//
101// Instead, either use different `name` or `arg1` parameter names.
102#define FML_TRACE_EVENT_WITH_FLOW_IDS(category_group, name, flow_id_count, \
103 flow_ids, ...) \
104 ::fml::tracing::TraceEvent((category_group), (name), (flow_id_count), \
105 (flow_ids), __VA_ARGS__); \
106 __FML__AUTO_TRACE_END(name)
107
108// Avoid using the same `name` and `argX_name` for nested traces, which can
109// lead to double free errors. E.g. the following code should be avoided:
110//
111// ```cpp
112// {
113// TRACE_EVENT1("flutter", "Foo::Bar", "count", "initial_count_value");
114// ...
115// TRACE_EVENT_INSTANT1("flutter", "Foo::Bar",
116// "count", "updated_count_value");
117// }
118// ```
119//
120// Instead, either use different `name` or `arg1` parameter names.
121#define FML_TRACE_EVENT(category_group, name, ...) \
122 FML_TRACE_EVENT_WITH_FLOW_IDS((category_group), (name), \
123 /*flow_id_count=*/(0), /*flow_ids=*/(nullptr), \
124 __VA_ARGS__)
125
126#define TRACE_EVENT0_WITH_FLOW_IDS(category_group, name, flow_id_count, \
127 flow_ids) \
128 ::fml::tracing::TraceEvent0(category_group, name, flow_id_count, flow_ids); \
129 __FML__AUTO_TRACE_END(name)
130
131#define TRACE_EVENT0(category_group, name) \
132 TRACE_EVENT0_WITH_FLOW_IDS(category_group, name, /*flow_id_count=*/0, \
133 /*flow_ids=*/nullptr)
134
135#define TRACE_EVENT1_WITH_FLOW_IDS(category_group, name, flow_id_count, \
136 flow_ids, arg1_name, arg1_val) \
137 ::fml::tracing::TraceEvent1(category_group, name, flow_id_count, flow_ids, \
138 arg1_name, arg1_val); \
139 __FML__AUTO_TRACE_END(name)
140
141#define TRACE_EVENT1(category_group, name, arg1_name, arg1_val) \
142 TRACE_EVENT1_WITH_FLOW_IDS(category_group, name, /*flow_id_count=*/0, \
143 /*flow_ids=*/nullptr, arg1_name, arg1_val)
144
145#define TRACE_EVENT2(category_group, name, arg1_name, arg1_val, arg2_name, \
146 arg2_val) \
147 ::fml::tracing::TraceEvent2(category_group, name, /*flow_id_count=*/0, \
148 /*flow_ids=*/nullptr, arg1_name, arg1_val, \
149 arg2_name, arg2_val); \
150 __FML__AUTO_TRACE_END(name)
151
152#define TRACE_EVENT_ASYNC_BEGIN0_WITH_FLOW_IDS(category_group, name, id, \
153 flow_id_count, flow_ids) \
154 ::fml::tracing::TraceEventAsyncBegin0(category_group, name, id, \
155 flow_id_count, flow_ids);
156
157#define TRACE_EVENT_ASYNC_BEGIN0(category_group, name, id) \
158 TRACE_EVENT_ASYNC_BEGIN0_WITH_FLOW_IDS( \
159 category_group, name, id, /*flow_id_count=*/0, /*flow_ids=*/nullptr)
160
161#define TRACE_EVENT_ASYNC_END0(category_group, name, id) \
162 ::fml::tracing::TraceEventAsyncEnd0(category_group, name, id);
163
164#define TRACE_EVENT_ASYNC_BEGIN1(category_group, name, id, arg1_name, \
165 arg1_val) \
166 ::fml::tracing::TraceEventAsyncBegin1( \
167 category_group, name, id, /*flow_id_count=*/0, /*flow_ids=*/nullptr, \
168 arg1_name, arg1_val);
169
170#define TRACE_EVENT_ASYNC_END1(category_group, name, id, arg1_name, arg1_val) \
171 ::fml::tracing::TraceEventAsyncEnd1( \
172 category_group, name, id, /*flow_id_count=*/0, /*flow_ids=*/nullptr, \
173 arg1_name, arg1_val);
174
175#define TRACE_EVENT_INSTANT0(category_group, name) \
176 ::fml::tracing::TraceEventInstant0( \
177 category_group, name, /*flow_id_count=*/0, /*flow_ids=*/nullptr);
178
179#define TRACE_EVENT_INSTANT1(category_group, name, arg1_name, arg1_val) \
180 ::fml::tracing::TraceEventInstant1( \
181 category_group, name, /*flow_id_count=*/0, /*flow_ids=*/nullptr, \
182 arg1_name, arg1_val);
183
184#define TRACE_EVENT_INSTANT2(category_group, name, arg1_name, arg1_val, \
185 arg2_name, arg2_val) \
186 ::fml::tracing::TraceEventInstant2( \
187 category_group, name, /*flow_id_count=*/0, /*flow_ids=*/nullptr, \
188 arg1_name, arg1_val, arg2_name, arg2_val);
189
190#define TRACE_FLOW_BEGIN(category, name, id) \
191 ::fml::tracing::TraceEventFlowBegin0(category, name, id);
192
193#define TRACE_FLOW_STEP(category, name, id) \
194 ::fml::tracing::TraceEventFlowStep0(category, name, id);
195
196#define TRACE_FLOW_END(category, name, id) \
197 ::fml::tracing::TraceEventFlowEnd0(category, name, id);
198
199#endif // TRACE_EVENT_HIDE_MACROS
200#endif // !defined(OS_FUCHSIA)
201
202#define TRACE_EVENT2_INT(category_group, name, arg1_name, arg1_val, arg2_name, \
203 arg2_val) \
204 const auto __arg1_val_str = std::to_string(arg1_val); \
205 const auto __arg2_val_str = std::to_string(arg2_val); \
206 TRACE_EVENT2(category_group, name, arg1_name, __arg1_val_str.c_str(), \
207 arg2_name, __arg2_val_str.c_str());
208
209namespace fml {
210namespace tracing {
211
212using TraceArg = const char*;
213using TraceIDArg = int64_t;
214
215void TraceSetAllowlist(const std::vector<std::string>& allowlist);
216
217typedef void (*TimelineEventHandler)(const char*,
218 int64_t,
219 int64_t,
220 intptr_t,
221 const int64_t*,
223 intptr_t,
224 const char**,
225 const char**);
226
227using TimelineMicrosSource = int64_t (*)();
228
230
232
234
235int64_t TraceGetTimelineMicros();
236
237void TraceTimelineEvent(TraceArg category_group,
239 int64_t timestamp_micros,
240 TraceIDArg id,
241 size_t flow_id_count,
242 const uint64_t* flow_ids,
244 const std::vector<const char*>& names,
245 const std::vector<std::string>& values);
246
247void TraceTimelineEvent(TraceArg category_group,
249 TraceIDArg id,
250 size_t flow_id_count,
251 const uint64_t* flow_ids,
253 const std::vector<const char*>& names,
254 const std::vector<std::string>& values);
255
256inline std::string TraceToString(const char* string) {
257 return std::string{string};
258}
259
260inline std::string TraceToString(std::string string) {
261 return string;
262}
263
264inline std::string TraceToString(TimePoint point) {
265 return std::to_string(point.ToEpochDelta().ToNanoseconds());
266}
267
269std::string TraceToString(T string) {
270 return std::to_string(string);
271}
272
273inline void SplitArgumentsCollect(std::vector<const char*>& keys,
274 std::vector<std::string>& values) {}
275
276template <typename Key, typename Value, typename... Args>
277void SplitArgumentsCollect(std::vector<const char*>& keys,
278 std::vector<std::string>& values,
279 Key key,
280 Value value,
281 Args... args) {
282 keys.emplace_back(key);
283 values.emplace_back(TraceToString(value));
285}
286
287inline std::pair<std::vector<const char*>, std::vector<std::string>>
289 return {};
290}
291
292template <typename Key, typename Value, typename... Args>
293std::pair<std::vector<const char*>, std::vector<std::string>>
295 std::vector<const char*> keys;
296 std::vector<std::string> values;
298 return std::make_pair(std::move(keys), std::move(values));
299}
300
301size_t TraceNonce();
302
303template <typename... Args>
304void TraceCounter(TraceArg category,
307 Args... args) {
308#if FLUTTER_TIMELINE_ENABLED
309 auto split = SplitArguments(args...);
310 TraceTimelineEvent(category, name, identifier, /*flow_id_count=*/0,
311 /*flow_ids=*/nullptr, Dart_Timeline_Event_Counter,
312 split.first, split.second);
313#endif // FLUTTER_TIMELINE_ENABLED
314}
315
316// HACK: Used to NOP FML_TRACE_COUNTER macro without triggering unused var
317// warnings at usage sites.
318template <typename... Args>
322 Args... args) {}
323
324template <typename... Args>
325void TraceEvent(TraceArg category,
327 size_t flow_id_count,
328 const uint64_t* flow_ids,
329 Args... args) {
330#if FLUTTER_TIMELINE_ENABLED
331 auto split = SplitArguments(args...);
332 TraceTimelineEvent(category, name, 0, flow_id_count, flow_ids,
333 Dart_Timeline_Event_Begin, split.first, split.second);
334#endif // FLUTTER_TIMELINE_ENABLED
335}
336
337void TraceEvent0(TraceArg category_group,
339 size_t flow_id_count,
340 const uint64_t* flow_ids);
341
342void TraceEvent1(TraceArg category_group,
344 size_t flow_id_count,
345 const uint64_t* flow_ids,
346 TraceArg arg1_name,
347 TraceArg arg1_val);
348
349void TraceEvent2(TraceArg category_group,
351 size_t flow_id_count,
352 const uint64_t* flow_ids,
353 TraceArg arg1_name,
354 TraceArg arg1_val,
355 TraceArg arg2_name,
356 TraceArg arg2_val);
357
359
360template <typename... Args>
364 TimePoint end,
365 Args... args) {
366#if FLUTTER_TIMELINE_ENABLED
367 auto identifier = TraceNonce();
368 const auto split = SplitArguments(args...);
369
370 if (begin > end) {
372 }
373
374 const int64_t begin_micros = begin.ToEpochDelta().ToMicroseconds();
375 const int64_t end_micros = end.ToEpochDelta().ToMicroseconds();
376
377 TraceTimelineEvent(category_group, // group
378 name, // name
379 begin_micros, // timestamp_micros
380 identifier, // identifier
381 0, // flow_id_count
382 nullptr, // flow_ids
384 split.first, // names
385 split.second // values
386 );
387
388 TraceTimelineEvent(category_group, // group
389 name, // name
390 end_micros, // timestamp_micros
391 identifier, // identifier
392 0, // flow_id_count
393 nullptr, // flow_ids
395 split.first, // names
396 split.second // values
397 );
398#endif // FLUTTER_TIMELINE_ENABLED
399}
400
401void TraceEventAsyncBegin0(TraceArg category_group,
403 TraceIDArg id,
404 size_t flow_id_count,
405 const uint64_t* flow_ids);
406
407void TraceEventAsyncEnd0(TraceArg category_group, TraceArg name, TraceIDArg id);
408
409void TraceEventAsyncBegin1(TraceArg category_group,
411 TraceIDArg id,
412 size_t flow_id_count,
413 const uint64_t* flow_ids,
414 TraceArg arg1_name,
415 TraceArg arg1_val);
416
417void TraceEventAsyncEnd1(TraceArg category_group,
419 TraceIDArg id,
420 TraceArg arg1_name,
421 TraceArg arg1_val);
422
423void TraceEventInstant0(TraceArg category_group,
425 size_t flow_id_count,
426 const uint64_t* flow_ids);
427
428void TraceEventInstant1(TraceArg category_group,
430 size_t flow_id_count,
431 const uint64_t* flow_ids,
432 TraceArg arg1_name,
433 TraceArg arg1_val);
434
435void TraceEventInstant2(TraceArg category_group,
437 size_t flow_id_count,
438 const uint64_t* flow_ids,
439 TraceArg arg1_name,
440 TraceArg arg1_val,
441 TraceArg arg2_name,
442 TraceArg arg2_val);
443
444void TraceEventFlowBegin0(TraceArg category_group,
446 TraceIDArg id);
447
448void TraceEventFlowStep0(TraceArg category_group, TraceArg name, TraceIDArg id);
449
450void TraceEventFlowEnd0(TraceArg category_group, TraceArg name, TraceIDArg id);
451
453 public:
454 explicit ScopedInstantEnd(const char* str) : label_(str) {}
455
457
458 private:
459 const char* label_;
460
461 FML_DISALLOW_COPY_AND_ASSIGN(ScopedInstantEnd);
462};
463
464// A move-only utility object that creates a new flow with a unique ID and
465// automatically ends it when it goes out of scope. When tracing using multiple
466// overlapping flows, it often gets hard to make sure to end the flow
467// (especially with early returns), or, end/step on the wrong flow. This
468// leads to corrupted or missing traces in the UI.
470 public:
471 explicit TraceFlow(const char* label) : 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 }
477
478 ~TraceFlow() { End(label_); }
479
480 TraceFlow(TraceFlow&& other) : label_(other.label_), nonce_(other.nonce_) {
481 other.nonce_ = 0;
482 }
483
484 void Step(const char* label = nullptr) const {
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 }
490
491 void End(const char* label = nullptr) {
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 }
500
501 private:
502 const char* label_;
503 uint64_t nonce_;
504
505 FML_DISALLOW_COPY_AND_ASSIGN(TraceFlow);
506};
507
508} // namespace tracing
509} // namespace fml
510
511#endif // FLUTTER_FML_TRACE_EVENT_H_
TArray< uint32_t > Key
void swap(sk_sp< T > &a, sk_sp< T > &b)
Definition: SkRefCnt.h:341
GLenum type
constexpr int64_t ToNanoseconds() const
Definition: time_delta.h:61
TimeDelta ToEpochDelta() const
Definition: time_point.h:52
ScopedInstantEnd(const char *str)
Definition: trace_event.h:454
void End(const char *label=nullptr)
Definition: trace_event.h:491
void Step(const char *label=nullptr) const
Definition: trace_event.h:484
TraceFlow(const char *label)
Definition: trace_event.h:471
TraceFlow(TraceFlow &&other)
Definition: trace_event.h:480
static SkString identifier(const FontFamilyDesc &family, const FontDesc &font)
Dart_Timeline_Event_Type
@ Dart_Timeline_Event_Async_Begin
@ Dart_Timeline_Event_Async_End
@ Dart_Timeline_Event_Begin
@ Dart_Timeline_Event_Counter
static const char * begin(const StringSlice &s)
Definition: editor.cpp:252
SkBitmap source
Definition: examples.cpp:28
glong glong end
G_BEGIN_DECLS G_MODULE_EXPORT FlValue * args
uint8_t value
static const char *const names[]
Definition: symbols.cc:24
it will be possible to load the file into Perfetto s trace viewer disable asset Prevents usage of any non test fonts unless they were explicitly Loaded via prefetched default font Indicates whether the embedding started a prefetch of the default font manager before creating the engine run In non interactive keep the shell running after the Dart script has completed enable serial On low power devices with low core running concurrent GC tasks on threads can cause them to contend with the UI thread which could potentially lead to jank This option turns off all concurrent GC activities domain network JSON encoded network policy per domain This overrides the DisallowInsecureConnections switch Embedder can specify whether to allow or disallow insecure connections at a domain level old gen heap The size limit in megabytes for the Dart VM old gen heap space enable Enable the Impeller renderer on supported platforms Ignored if Impeller is not supported on the platform enable vulkan Enable loading Vulkan validation layers The layers must be available to the application and loadable On non Vulkan this flag does nothing enable vulkan gpu tracing
Definition: switches.h:283
DEF_SWITCHES_START aot vmservice shared library name
Definition: switches.h:32
DEF_SWITCHES_START aot vmservice shared library Name of the *so containing AOT compiled Dart assets for launching the service isolate vm snapshot The VM snapshot data that will be memory mapped as read only SnapshotAssetPath must be present isolate snapshot The isolate snapshot data that will be memory mapped as read only SnapshotAssetPath must be present cache dir Path to the cache directory This is different from the persistent_cache_path in embedder which is used for Skia shader cache icu native lib Path to the library file that exports the ICU data vm service The hostname IP address on which the Dart VM Service should be served If not defaults to or::depending on whether ipv6 is specified vm service A custom Dart VM Service port The default is to pick a randomly available open port disable vm Disable the Dart VM Service The Dart VM Service is never available in release mode disable vm service Disable mDNS Dart VM Service publication Bind to the IPv6 localhost address for the Dart VM Service Ignored if vm service host is set endless trace Enable an endless trace buffer The default is a ring buffer This is useful when very old events need to viewed For during application launch Memory usage will continue to grow indefinitely however Start app with an specific route defined on the framework flutter assets Path to the Flutter assets directory enable service port Allow the VM service to fallback to automatic port selection if binding to a specified port fails trace Trace early application lifecycle Automatically switches to an endless trace buffer trace skia allowlist
Definition: switches.h:171
void TraceEventFlowEnd0(TraceArg category_group, TraceArg name, TraceIDArg id)
Definition: trace_event.cc:489
void TraceEventInstant0(TraceArg category_group, TraceArg name, size_t flow_id_count, const uint64_t *flow_ids)
Definition: trace_event.cc:460
std::string TraceToString(const char *string)
Definition: trace_event.h:256
void TraceEventFlowBegin0(TraceArg category_group, TraceArg name, TraceIDArg id)
Definition: trace_event.cc:481
bool TraceHasTimelineEventHandler()
Definition: trace_event.cc:375
void TraceEventAsyncBegin0(TraceArg category_group, TraceArg name, TraceIDArg id, size_t flow_id_count, const uint64_t *flow_ids)
Definition: trace_event.cc:436
void TraceSetAllowlist(const std::vector< std::string > &allowlist)
Definition: trace_event.cc:371
void TraceEventAsyncEnd0(TraceArg category_group, TraceArg name, TraceIDArg id)
Definition: trace_event.cc:442
void TraceEvent0(TraceArg category_group, TraceArg name, size_t flow_id_count, const uint64_t *flow_ids)
Definition: trace_event.cc:408
void TraceEventInstant1(TraceArg category_group, TraceArg name, size_t flow_id_count, const uint64_t *flow_ids, TraceArg arg1_name, TraceArg arg1_val)
Definition: trace_event.cc:465
const char * TraceArg
Definition: trace_event.h:212
int64_t(*)() TimelineMicrosSource
Definition: trace_event.h:227
void TraceEventAsyncBegin1(TraceArg category_group, TraceArg name, TraceIDArg id, size_t flow_id_count, const uint64_t *flow_ids, TraceArg arg1_name, TraceArg arg1_val)
Definition: trace_event.cc:446
void TraceTimelineEvent(TraceArg category_group, TraceArg name, int64_t timestamp_micros, TraceIDArg identifier, size_t flow_id_count, const uint64_t *flow_ids, Dart_Timeline_Event_Type type, const std::vector< const char * > &c_names, const std::vector< std::string > &values)
Definition: trace_event.cc:389
void SplitArgumentsCollect(std::vector< const char * > &keys, std::vector< std::string > &values)
Definition: trace_event.h:273
void TraceSetTimelineEventHandler(TimelineEventHandler handler)
Definition: trace_event.cc:373
void TraceSetTimelineMicrosSource(TimelineMicrosSource source)
Definition: trace_event.cc:383
void TraceEvent2(TraceArg category_group, TraceArg name, size_t flow_id_count, const uint64_t *flow_ids, TraceArg arg1_name, TraceArg arg1_val, TraceArg arg2_name, TraceArg arg2_val)
Definition: trace_event.cc:420
void TraceEventAsyncEnd1(TraceArg category_group, TraceArg name, TraceIDArg id, TraceArg arg1_name, TraceArg arg1_val)
Definition: trace_event.cc:454
int64_t TraceIDArg
Definition: trace_event.h:213
size_t TraceNonce()
Definition: trace_event.cc:385
void TraceEventEnd(TraceArg name)
Definition: trace_event.cc:429
void TraceEventInstant2(TraceArg category_group, TraceArg name, size_t flow_id_count, const uint64_t *flow_ids, TraceArg arg1_name, TraceArg arg1_val, TraceArg arg2_name, TraceArg arg2_val)
Definition: trace_event.cc:472
void TraceEvent(TraceArg category, TraceArg name, size_t flow_id_count, const uint64_t *flow_ids, Args... args)
Definition: trace_event.h:325
int64_t TraceGetTimelineMicros()
Definition: trace_event.cc:379
void TraceCounter(TraceArg category, TraceArg name, TraceIDArg identifier, Args... args)
Definition: trace_event.h:304
std::pair< std::vector< const char * >, std::vector< std::string > > SplitArguments()
Definition: trace_event.h:288
void TraceEvent1(TraceArg category_group, TraceArg name, size_t flow_id_count, const uint64_t *flow_ids, TraceArg arg1_name, TraceArg arg1_val)
Definition: trace_event.cc:413
void(* TimelineEventHandler)(const char *, int64_t, int64_t, intptr_t, const int64_t *, Dart_Timeline_Event_Type, intptr_t, const char **, const char **)
Definition: trace_event.h:217
void TraceCounterNopHACK(TraceArg category, TraceArg name, TraceIDArg identifier, Args... args)
Definition: trace_event.h:319
void TraceEventAsyncComplete(TraceArg category_group, TraceArg name, TimePoint begin, TimePoint end)
Definition: trace_event.cc:431
void TraceEventFlowStep0(TraceArg category_group, TraceArg name, TraceIDArg id)
Definition: trace_event.cc:485
Definition: ascii_trie.cc:9
static SkString to_string(int n)
Definition: nanobench.cpp:119
#define T
Definition: precompiler.cc:65