mirror of
https://github.com/dart-lang/sdk
synced 2024-09-04 16:03:44 +00:00
Revert "Remove deprecated dart:profiler library"
This reverts commit 535a9715ac
.
R=johnmccutchan@google.com
Review URL: https://codereview.chromium.org/1415843008 .
This commit is contained in:
parent
181e8cc2a9
commit
be025b8412
12
runtime/lib/profiler_sources.gypi
Normal file
12
runtime/lib/profiler_sources.gypi
Normal file
|
@ -0,0 +1,12 @@
|
|||
# Copyright (c) 2015, 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.
|
||||
|
||||
# Sources list to keep vm/BUILD.gn generate_core_libraries happy.
|
||||
|
||||
{
|
||||
'sources': [
|
||||
'empty_source.dart'
|
||||
],
|
||||
}
|
||||
|
|
@ -193,6 +193,7 @@ generate_core_libraries("core_libraries") {
|
|||
["isolate", "isolate"],
|
||||
["math", "math"],
|
||||
["mirrors", "mirrors"],
|
||||
["profiler", "profiler"],
|
||||
["typed_data", "typed_data"],
|
||||
["_vmservice", "vmservice"],
|
||||
]
|
||||
|
|
|
@ -67,6 +67,10 @@ static bootstrap_lib_props bootstrap_libraries[] = {
|
|||
mirrors,
|
||||
Bootstrap::mirrors_source_paths_,
|
||||
Bootstrap::mirrors_patch_paths_),
|
||||
INIT_LIBRARY(ObjectStore::kProfiler,
|
||||
profiler,
|
||||
Bootstrap::profiler_source_paths_,
|
||||
NULL),
|
||||
INIT_LIBRARY(ObjectStore::kTypedData,
|
||||
typed_data,
|
||||
Bootstrap::typed_data_source_paths_,
|
||||
|
|
|
@ -30,6 +30,7 @@ class Bootstrap : public AllStatic {
|
|||
static const char* json_source_paths_[];
|
||||
static const char* math_source_paths_[];
|
||||
static const char* mirrors_source_paths_[];
|
||||
static const char* profiler_source_paths_[];
|
||||
static const char* typed_data_source_paths_[];
|
||||
static const char* utf_source_paths_[];
|
||||
static const char* _vmservice_source_paths_[];
|
||||
|
@ -44,6 +45,7 @@ class Bootstrap : public AllStatic {
|
|||
static const char* isolate_patch_paths_[];
|
||||
static const char* math_patch_paths_[];
|
||||
static const char* mirrors_patch_paths_[];
|
||||
static const char* profiler_patch_paths_[];
|
||||
static const char* typed_data_patch_paths_[];
|
||||
static const char* _vmservice_patch_paths_[];
|
||||
};
|
||||
|
|
|
@ -121,6 +121,11 @@ void Bootstrap::SetupNativeResolver() {
|
|||
library.set_native_entry_resolver(resolver);
|
||||
library.set_native_entry_symbol_resolver(symbol_resolver);
|
||||
|
||||
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);
|
||||
|
|
|
@ -10466,6 +10466,11 @@ RawLibrary* Library::NativeWrappersLibrary() {
|
|||
}
|
||||
|
||||
|
||||
RawLibrary* Library::ProfilerLibrary() {
|
||||
return Isolate::Current()->object_store()->profiler_library();
|
||||
}
|
||||
|
||||
|
||||
RawLibrary* Library::TypedDataLibrary() {
|
||||
return Isolate::Current()->object_store()->typed_data_library();
|
||||
}
|
||||
|
|
|
@ -3520,6 +3520,7 @@ class Library : public Object {
|
|||
static RawLibrary* MathLibrary();
|
||||
static RawLibrary* MirrorsLibrary();
|
||||
static RawLibrary* NativeWrappersLibrary();
|
||||
static RawLibrary* ProfilerLibrary();
|
||||
static RawLibrary* TypedDataLibrary();
|
||||
static RawLibrary* VMServiceLibrary();
|
||||
|
||||
|
|
|
@ -68,6 +68,7 @@ ObjectStore::ObjectStore()
|
|||
math_library_(Library::null()),
|
||||
mirrors_library_(Library::null()),
|
||||
native_wrappers_library_(Library::null()),
|
||||
profiler_library_(Library::null()),
|
||||
root_library_(Library::null()),
|
||||
typed_data_library_(Library::null()),
|
||||
vmservice_library_(Library::null()),
|
||||
|
|
|
@ -30,6 +30,7 @@ class ObjectStore {
|
|||
kIsolate,
|
||||
kMath,
|
||||
kMirrors,
|
||||
kProfiler,
|
||||
kTypedData,
|
||||
kVMService,
|
||||
};
|
||||
|
@ -263,6 +264,7 @@ class ObjectStore {
|
|||
RawLibrary* isolate_library() const { return isolate_library_; }
|
||||
RawLibrary* math_library() const { return math_library_; }
|
||||
RawLibrary* mirrors_library() const { return mirrors_library_; }
|
||||
RawLibrary* profiler_library() const { return profiler_library_; }
|
||||
RawLibrary* typed_data_library() const { return typed_data_library_; }
|
||||
RawLibrary* vmservice_library() const { return vmservice_library_; }
|
||||
|
||||
|
@ -295,6 +297,9 @@ class ObjectStore {
|
|||
case kMirrors:
|
||||
mirrors_library_ = value.raw();
|
||||
break;
|
||||
case kProfiler:
|
||||
profiler_library_ = value.raw();
|
||||
break;
|
||||
case kTypedData:
|
||||
typed_data_library_ = value.raw();
|
||||
break;
|
||||
|
@ -527,6 +532,7 @@ class ObjectStore {
|
|||
RawLibrary* math_library_;
|
||||
RawLibrary* mirrors_library_;
|
||||
RawLibrary* native_wrappers_library_;
|
||||
RawLibrary* profiler_library_;
|
||||
RawLibrary* root_library_;
|
||||
RawLibrary* typed_data_library_;
|
||||
RawLibrary* vmservice_library_;
|
||||
|
|
|
@ -25,6 +25,7 @@
|
|||
'math_patch_cc_file': '<(gen_source_dir)/math_patch_gen.cc',
|
||||
'mirrors_cc_file': '<(gen_source_dir)/mirrors_gen.cc',
|
||||
'mirrors_patch_cc_file': '<(gen_source_dir)/mirrors_patch_gen.cc',
|
||||
'profiler_cc_file': '<(gen_source_dir)/profiler_gen.cc',
|
||||
'snapshot_test_dat_file': '<(gen_source_dir)/snapshot_test.dat',
|
||||
'snapshot_test_in_dat_file': 'snapshot_test_in.dat',
|
||||
'snapshot_test_dart_file': 'snapshot_test.dart',
|
||||
|
@ -180,6 +181,7 @@
|
|||
'generate_math_patch_cc_file#host',
|
||||
'generate_mirrors_cc_file#host',
|
||||
'generate_mirrors_patch_cc_file#host',
|
||||
'generate_profiler_cc_file#host',
|
||||
'generate_typed_data_cc_file#host',
|
||||
'generate_typed_data_patch_cc_file#host',
|
||||
'generate_vmservice_cc_file#host',
|
||||
|
@ -218,6 +220,7 @@
|
|||
'<(math_patch_cc_file)',
|
||||
'<(mirrors_cc_file)',
|
||||
'<(mirrors_patch_cc_file)',
|
||||
'<(profiler_cc_file)',
|
||||
'<(typed_data_cc_file)',
|
||||
'<(typed_data_patch_cc_file)',
|
||||
'<(vmservice_cc_file)',
|
||||
|
@ -969,6 +972,46 @@
|
|||
},
|
||||
]
|
||||
},
|
||||
{
|
||||
'target_name': 'generate_profiler_cc_file',
|
||||
'type': 'none',
|
||||
'toolsets':['host'],
|
||||
'includes': [
|
||||
# Load the shared library sources.
|
||||
'../../sdk/lib/profiler/profiler_sources.gypi',
|
||||
],
|
||||
'sources/': [
|
||||
# Exclude all .[cc|h] files.
|
||||
# This is only here for reference. Excludes happen after
|
||||
# variable expansion, so the script has to do its own
|
||||
# exclude processing of the sources being passed.
|
||||
['exclude', '\\.cc|h$'],
|
||||
],
|
||||
'actions': [
|
||||
{
|
||||
'action_name': 'generate_profiler_cc',
|
||||
'inputs': [
|
||||
'../tools/gen_library_src_paths.py',
|
||||
'<(libgen_in_cc_file)',
|
||||
'<@(_sources)',
|
||||
],
|
||||
'outputs': [
|
||||
'<(profiler_cc_file)',
|
||||
],
|
||||
'action': [
|
||||
'python',
|
||||
'tools/gen_library_src_paths.py',
|
||||
'--output', '<(profiler_cc_file)',
|
||||
'--input_cc', '<(libgen_in_cc_file)',
|
||||
'--include', 'vm/bootstrap.h',
|
||||
'--var_name', 'dart::Bootstrap::profiler_source_paths_',
|
||||
'--library_name', 'dart:profiler',
|
||||
'<@(_sources)',
|
||||
],
|
||||
'message': 'Generating ''<(profiler_cc_file)'' file.'
|
||||
},
|
||||
]
|
||||
},
|
||||
{
|
||||
'target_name': 'generate_developer_cc_file',
|
||||
'type': 'none',
|
||||
|
|
14
sdk/lib/profiler/profiler.dart
Normal file
14
sdk/lib/profiler/profiler.dart
Normal file
|
@ -0,0 +1,14 @@
|
|||
// 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;
|
10
sdk/lib/profiler/profiler_sources.gypi
Normal file
10
sdk/lib/profiler/profiler_sources.gypi
Normal file
|
@ -0,0 +1,10 @@
|
|||
# Copyright (c) 2013, 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.
|
||||
|
||||
{
|
||||
'sources': [
|
||||
'profiler.dart',
|
||||
# The above file needs to be first if additional parts are added to the lib.
|
||||
],
|
||||
}
|
|
@ -149,7 +149,7 @@ def CopyDartdocResources(home,sdk_root):
|
|||
PACKAGES_FILE = join(DARTDOC, '.packages')
|
||||
packages_file = open(PACKAGES_FILE, 'w')
|
||||
packages_file.write('dartdoc:.')
|
||||
packages_file.close()
|
||||
packages_file.close()
|
||||
|
||||
|
||||
def Main():
|
||||
|
@ -236,7 +236,7 @@ def Main():
|
|||
join('html', 'dart2js'), join('html', 'dartium'),
|
||||
join('html', 'html_common'),
|
||||
join('indexed_db', 'dart2js'), join('indexed_db', 'dartium'),
|
||||
'js', 'math', 'mirrors', 'typed_data',
|
||||
'js', 'math', 'mirrors', 'profiler', 'typed_data',
|
||||
join('svg', 'dart2js'), join('svg', 'dartium'),
|
||||
join('web_audio', 'dart2js'), join('web_audio', 'dartium'),
|
||||
join('web_gl', 'dart2js'), join('web_gl', 'dartium'),
|
||||
|
|
Loading…
Reference in a new issue