Flutter Engine
The Flutter Engine
third_party
dart-lang
sdk
runtime
lib
profiler.cc
Go to the documentation of this file.
1
// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
2
// for details. All rights reserved. Use of this source code is governed by a
3
// BSD-style license that can be found in the LICENSE file.
4
5
#include "
vm/bootstrap_natives.h
"
6
7
#include "
include/dart_api.h
"
8
9
#include "
vm/exceptions.h
"
10
#include "
vm/native_entry.h
"
11
#include "
vm/object.h
"
12
#include "
vm/object_store.h
"
13
14
namespace
dart
{
15
16
// Native implementations of the profiler parts of the dart:developer library.
17
18
DEFINE_NATIVE_ENTRY
(UserTag_new, 0, 2) {
19
ASSERT
(
20
TypeArguments::CheckedHandle(zone, arguments->NativeArgAt(0)).IsNull());
21
GET_NON_NULL_NATIVE_ARGUMENT
(
String
, tag_label, arguments->NativeArgAt(1));
22
return
UserTag::New
(tag_label);
23
}
24
25
DEFINE_NATIVE_ENTRY
(UserTag_label, 0, 1) {
26
const
UserTag
&
self
= UserTag::CheckedHandle(zone, arguments->NativeArgAt(0));
27
return
self
.label();
28
}
29
30
DEFINE_NATIVE_ENTRY
(UserTag_makeCurrent, 0, 1) {
31
const
UserTag
&
self
= UserTag::CheckedHandle(zone, arguments->NativeArgAt(0));
32
return
self
.MakeActive();
33
}
34
35
DEFINE_NATIVE_ENTRY
(UserTag_defaultTag, 0, 0) {
36
if
(FLAG_trace_intrinsified_natives) {
37
OS::PrintErr
(
"UserTag_defaultTag\n"
);
38
}
39
return
isolate->default_tag();
40
}
41
42
DEFINE_NATIVE_ENTRY
(Profiler_getCurrentTag, 0, 0) {
43
if
(FLAG_trace_intrinsified_natives) {
44
OS::PrintErr
(
"Profiler_getCurrentTag\n"
);
45
}
46
return
isolate->current_tag();
47
}
48
49
}
// namespace dart
self
return self
Definition:
FlutterTextureRegistryRelay.mm:19
bootstrap_natives.h
dart::OS::PrintErr
static void static void PrintErr(const char *format,...) PRINTF_ATTRIBUTE(1
dart::String
Definition:
object.h:10158
dart::UserTag
Definition:
object.h:13152
dart::UserTag::New
static UserTagPtr New(const String &label, Heap::Space space=Heap::kOld)
Definition:
object.cc:26949
dart_api.h
ASSERT
#define ASSERT(E)
Definition:
entrypoints_verification_test.cc:25
exceptions.h
dart
Definition:
dart_vm.cc:33
dart::DEFINE_NATIVE_ENTRY
DEFINE_NATIVE_ENTRY(List_allocate, 0, 2)
Definition:
array.cc:13
native_entry.h
GET_NON_NULL_NATIVE_ARGUMENT
#define GET_NON_NULL_NATIVE_ARGUMENT(type, name, value)
Definition:
native_entry.h:74
object.h
object_store.h
Generated on Sun Jun 23 2024 21:55:47 for Flutter Engine by
1.9.4