mirror of
https://github.com/dart-lang/sdk
synced 2024-09-15 23:09:48 +00:00
[SDK] Remove dart:profiler library which has been deprecated since Dart 1.2
and remove all references to it in tests and the SDK build scripts. Change-Id: I65a4d71b74c66ca090eba28e922e2f70a7b2989d Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/114965 Reviewed-by: Ben Konyi <bkonyi@google.com> Commit-Queue: Siva Annamalai <asiva@google.com>
This commit is contained in:
parent
a94a3c60d7
commit
6f85cb83cf
|
@ -4,10 +4,9 @@
|
|||
|
||||
/// Test that exports are serialized in platform.dill.
|
||||
|
||||
// Note: "dart:profiler" exports UserTag from "dart:developer". This is
|
||||
// somewhat brittle and we should extend this test framework to be able to deal
|
||||
// with multiple .dill files.
|
||||
import 'dart:profiler' show UserTag;
|
||||
// This is somewhat brittle and we should extend this test framework to be
|
||||
// able to deal with multiple .dill files.
|
||||
import 'dart:developer' show UserTag;
|
||||
|
||||
export 'dart:core' show print;
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@ import "dart:core" as core;
|
|||
additionalExports = (core::print)
|
||||
|
||||
|
||||
import "dart:profiler";
|
||||
import "dart:developer";
|
||||
export "dart:core";
|
||||
|
||||
static method main() → dynamic
|
||||
|
|
|
@ -5,7 +5,7 @@ import "dart:developer" as dev;
|
|||
additionalExports = (core::print)
|
||||
|
||||
|
||||
import "dart:profiler";
|
||||
import "dart:developer";
|
||||
export "dart:core";
|
||||
|
||||
static method main() → dynamic {
|
||||
|
|
|
@ -5,7 +5,7 @@ import "dart:developer" as dev;
|
|||
additionalExports = (core::print)
|
||||
|
||||
|
||||
import "dart:profiler";
|
||||
import "dart:developer";
|
||||
export "dart:core";
|
||||
|
||||
static method main() → dynamic {
|
||||
|
|
|
@ -32,7 +32,6 @@ class DartRunnerTarget extends VmTarget {
|
|||
// PRODUCT mode.
|
||||
'dart:mirrors',
|
||||
|
||||
'dart:profiler',
|
||||
'dart:typed_data',
|
||||
'dart:nativewrappers',
|
||||
'dart:io',
|
||||
|
|
|
@ -37,7 +37,6 @@ class FlutterTarget extends VmTarget {
|
|||
// PRODUCT mode.
|
||||
'dart:mirrors',
|
||||
|
||||
'dart:profiler',
|
||||
'dart:typed_data',
|
||||
'dart:nativewrappers',
|
||||
'dart:io',
|
||||
|
|
|
@ -32,7 +32,6 @@ class FlutterRunnerTarget extends VmTarget {
|
|||
// PRODUCT mode.
|
||||
'dart:mirrors',
|
||||
|
||||
'dart:profiler',
|
||||
'dart:typed_data',
|
||||
'dart:nativewrappers',
|
||||
'dart:io',
|
||||
|
|
|
@ -69,7 +69,6 @@ class VmTarget extends Target {
|
|||
// PRODUCT mode.
|
||||
'dart:mirrors',
|
||||
|
||||
'dart:profiler',
|
||||
'dart:typed_data',
|
||||
'dart:vmservice_io',
|
||||
'dart:_vmservice',
|
||||
|
|
|
@ -52,7 +52,7 @@ var tests = <IsolateTest>[
|
|||
expect(event['pid'], isInt);
|
||||
expect(event['tid'], isInt);
|
||||
expect(event['ts'], isInt);
|
||||
expect(event['cat'], equals("Profiler"));
|
||||
expect(event['cat'], equals("Developer"));
|
||||
expect(event['args']['backtrace'], isString);
|
||||
}
|
||||
},
|
||||
|
@ -62,7 +62,7 @@ var vmArgs = [
|
|||
'--profiler=true',
|
||||
'--profile-vm=false', // So this also works with DBC and KBC.
|
||||
'--timeline_recorder=ring',
|
||||
'--timeline_streams=Profiler'
|
||||
'--timeline_streams=Developer'
|
||||
];
|
||||
|
||||
main(args) async =>
|
||||
|
|
|
@ -13,7 +13,6 @@ import("../../sdk/lib/internal/internal_sources.gni")
|
|||
import("../../sdk/lib/isolate/isolate_sources.gni")
|
||||
import("../../sdk/lib/math/math_sources.gni")
|
||||
import("../../sdk/lib/mirrors/mirrors_sources.gni")
|
||||
import("../../sdk/lib/profiler/profiler_sources.gni")
|
||||
import("../../sdk/lib/typed_data/typed_data_sources.gni")
|
||||
import("../../sdk/lib/vmservice/vmservice_sources.gni")
|
||||
import("../../sdk/lib/wasm/wasm_sources.gni")
|
||||
|
|
|
@ -127,11 +127,6 @@ void Bootstrap::SetupNativeResolver() {
|
|||
library.set_native_entry_symbol_resolver(symbol_resolver);
|
||||
#endif
|
||||
|
||||
library = Library::ProfilerLibrary();
|
||||
ASSERT(!library.IsNull());
|
||||
library.set_native_entry_resolver(resolver);
|
||||
library.set_native_entry_symbol_resolver(symbol_resolver);
|
||||
|
||||
library = Library::TypedDataLibrary();
|
||||
ASSERT(!library.IsNull());
|
||||
library.set_native_entry_resolver(resolver);
|
||||
|
|
|
@ -7912,7 +7912,7 @@ TEST_CASE(DartAPI_NotifyLowMemory) {
|
|||
TEST_CASE(DartAPI_InvokeImportedFunction) {
|
||||
const char* kScriptChars =
|
||||
"import 'dart:math';\n"
|
||||
"import 'dart:profiler';\n"
|
||||
"import 'dart:developer';\n"
|
||||
"main() {}";
|
||||
Dart_Handle lib = TestCase::LoadTestScript(kScriptChars, NULL);
|
||||
EXPECT_VALID(lib);
|
||||
|
@ -7924,11 +7924,6 @@ TEST_CASE(DartAPI_InvokeImportedFunction) {
|
|||
EXPECT_ERROR(result,
|
||||
"NoSuchMethodError: No top-level method 'max' declared.");
|
||||
|
||||
// The function 'getCurrentTag' is actually defined in the library
|
||||
// dart:developer. However, the library dart:profiler exports dart:developer
|
||||
// and exposes the function 'getCurrentTag'.
|
||||
// NOTE: dart:profiler is deprecated. So, its use in this test is only
|
||||
// an interim solution until we fix DartAPI_Invoke_CrossLibrary.
|
||||
Dart_Handle getCurrentTag = Dart_NewStringFromCString("getCurrentTag");
|
||||
result = Dart_Invoke(lib, getCurrentTag, 0, NULL);
|
||||
EXPECT_ERROR(
|
||||
|
|
|
@ -27,7 +27,6 @@ class ObjectPointerVisitor;
|
|||
M(Isolate, isolate) \
|
||||
M(Math, math) \
|
||||
M(Mirrors, mirrors) \
|
||||
M(Profiler, profiler) \
|
||||
M(TypedData, typed_data) \
|
||||
M(VMService, _vmservice) \
|
||||
M(Wasm, wasm)
|
||||
|
|
|
@ -2545,7 +2545,7 @@ void Profile::PrintBacktrace(ProfileTrieNode* node, TextBuffer* buf) {
|
|||
}
|
||||
|
||||
void Profile::AddToTimeline(bool code_trie) {
|
||||
TimelineStream* stream = Timeline::GetProfilerStream();
|
||||
TimelineStream* stream = Timeline::GetDeveloperStream();
|
||||
if (stream == NULL) {
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -53,7 +53,7 @@ class Zone;
|
|||
V(Embedder, "dart:embedder") \
|
||||
V(GC, "dart:gc") \
|
||||
V(Isolate, "dart:isolate") \
|
||||
V(Profiler, "dart:profiler") \
|
||||
V(Developer, "dart:developer") \
|
||||
V(VM, "dart:vm")
|
||||
|
||||
// A stream of timeline events. A stream has a name and can be enabled or
|
||||
|
|
|
@ -214,7 +214,6 @@ _full_sdk_libraries = [
|
|||
"js_util",
|
||||
"math",
|
||||
"mirrors",
|
||||
"profiler",
|
||||
"svg",
|
||||
"typed_data",
|
||||
"wasm",
|
||||
|
@ -241,7 +240,6 @@ _full_sdk_libraries = [
|
|||
# "isolate",
|
||||
# "math",
|
||||
# "mirrors",
|
||||
# "profiler",
|
||||
# "typed_data",
|
||||
# ]
|
||||
_platform_sdk_libraries = _full_sdk_libraries
|
||||
|
|
|
@ -1,10 +0,0 @@
|
|||
// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
|
||||
// for details. All rights reserved. Use of this source code is governed by a
|
||||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
/// Please see 'dart:developer'.
|
||||
@Deprecated("Dart SDK 1.12")
|
||||
library dart.profiler;
|
||||
|
||||
export 'dart:developer'
|
||||
show getCurrentTag, Counter, Gauge, Metric, Metrics, UserTag;
|
|
@ -1,8 +0,0 @@
|
|||
# Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file
|
||||
# for details. All rights reserved. Use of this source code is governed by a
|
||||
# BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
profiler_sdk_sources = [
|
||||
"profiler.dart",
|
||||
# The above file needs to be first if additional parts are added to the lib.
|
||||
]
|
Loading…
Reference in a new issue