Flutter Engine Uber Docs
Docs for the entire Flutter Engine repo.
 
Loading...
Searching...
No Matches
FlutterTracing.mm
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
6
9
11
12@implementation FlutterTracing
13
14+ (void)tracePlatformVsyncWithStartTime:(NSTimeInterval)startTime
15 targetTime:(NSTimeInterval)targetTime {
16 int64_t startTimeMicroseconds = (int64_t)(startTime * 1000000);
17 int64_t targetTimeMicroseconds = (int64_t)(targetTime * 1000000);
18 TRACE_EVENT2_INT("flutter", "PlatformVsync", "frame_start_time", startTimeMicroseconds,
19 "frame_target_time", targetTimeMicroseconds);
20}
21
22+ (void)traceAsyncBegin:(NSString*)name eventID:(int64_t)eventID {
23 TRACE_EVENT_ASYNC_BEGIN0("flutter", [name UTF8String] ?: "", eventID);
24}
25
26+ (void)traceAsyncEnd:(NSString*)name eventID:(int64_t)eventID {
27 TRACE_EVENT_ASYNC_END0("flutter", [name UTF8String] ?: "", eventID);
28}
29
30+ (void)beginSection:(NSString*)name {
31 ::fml::tracing::TraceEvent0("flutter", [name UTF8String] ?: "", 0, nullptr);
32}
33
34+ (void)endSection:(NSString*)name {
35 ::fml::tracing::TraceEventEnd([name UTF8String] ?: "");
36}
37
38@end
const char * name
Definition fuchsia.cc:50
void TraceEvent0(TraceArg category_group, TraceArg name, size_t flow_id_count, const uint64_t *flow_ids)
void TraceEventEnd(TraceArg name)
#define TRACE_EVENT2_INT(category_group, name, arg1_name, arg1_val, arg2_name, arg2_val)
#define TRACE_EVENT_ASYNC_END0(category_group, name, id)
#define TRACE_EVENT_ASYNC_BEGIN0(category_group, name, id)