From 662ff7f112584f229299eabd49710060cab5e648 Mon Sep 17 00:00:00 2001 From: Ryan Macnak Date: Wed, 10 Oct 2018 21:39:45 +0000 Subject: [PATCH] [vm] Remove TokenStream, TokenValue, CompilerStats. (CompilerStats timers have been replaced with the timeline events.) Change-Id: Iddcb752c085de9762eb802371b6d2905fa608a76 Reviewed-on: https://dart-review.googlesource.com/c/79086 Reviewed-by: Siva Annamalai Commit-Queue: Ryan Macnak --- runtime/lib/mirrors.cc | 12 +- runtime/observatory/lib/elements.dart | 3 - runtime/observatory/lib/models.dart | 1 - .../lib/src/elements/helpers/any_ref.dart | 3 - .../lib/src/elements/token_stream_ref.dart | 60 - .../lib/src/models/objects/token_stream.dart | 10 - .../observatory/lib/src/service/object.dart | 21 - runtime/observatory/observatory_sources.gni | 2 - .../tests/observatory_ui/mocks.dart | 1 - .../mocks/objects/token_stream.dart | 11 - .../token_stream_ref/element_test.dart | 43 - .../token_stream_ref/element_test.html | 18 - runtime/vm/benchmark_test.cc | 68 +- runtime/vm/clustered_snapshot.cc | 164 --- runtime/vm/compiler/aot/precompiler.cc | 19 - .../compiler/backend/flow_graph_compiler.cc | 11 - runtime/vm/compiler/backend/inliner.cc | 8 - runtime/vm/compiler/compiler_pass.cc | 2 - .../compiler/frontend/constant_evaluator.cc | 3 - runtime/vm/compiler/jit/compiler.cc | 24 - runtime/vm/compiler_stats.cc | 308 ----- runtime/vm/compiler_stats.h | 142 -- runtime/vm/dart_api_impl.cc | 1 - runtime/vm/debugger.cc | 27 +- runtime/vm/flag_list.h | 1 - runtime/vm/heap/pages.cc | 1 - runtime/vm/isolate.cc | 16 - runtime/vm/isolate.h | 7 - runtime/vm/object.cc | 1141 +---------------- runtime/vm/object.h | 128 -- runtime/vm/object_service.cc | 20 - runtime/vm/object_store.h | 2 - runtime/vm/object_test.cc | 170 +-- runtime/vm/parser.cc | 2 - runtime/vm/parser.h | 1 - runtime/vm/profiler_service.cc | 9 +- runtime/vm/raw_object.cc | 2 - runtime/vm/raw_object.h | 32 +- runtime/vm/raw_object_snapshot.cc | 32 - runtime/vm/service_test.cc | 56 - runtime/vm/snapshot.cc | 1 - runtime/vm/snapshot.h | 9 - runtime/vm/snapshot_test.cc | 74 +- runtime/vm/symbols.h | 2 - runtime/vm/thread.cc | 12 - runtime/vm/thread.h | 5 - runtime/vm/timer.h | 68 - runtime/vm/unit_test.cc | 1 - runtime/vm/vm_sources.gni | 2 - tests/lib_2/lib_2_kernel.status | 1 - 50 files changed, 28 insertions(+), 2729 deletions(-) delete mode 100644 runtime/observatory/lib/src/elements/token_stream_ref.dart delete mode 100644 runtime/observatory/lib/src/models/objects/token_stream.dart delete mode 100644 runtime/observatory/tests/observatory_ui/mocks/objects/token_stream.dart delete mode 100644 runtime/observatory/tests/observatory_ui/token_stream_ref/element_test.dart delete mode 100644 runtime/observatory/tests/observatory_ui/token_stream_ref/element_test.html delete mode 100644 runtime/vm/compiler_stats.cc delete mode 100644 runtime/vm/compiler_stats.h diff --git a/runtime/lib/mirrors.cc b/runtime/lib/mirrors.cc index 249efd305f5..1646f27bf8b 100644 --- a/runtime/lib/mirrors.cc +++ b/runtime/lib/mirrors.cc @@ -1618,16 +1618,8 @@ DEFINE_NATIVE_ENTRY(DeclarationMirror_location, 1) { if (script.kind() == RawScript::kLibraryTag) break; } ASSERT(!script.IsNull()); - const String& libname = String::Handle(zone, lib.name()); - if (libname.Length() == 0) { - // No library declaration. - const String& uri = String::Handle(zone, script.url()); - return CreateSourceLocation(uri, 1, 1); - } - const TokenStream& stream = TokenStream::Handle(zone, script.tokens()); - TokenStream::Iterator tkit(zone, stream, TokenPosition::kMinSource); - if (tkit.CurrentTokenKind() == Token::kSCRIPTTAG) tkit.Advance(); - token_pos = tkit.CurrentPosition(); + const String& uri = String::Handle(zone, script.url()); + return CreateSourceLocation(uri, 1, 1); } ASSERT(!script.IsNull()); diff --git a/runtime/observatory/lib/elements.dart b/runtime/observatory/lib/elements.dart index f6268bddf7f..25ef536bfd1 100644 --- a/runtime/observatory/lib/elements.dart +++ b/runtime/observatory/lib/elements.dart @@ -91,7 +91,6 @@ import 'package:observatory/src/elements/subtypetestcache_ref.dart'; import 'package:observatory/src/elements/subtypetestcache_view.dart'; import 'package:observatory/src/elements/timeline_page.dart'; import 'package:observatory/src/elements/timeline/dashboard.dart'; -import 'package:observatory/src/elements/token_stream_ref.dart'; import 'package:observatory/src/elements/type_arguments_ref.dart'; import 'package:observatory/src/elements/unknown_ref.dart'; import 'package:observatory/src/elements/unlinkedcall_ref.dart'; @@ -192,7 +191,6 @@ export 'package:observatory/src/elements/subtypetestcache_ref.dart'; export 'package:observatory/src/elements/subtypetestcache_view.dart'; export 'package:observatory/src/elements/timeline_page.dart'; export 'package:observatory/src/elements/timeline/dashboard.dart'; -export 'package:observatory/src/elements/token_stream_ref.dart'; export 'package:observatory/src/elements/type_arguments_ref.dart'; export 'package:observatory/src/elements/unknown_ref.dart'; export 'package:observatory/src/elements/unlinkedcall_ref.dart'; @@ -297,7 +295,6 @@ Future initElements() async { SubtypeTestCacheViewElement.tag.ensureRegistration(); TimelinePageElement.tag.ensureRegistration(); TimelineDashboardElement.tag.ensureRegistration(); - TokenStreamRefElement.tag.ensureRegistration(); TypeArgumentsRefElement.tag.ensureRegistration(); UnknownObjectRefElement.tag.ensureRegistration(); UnlinkedCallRefElement.tag.ensureRegistration(); diff --git a/runtime/observatory/lib/models.dart b/runtime/observatory/lib/models.dart index 5fe870b8bd1..c5a6538fafc 100644 --- a/runtime/observatory/lib/models.dart +++ b/runtime/observatory/lib/models.dart @@ -51,7 +51,6 @@ part 'src/models/objects/target.dart'; part 'src/models/objects/thread.dart'; part 'src/models/objects/timeline.dart'; part 'src/models/objects/timeline_event.dart'; -part 'src/models/objects/token_stream.dart'; part 'src/models/objects/type_arguments.dart'; part 'src/models/objects/unknown.dart'; part 'src/models/objects/unlinked_call.dart'; diff --git a/runtime/observatory/lib/src/elements/helpers/any_ref.dart b/runtime/observatory/lib/src/elements/helpers/any_ref.dart index 73064fd27d8..693fe7e6d3a 100644 --- a/runtime/observatory/lib/src/elements/helpers/any_ref.dart +++ b/runtime/observatory/lib/src/elements/helpers/any_ref.dart @@ -23,7 +23,6 @@ import 'package:observatory/src/elements/script_ref.dart'; import 'package:observatory/src/elements/sentinel_value.dart'; import 'package:observatory/src/elements/singletargetcache_ref.dart'; import 'package:observatory/src/elements/subtypetestcache_ref.dart'; -import 'package:observatory/src/elements/token_stream_ref.dart'; import 'package:observatory/src/elements/type_arguments_ref.dart'; import 'package:observatory/src/elements/unknown_ref.dart'; import 'package:observatory/src/elements/unlinkedcall_ref.dart'; @@ -76,8 +75,6 @@ Element anyRef(M.IsolateRef isolate, ref, M.ObjectRepository objects, return new SubtypeTestCacheRefElement(isolate, ref, queue: queue); } else if (ref is M.TypeArgumentsRef) { return new TypeArgumentsRefElement(isolate, ref, queue: queue); - } else if (ref is M.TokenStreamRef) { - return new TokenStreamRefElement(isolate, ref, queue: queue); } else if (ref is M.UnknownObjectRef) { return new UnknownObjectRefElement(isolate, ref, queue: queue); } else if (ref is M.UnlinkedCallRef) { diff --git a/runtime/observatory/lib/src/elements/token_stream_ref.dart b/runtime/observatory/lib/src/elements/token_stream_ref.dart deleted file mode 100644 index 042195d8d7c..00000000000 --- a/runtime/observatory/lib/src/elements/token_stream_ref.dart +++ /dev/null @@ -1,60 +0,0 @@ -// 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. - -import 'dart:html'; -import 'dart:async'; -import 'package:observatory/models.dart' as M show IsolateRef, TokenStreamRef; -import 'package:observatory/src/elements/helpers/rendering_scheduler.dart'; -import 'package:observatory/src/elements/helpers/tag.dart'; -import 'package:observatory/src/elements/helpers/uris.dart'; - -class TokenStreamRefElement extends HtmlElement implements Renderable { - static const tag = const Tag('token-stream-ref'); - - RenderingScheduler _r; - - Stream> get onRendered => _r.onRendered; - - M.IsolateRef _isolate; - M.TokenStreamRef _token; - - M.IsolateRef get isolate => _isolate; - M.TokenStreamRef get token => _token; - - factory TokenStreamRefElement(M.IsolateRef isolate, M.TokenStreamRef token, - {RenderingQueue queue}) { - assert(isolate != null); - assert(token != null); - TokenStreamRefElement e = document.createElement(tag.name); - e._r = new RenderingScheduler(e, queue: queue); - e._isolate = isolate; - e._token = token; - return e; - } - - TokenStreamRefElement.created() : super.created(); - - @override - void attached() { - super.attached(); - _r.enable(); - } - - @override - void detached() { - super.detached(); - _r.disable(notify: true); - children = []; - } - - void render() { - final text = (_token.name == null || _token.name == '') - ? 'TokenStream' - : _token.name; - children = [ - new AnchorElement(href: Uris.inspect(_isolate, object: _token)) - ..text = text - ]; - } -} diff --git a/runtime/observatory/lib/src/models/objects/token_stream.dart b/runtime/observatory/lib/src/models/objects/token_stream.dart deleted file mode 100644 index 5dc5d695c5c..00000000000 --- a/runtime/observatory/lib/src/models/objects/token_stream.dart +++ /dev/null @@ -1,10 +0,0 @@ -// Copyright (c) 2016, 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. - -part of models; - -abstract class TokenStreamRef extends ObjectRef { - /// [optional] - String get name; -} diff --git a/runtime/observatory/lib/src/service/object.dart b/runtime/observatory/lib/src/service/object.dart index ab2daf5ff04..ab6ec7b1714 100644 --- a/runtime/observatory/lib/src/service/object.dart +++ b/runtime/observatory/lib/src/service/object.dart @@ -272,9 +272,6 @@ abstract class ServiceObject implements M.ObjectRef { case 'SubtypeTestCache': obj = new SubtypeTestCache._empty(owner); break; - case 'TokenStream': - obj = new TokenStream._empty(owner); - break; case 'UnlinkedCall': obj = new UnlinkedCall._empty(owner); break; @@ -4166,24 +4163,6 @@ class MegamorphicCache extends HeapObject implements M.MegamorphicCache { } } -class TokenStream extends HeapObject implements M.TokenStreamRef { - bool get immutable => true; - - String privateKey; - - TokenStream._empty(ServiceObjectOwner owner) : super._empty(owner); - - void _update(Map map, bool mapIsRef) { - _upgradeCollection(map, isolate); - super._update(map, mapIsRef); - - if (mapIsRef) { - return; - } - privateKey = map['privateKey']; - } -} - class CodeInstruction { final int address; final int pcOffset; diff --git a/runtime/observatory/observatory_sources.gni b/runtime/observatory/observatory_sources.gni index 15ddbe526a0..01dfff39012 100644 --- a/runtime/observatory/observatory_sources.gni +++ b/runtime/observatory/observatory_sources.gni @@ -139,7 +139,6 @@ observatory_sources = [ "lib/src/elements/subtypetestcache_view.dart", "lib/src/elements/timeline/dashboard.dart", "lib/src/elements/timeline_page.dart", - "lib/src/elements/token_stream_ref.dart", "lib/src/elements/top_retaining_instances.dart", "lib/src/elements/type_arguments_ref.dart", "lib/src/elements/unknown_ref.dart", @@ -194,7 +193,6 @@ observatory_sources = [ "lib/src/models/objects/thread.dart", "lib/src/models/objects/timeline.dart", "lib/src/models/objects/timeline_event.dart", - "lib/src/models/objects/token_stream.dart", "lib/src/models/objects/type_arguments.dart", "lib/src/models/objects/unknown.dart", "lib/src/models/objects/unlinked_call.dart", diff --git a/runtime/observatory/tests/observatory_ui/mocks.dart b/runtime/observatory/tests/observatory_ui/mocks.dart index 547ff83ecee..23efa868000 100644 --- a/runtime/observatory/tests/observatory_ui/mocks.dart +++ b/runtime/observatory/tests/observatory_ui/mocks.dart @@ -41,7 +41,6 @@ part 'mocks/objects/script.dart'; part 'mocks/objects/sentinel.dart'; part 'mocks/objects/source_location.dart'; part 'mocks/objects/target.dart'; -part 'mocks/objects/token_stream.dart'; part 'mocks/objects/unknown.dart'; part 'mocks/objects/vm.dart'; diff --git a/runtime/observatory/tests/observatory_ui/mocks/objects/token_stream.dart b/runtime/observatory/tests/observatory_ui/mocks/objects/token_stream.dart deleted file mode 100644 index efb6c989e95..00000000000 --- a/runtime/observatory/tests/observatory_ui/mocks/objects/token_stream.dart +++ /dev/null @@ -1,11 +0,0 @@ -// Copyright (c) 2016, 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. - -part of mocks; - -class TokenStreamRefMock implements M.TokenStreamRef { - final String id; - final String name; - const TokenStreamRefMock({this.id: 'tokenstream-id', this.name}); -} diff --git a/runtime/observatory/tests/observatory_ui/token_stream_ref/element_test.dart b/runtime/observatory/tests/observatory_ui/token_stream_ref/element_test.dart deleted file mode 100644 index 12f7351b57c..00000000000 --- a/runtime/observatory/tests/observatory_ui/token_stream_ref/element_test.dart +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) 2016, 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. - -import 'dart:html'; -import 'package:test/test.dart'; -import 'package:observatory/src/elements/token_stream_ref.dart'; -import '../mocks.dart'; - -main() { - TokenStreamRefElement.tag.ensureRegistration(); - - const isolate = const IsolateRefMock(); - const token = const TokenStreamRefMock(); - const token_named = const TokenStreamRefMock(name: 'name'); - test('instantiation', () { - final e = new TokenStreamRefElement(isolate, token); - expect(e, isNotNull, reason: 'element correctly created'); - expect(e.isolate, equals(isolate)); - expect(e.token, equals(token)); - }); - group('elements', () { - test('created after attachment (no name)', () async { - final e = new TokenStreamRefElement(isolate, token); - document.body.append(e); - await e.onRendered.first; - expect(e.children.length, isNonZero, reason: 'has elements'); - e.remove(); - await e.onRendered.first; - expect(e.children.length, isZero, reason: 'is empty'); - }); - test('created after attachment (name)', () async { - final e = new TokenStreamRefElement(isolate, token_named); - document.body.append(e); - await e.onRendered.first; - expect(e.children.length, isNonZero, reason: 'has elements'); - expect(e.innerHtml.contains(token_named.name), isTrue); - e.remove(); - await e.onRendered.first; - expect(e.children.length, isZero, reason: 'is empty'); - }); - }); -} diff --git a/runtime/observatory/tests/observatory_ui/token_stream_ref/element_test.html b/runtime/observatory/tests/observatory_ui/token_stream_ref/element_test.html deleted file mode 100644 index f548be4d62f..00000000000 --- a/runtime/observatory/tests/observatory_ui/token_stream_ref/element_test.html +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - - - - %TEST_SCRIPTS% - - diff --git a/runtime/vm/benchmark_test.cc b/runtime/vm/benchmark_test.cc index 8a06fff0c6d..076946fbbdb 100644 --- a/runtime/vm/benchmark_test.cc +++ b/runtime/vm/benchmark_test.cc @@ -14,9 +14,9 @@ #include "platform/globals.h" #include "vm/clustered_snapshot.h" -#include "vm/compiler_stats.h" #include "vm/dart_api_impl.h" #include "vm/stack_frame.h" +#include "vm/timer.h" using dart::bin::File; @@ -111,72 +111,6 @@ BENCHMARK(CorelibCompileAll) { benchmark->set_score(elapsed_time); } -#ifndef PRODUCT - -BENCHMARK(CorelibCompilerStats) { - bin::Builtin::SetNativeResolver(bin::Builtin::kBuiltinLibrary); - bin::Builtin::SetNativeResolver(bin::Builtin::kIOLibrary); - bin::Builtin::SetNativeResolver(bin::Builtin::kCLILibrary); - TransitionNativeToVM transition(thread); - CompilerStats* stats = thread->isolate()->aggregate_compiler_stats(); - ASSERT(stats != NULL); - stats->EnableBenchmark(); - Timer timer(true, "Compiler stats compiling all of Core lib"); - timer.Start(); - const Error& error = Error::Handle(Library::CompileAll()); - if (!error.IsNull()) { - OS::PrintErr("Unexpected error in CorelibCompileAll benchmark:\n%s", - error.ToErrorCString()); - } - timer.Stop(); - int64_t elapsed_time = timer.TotalElapsedTime(); - benchmark->set_score(elapsed_time); -} - -BENCHMARK(Dart2JSCompilerStats) { - bin::Builtin::SetNativeResolver(bin::Builtin::kBuiltinLibrary); - bin::Builtin::SetNativeResolver(bin::Builtin::kIOLibrary); - bin::Builtin::SetNativeResolver(bin::Builtin::kCLILibrary); - SetupDart2JSPackagePath(); - char* dart_root = ComputeDart2JSPath(Benchmark::Executable()); - char* script = NULL; - if (dart_root != NULL) { - HANDLESCOPE(thread); - script = OS::SCreate(NULL, "import '%s/pkg/compiler/lib/compiler.dart';", - dart_root); - Dart_Handle lib = TestCase::LoadTestScript( - script, reinterpret_cast(NativeResolver)); - EXPECT_VALID(lib); - } else { - Dart_Handle lib = TestCase::LoadTestScript( - "import 'pkg/compiler/lib/compiler.dart';", - reinterpret_cast(NativeResolver)); - EXPECT_VALID(lib); - } - CompilerStats* stats = thread->isolate()->aggregate_compiler_stats(); - ASSERT(stats != NULL); - stats->EnableBenchmark(); - Timer timer(true, "Compile all of dart2js benchmark"); - timer.Start(); -#if !defined(PRODUCT) - // Constant in product mode. - const bool old_flag = FLAG_background_compilation; - FLAG_background_compilation = false; -#endif - Dart_Handle result = Dart_CompileAll(); -#if !defined(PRODUCT) - FLAG_background_compilation = old_flag; -#endif - EXPECT_VALID(result); - timer.Stop(); - int64_t elapsed_time = timer.TotalElapsedTime(); - benchmark->set_score(elapsed_time); - free(dart_root); - free(script); -} - -#endif // !PRODUCT - // This file is created by the target //runtime/bin:gen_kernel_bytecode_dill // which is depended on by run_vm_tests. static char* ComputeGenKernelKernelPath(const char* arg) { diff --git a/runtime/vm/clustered_snapshot.cc b/runtime/vm/clustered_snapshot.cc index 4f6b132e271..ec6de0600e8 100644 --- a/runtime/vm/clustered_snapshot.cc +++ b/runtime/vm/clustered_snapshot.cc @@ -1150,160 +1150,6 @@ class FieldDeserializationCluster : public DeserializationCluster { } }; -#if !defined(DART_PRECOMPILED_RUNTIME) -class LiteralTokenSerializationCluster : public SerializationCluster { - public: - LiteralTokenSerializationCluster() : SerializationCluster("LiteralToken") {} - virtual ~LiteralTokenSerializationCluster() {} - - void Trace(Serializer* s, RawObject* object) { - RawLiteralToken* token = LiteralToken::RawCast(object); - objects_.Add(token); - - RawObject** from = token->from(); - RawObject** to = token->to(); - for (RawObject** p = from; p <= to; p++) { - s->Push(*p); - } - } - - void WriteAlloc(Serializer* s) { - s->WriteCid(kLiteralTokenCid); - intptr_t count = objects_.length(); - s->WriteUnsigned(count); - for (intptr_t i = 0; i < count; i++) { - RawLiteralToken* token = objects_[i]; - s->AssignRef(token); - } - } - - void WriteFill(Serializer* s) { - intptr_t count = objects_.length(); - for (intptr_t i = 0; i < count; i++) { - RawLiteralToken* token = objects_[i]; - RawObject** from = token->from(); - RawObject** to = token->to(); - for (RawObject** p = from; p <= to; p++) { - s->WriteRef(*p); - } - s->Write(token->ptr()->kind_); - } - } - - private: - GrowableArray objects_; -}; -#endif // !DART_PRECOMPILED_RUNTIME - -class LiteralTokenDeserializationCluster : public DeserializationCluster { - public: - LiteralTokenDeserializationCluster() {} - virtual ~LiteralTokenDeserializationCluster() {} - - void ReadAlloc(Deserializer* d) { - start_index_ = d->next_index(); - PageSpace* old_space = d->heap()->old_space(); - intptr_t count = d->ReadUnsigned(); - for (intptr_t i = 0; i < count; i++) { - d->AssignRef( - AllocateUninitialized(old_space, LiteralToken::InstanceSize())); - } - stop_index_ = d->next_index(); - } - - void ReadFill(Deserializer* d) { - bool is_vm_object = d->isolate() == Dart::vm_isolate(); - - for (intptr_t id = start_index_; id < stop_index_; id++) { - RawLiteralToken* token = reinterpret_cast(d->Ref(id)); - Deserializer::InitializeHeader( - token, kLiteralTokenCid, LiteralToken::InstanceSize(), is_vm_object); - RawObject** from = token->from(); - RawObject** to = token->to(); - for (RawObject** p = from; p <= to; p++) { - *p = d->ReadRef(); - } - token->ptr()->kind_ = static_cast(d->Read()); - } - } -}; - -#if !defined(DART_PRECOMPILED_RUNTIME) -class TokenStreamSerializationCluster : public SerializationCluster { - public: - TokenStreamSerializationCluster() : SerializationCluster("TokenStream") {} - virtual ~TokenStreamSerializationCluster() {} - - void Trace(Serializer* s, RawObject* object) { - RawTokenStream* stream = TokenStream::RawCast(object); - objects_.Add(stream); - - RawObject** from = stream->from(); - RawObject** to = stream->to(); - for (RawObject** p = from; p <= to; p++) { - s->Push(*p); - } - } - - void WriteAlloc(Serializer* s) { - s->WriteCid(kTokenStreamCid); - intptr_t count = objects_.length(); - s->WriteUnsigned(count); - for (intptr_t i = 0; i < count; i++) { - RawTokenStream* stream = objects_[i]; - s->AssignRef(stream); - } - } - - void WriteFill(Serializer* s) { - intptr_t count = objects_.length(); - for (intptr_t i = 0; i < count; i++) { - RawTokenStream* stream = objects_[i]; - RawObject** from = stream->from(); - RawObject** to = stream->to(); - for (RawObject** p = from; p <= to; p++) { - s->WriteRef(*p); - } - } - } - - private: - GrowableArray objects_; -}; -#endif // !DART_PRECOMPILED_RUNTIME - -class TokenStreamDeserializationCluster : public DeserializationCluster { - public: - TokenStreamDeserializationCluster() {} - virtual ~TokenStreamDeserializationCluster() {} - - void ReadAlloc(Deserializer* d) { - start_index_ = d->next_index(); - PageSpace* old_space = d->heap()->old_space(); - intptr_t count = d->ReadUnsigned(); - for (intptr_t i = 0; i < count; i++) { - d->AssignRef( - AllocateUninitialized(old_space, TokenStream::InstanceSize())); - } - stop_index_ = d->next_index(); - } - - void ReadFill(Deserializer* d) { - bool is_vm_object = d->isolate() == Dart::vm_isolate(); - - for (intptr_t id = start_index_; id < stop_index_; id++) { - RawTokenStream* stream = reinterpret_cast(d->Ref(id)); - Deserializer::InitializeHeader(stream, kTokenStreamCid, - TokenStream::InstanceSize(), is_vm_object); - RawObject** from = stream->from(); - RawObject** to = stream->to(); - for (RawObject** p = from; p <= to; p++) { - *p = d->ReadRef(); - } - } - } -}; - #if !defined(DART_PRECOMPILED_RUNTIME) class ScriptSerializationCluster : public SerializationCluster { public: @@ -4722,10 +4568,6 @@ SerializationCluster* Serializer::NewClusterForClass(intptr_t cid) { return new (Z) RedirectionDataSerializationCluster(); case kFieldCid: return new (Z) FieldSerializationCluster(); - case kLiteralTokenCid: - return new (Z) LiteralTokenSerializationCluster(); - case kTokenStreamCid: - return new (Z) TokenStreamSerializationCluster(); case kScriptCid: return new (Z) ScriptSerializationCluster(); case kLibraryCid: @@ -5247,10 +5089,6 @@ DeserializationCluster* Deserializer::ReadCluster() { return new (Z) RedirectionDataDeserializationCluster(); case kFieldCid: return new (Z) FieldDeserializationCluster(); - case kLiteralTokenCid: - return new (Z) LiteralTokenDeserializationCluster(); - case kTokenStreamCid: - return new (Z) TokenStreamDeserializationCluster(); case kScriptCid: return new (Z) ScriptDeserializationCluster(); case kLibraryCid: @@ -5678,8 +5516,6 @@ class SeedVMIsolateVisitor : public ClassVisitor, public FunctionVisitor { AddSeed(kernel_program_info_.metadata_payloads()); AddSeed(kernel_program_info_.metadata_mappings()); AddSeed(kernel_program_info_.constants()); - } else { - AddSeed(script_.tokens()); } } diff --git a/runtime/vm/compiler/aot/precompiler.cc b/runtime/vm/compiler/aot/precompiler.cc index ccc63a633b8..6655422f240 100644 --- a/runtime/vm/compiler/aot/precompiler.cc +++ b/runtime/vm/compiler/aot/precompiler.cc @@ -1643,7 +1643,6 @@ void Precompiler::DropScriptData() { Library& lib = Library::Handle(Z); Array& scripts = Array::Handle(Z); Script& script = Script::Handle(Z); - const TokenStream& null_tokens = TokenStream::Handle(Z); for (intptr_t i = 0; i < libraries_.Length(); i++) { lib ^= libraries_.At(i); scripts = lib.LoadedScripts(); @@ -1651,7 +1650,6 @@ void Precompiler::DropScriptData() { script ^= scripts.At(j); script.set_compile_time_constants(Array::null_array()); script.set_source(String::null_string()); - script.set_tokens(null_tokens); } } } @@ -2227,13 +2225,10 @@ void PrecompileParsedFunctionHelper::FinalizeCompilation( const Function& function = parsed_function()->function(); Zone* const zone = thread()->zone(); - CSTAT_TIMER_SCOPE(thread(), codefinalizer_timer); // CreateDeoptInfo uses the object pool and needs to be done before // FinalizeCode. const Array& deopt_info_array = Array::Handle(zone, graph_compiler->CreateDeoptInfo(assembler)); - INC_STAT(thread(), total_code_size, - deopt_info_array.Length() * sizeof(uword)); // Allocates instruction object. Since this occurs only at safepoint, // there can be no concurrent access to the instruction page. const Code& code = Code::Handle(Code::FinalizeCode( @@ -2284,7 +2279,6 @@ bool PrecompileParsedFunctionHelper::Compile(CompilationPipeline* pipeline) { #ifndef PRODUCT TimelineStream* compiler_timeline = Timeline::GetCompilerStream(); #endif // !PRODUCT - CSTAT_TIMER_SCOPE(thread(), codegen_timer); HANDLESCOPE(thread()); // We may reattempt compilation if the function needs to be assembled using @@ -2307,10 +2301,7 @@ bool PrecompileParsedFunctionHelper::Compile(CompilationPipeline* pipeline) { CompilerState compiler_state(thread()); - // TimerScope needs an isolate to be properly terminated in case of a - // LongJump. { - CSTAT_TIMER_SCOPE(thread(), graphbuilder_timer); ic_data_array = new (zone) ZoneGrowableArray(); #ifndef PRODUCT TimelineDurationScope tds(thread(), compiler_timeline, @@ -2343,7 +2334,6 @@ bool PrecompileParsedFunctionHelper::Compile(CompilationPipeline* pipeline) { TimelineDurationScope tds(thread(), compiler_timeline, "OptimizationPasses"); #endif // !PRODUCT - CSTAT_TIMER_SCOPE(thread(), graphoptimizer_timer); pass_state.inline_id_to_function.Add(&function); // We do not add the token position now because we don't know the @@ -2381,7 +2371,6 @@ bool PrecompileParsedFunctionHelper::Compile(CompilationPipeline* pipeline) { pass_state.inline_id_to_token_pos, pass_state.caller_inline_id, ic_data_array, function_stats); { - CSTAT_TIMER_SCOPE(thread(), graphcompiler_timer); #ifndef PRODUCT TimelineDurationScope tds(thread(), compiler_timeline, "CompileGraph"); #endif // !PRODUCT @@ -2471,17 +2460,9 @@ static RawError* PrecompileFunctionHelper(Precompiler* precompiler, function.ToFullyQualifiedCString(), function.token_pos().Pos(), (function.end_token_pos().Pos() - function.token_pos().Pos())); } - INC_STAT(thread, num_functions_compiled, 1); - if (optimized) { - INC_STAT(thread, num_functions_optimized, 1); - } { HANDLESCOPE(thread); - const int64_t num_tokens_before = STAT_VALUE(thread, num_tokens_consumed); pipeline->ParseFunction(parsed_function); - const int64_t num_tokens_after = STAT_VALUE(thread, num_tokens_consumed); - INC_STAT(thread, num_func_tokens_compiled, - num_tokens_after - num_tokens_before); } PrecompileParsedFunctionHelper helper(precompiler, parsed_function, diff --git a/runtime/vm/compiler/backend/flow_graph_compiler.cc b/runtime/vm/compiler/backend/flow_graph_compiler.cc index e2c415dd06e..02e0af81a90 100644 --- a/runtime/vm/compiler/backend/flow_graph_compiler.cc +++ b/runtime/vm/compiler/backend/flow_graph_compiler.cc @@ -975,12 +975,6 @@ void FlowGraphCompiler::FinalizeExceptionHandlers(const Code& code) { const ExceptionHandlers& handlers = ExceptionHandlers::Handle( exception_handlers_list_->FinalizeExceptionHandlers(code.PayloadStart())); code.set_exception_handlers(handlers); - if (FLAG_compiler_stats) { - Thread* thread = Thread::Current(); - INC_STAT(thread, total_code_size, - ExceptionHandlers::InstanceSize(handlers.num_entries())); - INC_STAT(thread, total_code_size, handlers.num_entries() * sizeof(uword)); - } } void FlowGraphCompiler::FinalizePcDescriptors(const Code& code) { @@ -1096,20 +1090,15 @@ void FlowGraphCompiler::FinalizeStaticCallTargetsTable(const Code& code) { } } code.set_static_calls_target_table(targets); - INC_STAT(Thread::Current(), total_code_size, - targets.Length() * sizeof(uword)); } void FlowGraphCompiler::FinalizeCodeSourceMap(const Code& code) { const Array& inlined_id_array = Array::Handle(zone(), code_source_map_builder_->InliningIdToFunction()); - INC_STAT(Thread::Current(), total_code_size, - inlined_id_array.Length() * sizeof(uword)); code.set_inlined_id_to_function(inlined_id_array); const CodeSourceMap& map = CodeSourceMap::Handle(code_source_map_builder_->Finalize()); - INC_STAT(Thread::Current(), total_code_size, map.Length() * sizeof(uint8_t)); code.set_code_source_map(map); #if defined(DEBUG) diff --git a/runtime/vm/compiler/backend/inliner.cc b/runtime/vm/compiler/backend/inliner.cc index 804441e3285..8e2f0dde72d 100644 --- a/runtime/vm/compiler/backend/inliner.cc +++ b/runtime/vm/compiler/backend/inliner.cc @@ -23,7 +23,6 @@ #include "vm/longjump.h" #include "vm/object.h" #include "vm/object_store.h" -#include "vm/timer.h" namespace dart { @@ -94,7 +93,6 @@ DEFINE_FLAG(bool, false, "Enable inlining annotations"); -DECLARE_FLAG(bool, compiler_stats); DECLARE_FLAG(int, max_deoptimization_counter_threshold); DECLARE_FLAG(bool, print_flow_graph); DECLARE_FLAG(bool, print_flow_graph_optimized); @@ -560,7 +558,6 @@ static void ReplaceParameterStubs(Zone* zone, FlowGraph* caller_graph, InlinedCallData* call_data, const TargetInfo* target_info) { - CSTAT_TIMER_SCOPE(Thread::Current(), graphinliner_subst_timer); const bool is_polymorphic = call_data->call->IsPolymorphicInstanceCall(); ASSERT(is_polymorphic == (target_info != NULL)); FlowGraph* callee_graph = call_data->callee_graph; @@ -944,7 +941,6 @@ class CallSiteInliner : public ValueObject { bool in_cache; ParsedFunction* parsed_function; { - CSTAT_TIMER_SCOPE(thread(), graphinliner_parse_timer); parsed_function = GetParsedFunction(function, &in_cache); if (!function.CanBeInlined()) { // As a side effect of parsing the function, it may be marked @@ -977,7 +973,6 @@ class CallSiteInliner : public ValueObject { caller_graph_->max_block_id() + 1, entry_kind == Code::EntryKind::kUnchecked); { - CSTAT_TIMER_SCOPE(thread(), graphinliner_build_timer); callee_graph = builder.BuildGraph(); CalleeGraphValidator::Validate(callee_graph); @@ -1061,7 +1056,6 @@ class CallSiteInliner : public ValueObject { block_scheduler.AssignEdgeWeights(); { - CSTAT_TIMER_SCOPE(thread(), graphinliner_ssa_timer); // Compute SSA on the callee graph, catching bailouts. callee_graph->ComputeSSA(caller_graph_->max_virtual_register_number(), param_stubs); @@ -1077,7 +1071,6 @@ class CallSiteInliner : public ValueObject { } { - CSTAT_TIMER_SCOPE(thread(), graphinliner_opt_timer); // TODO(fschneider): Improve suppression of speculative inlining. // Deopt-ids overlap between caller and callee. if (FLAG_precompiled_mode) { @@ -1313,7 +1306,6 @@ class CallSiteInliner : public ValueObject { } void InlineCall(InlinedCallData* call_data) { - CSTAT_TIMER_SCOPE(Thread::Current(), graphinliner_subst_timer); FlowGraph* callee_graph = call_data->callee_graph; TargetEntryInstr* callee_entry = callee_graph->graph_entry()->normal_entry(); diff --git a/runtime/vm/compiler/compiler_pass.cc b/runtime/vm/compiler/compiler_pass.cc index 8f311c6be74..590cafb7b44 100644 --- a/runtime/vm/compiler/compiler_pass.cc +++ b/runtime/vm/compiler/compiler_pass.cc @@ -276,7 +276,6 @@ void CompilerPass::RunPipeline(PipelineMode mode, } COMPILER_PASS(ComputeSSA, { - CSTAT_TIMER_SCOPE(state->thread, ssa_timer); // Transform to SSA (virtual register 0 and no inlining arguments). flow_graph->ComputeSSA(0, NULL); }); @@ -289,7 +288,6 @@ COMPILER_PASS(SetOuterInliningId, { FlowGraphInliner::SetInliningId(flow_graph, 0); }); COMPILER_PASS(Inlining, { - CSTAT_TIMER_SCOPE(state->thread, graphinliner_timer); FlowGraphInliner inliner( flow_graph, &state->inline_id_to_function, &state->inline_id_to_token_pos, &state->caller_inline_id, state->speculative_policy, state->precompiler); diff --git a/runtime/vm/compiler/frontend/constant_evaluator.cc b/runtime/vm/compiler/frontend/constant_evaluator.cc index 4daeb020934..db1a8015d57 100644 --- a/runtime/vm/compiler/frontend/constant_evaluator.cc +++ b/runtime/vm/compiler/frontend/constant_evaluator.cc @@ -1007,9 +1007,6 @@ bool ConstantEvaluator::GetCachedConstant(intptr_t kernel_offset, // is running, and thus change the value of 'compile_time_constants'; // do not assert that 'compile_time_constants' has not changed. constants.Release(); - if (FLAG_compiler_stats && is_present) { - ++H.thread()->compiler_stats()->num_const_cache_hits; - } return is_present; } diff --git a/runtime/vm/compiler/jit/compiler.cc b/runtime/vm/compiler/jit/compiler.cc index 3b5aad9195a..b8ce36d572e 100644 --- a/runtime/vm/compiler/jit/compiler.cc +++ b/runtime/vm/compiler/jit/compiler.cc @@ -533,13 +533,10 @@ RawCode* CompileParsedFunctionHelper::FinalizeCompilation( const Function& function = parsed_function()->function(); Zone* const zone = thread()->zone(); - CSTAT_TIMER_SCOPE(thread(), codefinalizer_timer); // CreateDeoptInfo uses the object pool and needs to be done before // FinalizeCode. const Array& deopt_info_array = Array::Handle(zone, graph_compiler->CreateDeoptInfo(assembler)); - INC_STAT(thread(), total_code_size, - deopt_info_array.Length() * sizeof(uword)); // Allocates instruction object. Since this occurs only at safepoint, // there can be no concurrent access to the instruction page. Code& code = Code::Handle(Code::FinalizeCode( @@ -711,7 +708,6 @@ RawCode* CompileParsedFunctionHelper::Compile(CompilationPipeline* pipeline) { Zone* const zone = thread()->zone(); NOT_IN_PRODUCT(TimelineStream* compiler_timeline = Timeline::GetCompilerStream()); - CSTAT_TIMER_SCOPE(thread(), codegen_timer); HANDLESCOPE(thread()); // We may reattempt compilation if the function needs to be assembled using @@ -737,11 +733,7 @@ RawCode* CompileParsedFunctionHelper::Compile(CompilationPipeline* pipeline) { CompilerState compiler_state(thread()); - // TimerScope needs an isolate to be properly terminated in case of a - // LongJump. { - CSTAT_TIMER_SCOPE(thread(), graphbuilder_timer); - if (optimized()) { // In background compilation the deoptimization counter may have // already reached the limit. @@ -808,7 +800,6 @@ RawCode* CompileParsedFunctionHelper::Compile(CompilationPipeline* pipeline) { if (optimized()) { NOT_IN_PRODUCT(TimelineDurationScope tds(thread(), compiler_timeline, "OptimizationPasses")); - CSTAT_TIMER_SCOPE(thread(), graphoptimizer_timer); pass_state.inline_id_to_function.Add(&function); // We do not add the token position now because we don't know the @@ -835,7 +826,6 @@ RawCode* CompileParsedFunctionHelper::Compile(CompilationPipeline* pipeline) { pass_state.inline_id_to_token_pos, pass_state.caller_inline_id, ic_data_array); { - CSTAT_TIMER_SCOPE(thread(), graphcompiler_timer); NOT_IN_PRODUCT(TimelineDurationScope tds(thread(), compiler_timeline, "CompileGraph")); graph_compiler.CompileGraph(); @@ -932,20 +922,12 @@ static RawObject* CompileFunctionHelper(CompilationPipeline* pipeline, function.ToFullyQualifiedCString(), function.token_pos().ToCString(), token_size); } - INC_STAT(thread, num_functions_compiled, 1); - if (optimized) { - INC_STAT(thread, num_functions_optimized, 1); - } // Makes sure no classes are loaded during parsing in background. const intptr_t loading_invalidation_gen_at_start = isolate->loading_invalidation_gen(); { HANDLESCOPE(thread); - const int64_t num_tokens_before = STAT_VALUE(thread, num_tokens_consumed); pipeline->ParseFunction(parsed_function); - const int64_t num_tokens_after = STAT_VALUE(thread, num_tokens_consumed); - INC_STAT(thread, num_func_tokens_compiled, - num_tokens_after - num_tokens_before); } CompileParsedFunctionHelper helper(parsed_function, optimized, osr_id); @@ -1709,14 +1691,8 @@ void BackgroundCompiler::Run() { } while (running_ && !function.IsNull() && !isolate_->IsTopLevelParsing()) { // Check that we have aggregated and cleared the stats. - ASSERT(thread->compiler_stats()->IsCleared()); Compiler::CompileOptimizedFunction(thread, function, Compiler::kNoOSRDeoptId); -#ifndef PRODUCT - Isolate* isolate = thread->isolate(); - isolate->aggregate_compiler_stats()->Add(*thread->compiler_stats()); - thread->compiler_stats()->Clear(); -#endif // PRODUCT QueueElement* qelem = NULL; { diff --git a/runtime/vm/compiler_stats.cc b/runtime/vm/compiler_stats.cc deleted file mode 100644 index 3baca4ad69e..00000000000 --- a/runtime/vm/compiler_stats.cc +++ /dev/null @@ -1,308 +0,0 @@ -// Copyright (c) 2011, 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. - -#include "vm/compiler_stats.h" - -#include "vm/flags.h" -#include "vm/log.h" -#include "vm/object_graph.h" -#include "vm/object_store.h" -#include "vm/timer.h" - -namespace dart { - -DEFINE_FLAG(bool, compiler_stats, false, "Compiler stat counters."); -DEFINE_FLAG(bool, - compiler_benchmark, - false, - "Compiler stat counters for benchmark."); - -class TokenStreamVisitor : public ObjectVisitor { - public: - explicit TokenStreamVisitor(CompilerStats* compiler_stats) - : obj_(Object::Handle()), stats_(compiler_stats) {} - - void VisitObject(RawObject* raw_obj) { - if (raw_obj->IsPseudoObject()) { - return; // Cannot be wrapped in handles. - } - obj_ = raw_obj; - if (obj_.GetClassId() == TokenStream::kClassId) { - TokenStream::Iterator tkit( - Thread::Current()->zone(), TokenStream::Cast(obj_), - TokenPosition::kMinSource, TokenStream::Iterator::kNoNewlines); - Token::Kind kind = tkit.CurrentTokenKind(); - while (kind != Token::kEOS) { - ++stats_->num_tokens_total; - tkit.Advance(); - kind = tkit.CurrentTokenKind(); - } - } - } - - private: - Object& obj_; - CompilerStats* stats_; -}; - -CompilerStats::CompilerStats(Isolate* isolate) - : isolate_(isolate), -#define INITIALIZE_TIMER(timer_name, description) timer_name(true, description), - STAT_TIMERS(INITIALIZE_TIMER) -#undef INITIALIZE_TIMER - -#define INITIALIZE_COUNTERS(counter_name) counter_name(0), - STAT_COUNTERS(INITIALIZE_COUNTERS) -#undef INITIALIZE_COUNTERS - text(NULL), - use_benchmark_output(false) { -} - -#ifndef PRODUCT - -// Used to aggregate stats. Must be atomic. -void CompilerStats::Add(const CompilerStats& other) { -#define ADD_TOTAL(timer_name, literal) timer_name.AddTotal(other.timer_name); - - STAT_TIMERS(ADD_TOTAL) -#undef ADD_TOTAL - -#define ADD_COUNTER(counter_name) \ - AtomicOperations::IncrementInt64By(&counter_name, other.counter_name); - - STAT_COUNTERS(ADD_COUNTER) -#undef ADD_COUNTER -} - -void CompilerStats::Clear() { -#define CLEAR_TIMER(timer_name, literal) timer_name.Reset(); - - STAT_TIMERS(CLEAR_TIMER) -#undef CLEAR_TIMER - -#define CLEAR_COUNTER(counter_name) counter_name = 0; - - STAT_COUNTERS(CLEAR_COUNTER) -#undef CLEAR_COUNTER -} - -bool CompilerStats::IsCleared() const { -#define CHECK_TIMERS(timer_name, literal) \ - if (!timer_name.IsReset()) return false; - - STAT_TIMERS(CHECK_TIMERS) -#undef CHECK_TIMERS - -#define CHECK_COUNTERS(counter_name) \ - if (counter_name != 0) return false; - - STAT_COUNTERS(CHECK_COUNTERS) -#undef CHECK_COUNTERS - return true; -} - -// This function is used as a callback in the log object to which the -// compiler stats are printed. It will be called only once, to print -// the accumulated text when all of the compiler stats values are -// added to the log. -static void PrintToStats(const char* format, ...) PRINTF_ATTRIBUTE(1, 2); -static void PrintToStats(const char* format, ...) { - Thread* thread = Thread::Current(); - Isolate* isolate = thread->isolate(); - CompilerStats* stats = isolate->aggregate_compiler_stats(); - Zone* zone = thread->zone(); - ASSERT(stats != NULL); - va_list args; - va_start(args, format); - stats->text = zone->VPrint(format, args); - va_end(args); -} - -void CompilerStats::Update() { - // Traverse the heap and compute number of tokens in all - // TokenStream objects. - num_tokens_total = 0; - - { - HeapIterationScope iteration(Thread::Current()); - TokenStreamVisitor visitor(this); - iteration.IterateObjects(&visitor); - iteration.IterateVMIsolateObjects(&visitor); - } -} - -void CompilerStats::EnableBenchmark() { - FLAG_compiler_stats = true; - use_benchmark_output = true; -} - -// Generate output for Golem benchmark harness. If the output format -// changes, the parsing function in Golem must be updated. -char* CompilerStats::BenchmarkOutput() { - Update(); - Log log(PrintToStats); - LogBlock lb(Thread::Current(), &log); - log.Print("==== Compiler Stats for isolate (%" Pd64 ") '%s' ====\n", - static_cast(isolate_->main_port()), isolate_->name()); - - log.Print("NumberOfTokens: %" Pd64 "\n", num_tokens_total); - log.Print("NumClassesParsed: %" Pd64 "\n", num_classes_parsed); - log.Print("NumFunctionsCompiled: %" Pd64 "\n", num_functions_compiled); - log.Print("NumFunctionsOptimized: %" Pd64 "\n", num_functions_optimized); - log.Print("NumFunctionsParsed: %" Pd64 "\n", num_functions_parsed); - - // Scanner stats. - int64_t scan_usecs = scanner_timer.TotalElapsedTime(); - int64_t scan_speed = - scan_usecs > 0 ? 1000 * num_tokens_scanned / scan_usecs : 0; - log.Print("NumTokensScanned: %" Pd64 " tokens\n", num_tokens_scanned); - log.Print("ScannerTime: %" Pd64 " ms\n", scan_usecs / 1000); - log.Print("ScannerSpeed: %" Pd64 " tokens/ms\n", scan_speed); - - // Parser stats. - int64_t parse_usecs = parser_timer.TotalElapsedTime(); - int64_t parse_speed = - parse_usecs > 0 ? 1000 * num_tokens_consumed / parse_usecs : 0; - log.Print("NumTokensParsed: %" Pd64 " tokens\n", num_tokens_consumed); - log.Print("ParserTime: %" Pd64 " ms\n", parse_usecs / 1000); - log.Print("ParserSpeed: %" Pd64 " tokens/ms\n", parse_speed); - - // Compiler stats. - int64_t codegen_usecs = codegen_timer.TotalElapsedTime(); - int64_t compile_usecs = scan_usecs + parse_usecs + codegen_usecs; - int64_t compile_speed = - compile_usecs > 0 ? (1000 * num_func_tokens_compiled / compile_usecs) : 0; - log.Print("NumTokensCompiled: %" Pd64 " tokens\n", num_func_tokens_compiled); - log.Print("CompilerTime: %" Pd64 " ms\n", compile_usecs / 1000); - - log.Print("CompilerSpeed: %" Pd64 " tokens/ms\n", compile_speed); - log.Print("CodeSize: %" Pd64 " KB\n", total_code_size / 1024); - int64_t code_density = - total_instr_size > 0 - ? (num_func_tokens_compiled * 1024) / total_instr_size - : 0; - - log.Print("CodeDensity: %" Pd64 " tokens/KB\n", code_density); - log.Print("InstrSize: %" Pd64 " KB\n", total_instr_size / 1024); - log.Flush(); - char* benchmark_text = text; - text = NULL; - return benchmark_text; -} - -char* CompilerStats::PrintToZone() { - if (!FLAG_compiler_stats) { - return NULL; - } else if (use_benchmark_output) { - return BenchmarkOutput(); - } - - Update(); - - Log log(PrintToStats); - LogBlock lb(Thread::Current(), &log); - - log.Print("==== Compiler Stats for isolate (%" Pd64 ") '%s' ====\n", - static_cast(isolate_->main_port()), isolate_->name()); - log.Print("Number of tokens: %" Pd64 "\n", num_tokens_total); - log.Print("Source length: %" Pd64 " characters\n", src_length); - log.Print("Number of source tokens: %" Pd64 "\n", num_tokens_scanned); - - int64_t num_local_functions = - GrowableObjectArray::Handle(isolate_->object_store()->closure_functions()) - .Length(); - - log.Print("==== Parser stats:\n"); - log.Print("Total tokens consumed: %" Pd64 "\n", num_tokens_consumed); - log.Print("Classes parsed: %" Pd64 "\n", num_classes_parsed); - log.Print(" Tokens consumed: %" Pd64 "\n", num_class_tokens); - log.Print("Functions parsed: %" Pd64 "\n", num_functions_parsed); - log.Print(" Tokens consumed: %" Pd64 "\n", num_func_tokens_compiled); - log.Print("Impl getter funcs: %" Pd64 "\n", num_implicit_final_getters); - log.Print("Impl method extractors: %" Pd64 "\n", num_method_extractors); - log.Print("Local functions: %" Pd64 "\n", num_local_functions); - log.Print("Consts cached: %" Pd64 "\n", num_cached_consts); - log.Print("Consts cache hits: %" Pd64 "\n", num_const_cache_hits); - log.Print("Consts calcuated: %" Pd64 "\n", num_execute_const); - - int64_t scan_usecs = scanner_timer.TotalElapsedTime(); - log.Print("Scanner time: %" Pd64 " ms\n", scan_usecs / 1000); - int64_t scan_speed = - scan_usecs > 0 ? 1000 * num_tokens_consumed / scan_usecs : 0; - log.Print("Scanner speed: %" Pd64 " tokens/ms\n", scan_speed); - int64_t parse_usecs = parser_timer.TotalElapsedTime(); - int64_t parse_speed = - parse_usecs > 0 ? 1000 * num_tokens_consumed / parse_usecs : 0; - log.Print("Parser time: %" Pd64 " ms\n", parse_usecs / 1000); - log.Print("Parser speed: %" Pd64 " tokens/ms\n", parse_speed); - - int64_t codegen_usecs = codegen_timer.TotalElapsedTime(); - - log.Print("==== Backend stats:\n"); - log.Print("Code gen. time: %" Pd64 " ms\n", codegen_usecs / 1000); - int64_t graphbuilder_usecs = graphbuilder_timer.TotalElapsedTime(); - log.Print(" Graph builder: %" Pd64 " ms\n", - graphbuilder_usecs / 1000); - int64_t ssa_usecs = ssa_timer.TotalElapsedTime(); - log.Print(" Graph SSA: %" Pd64 " ms\n", ssa_usecs / 1000); - - int64_t graphinliner_usecs = graphinliner_timer.TotalElapsedTime(); - log.Print(" Graph inliner: %" Pd64 " ms\n", - graphinliner_usecs / 1000); - int64_t graphinliner_parse_usecs = - graphinliner_parse_timer.TotalElapsedTime(); - log.Print(" Parsing: %" Pd64 " ms\n", - graphinliner_parse_usecs / 1000); - int64_t graphinliner_build_usecs = - graphinliner_build_timer.TotalElapsedTime(); - log.Print(" Building: %" Pd64 " ms\n", - graphinliner_build_usecs / 1000); - int64_t graphinliner_ssa_usecs = graphinliner_ssa_timer.TotalElapsedTime(); - log.Print(" SSA: %" Pd64 " ms\n", - graphinliner_ssa_usecs / 1000); - int64_t graphinliner_opt_usecs = graphinliner_opt_timer.TotalElapsedTime(); - log.Print(" Optimization: %" Pd64 " ms\n", - graphinliner_opt_usecs / 1000); - int64_t graphinliner_subst_usecs = - graphinliner_subst_timer.TotalElapsedTime(); - log.Print(" Substitution: %" Pd64 " ms\n", - graphinliner_subst_usecs / 1000); - int64_t graphoptimizer_usecs = graphoptimizer_timer.TotalElapsedTime(); - log.Print(" Graph optimizer: %" Pd64 " ms\n", - (graphoptimizer_usecs - graphinliner_usecs) / 1000); - int64_t graphcompiler_usecs = graphcompiler_timer.TotalElapsedTime(); - log.Print(" Graph compiler: %" Pd64 " ms\n", - graphcompiler_usecs / 1000); - int64_t codefinalizer_usecs = codefinalizer_timer.TotalElapsedTime(); - log.Print(" Code finalizer: %" Pd64 " ms\n", - codefinalizer_usecs / 1000); - - log.Print("==== Compiled code stats:\n"); - int64_t compile_usecs = scan_usecs + parse_usecs + codegen_usecs; - int64_t compile_speed = - compile_usecs > 0 ? (1000 * num_func_tokens_compiled / compile_usecs) : 0; - log.Print("Functions parsed: %" Pd64 "\n", num_functions_parsed); - log.Print("Functions compiled: %" Pd64 "\n", num_functions_compiled); - log.Print(" optimized: %" Pd64 "\n", num_functions_optimized); - log.Print("Compiler time: %" Pd64 " ms\n", compile_usecs / 1000); - log.Print("Tokens compiled: %" Pd64 "\n", num_func_tokens_compiled); - log.Print("Compilation speed: %" Pd64 " tokens/ms\n", compile_speed); - int64_t code_density = - total_instr_size > 0 - ? (num_func_tokens_compiled * 1024) / total_instr_size - : 0; - log.Print("Code density: %" Pd64 " tokens per KB\n", code_density); - log.Print("Code size: %" Pd64 " KB\n", total_code_size / 1024); - log.Print(" Instr size: %" Pd64 " KB\n", total_instr_size / 1024); - log.Print(" Pc Desc size: %" Pd64 " KB\n", pc_desc_size / 1024); - log.Print(" VarDesc size: %" Pd64 " KB\n", vardesc_size / 1024); - log.Flush(); - char* stats_text = text; - text = NULL; - return stats_text; -} - -#endif // !PRODUCT - -} // namespace dart diff --git a/runtime/vm/compiler_stats.h b/runtime/vm/compiler_stats.h deleted file mode 100644 index 1649f3a27ca..00000000000 --- a/runtime/vm/compiler_stats.h +++ /dev/null @@ -1,142 +0,0 @@ -// Copyright (c) 2011, 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. - -#ifndef RUNTIME_VM_COMPILER_STATS_H_ -#define RUNTIME_VM_COMPILER_STATS_H_ - -#include "platform/atomic.h" -#include "vm/allocation.h" -#include "vm/flags.h" -#include "vm/isolate.h" -#include "vm/timer.h" - -namespace dart { - -DECLARE_FLAG(bool, compiler_stats); -DECLARE_FLAG(bool, compiler_benchmark); - -#define STAT_TIMERS(V) \ - V(parser_timer, "parser timer") \ - V(scanner_timer, "scanner timer") \ - V(codegen_timer, "codegen timer") \ - V(graphbuilder_timer, "flow graph builder timer") \ - V(ssa_timer, "flow graph SSA timer") \ - V(graphinliner_timer, "flow graph inliner timer") \ - V(graphinliner_parse_timer, "inliner parsing timer") \ - V(graphinliner_build_timer, "inliner building timer") \ - V(graphinliner_ssa_timer, "inliner SSA timer") \ - V(graphinliner_opt_timer, "inliner optimization timer") \ - V(graphinliner_subst_timer, "inliner substitution timer") \ - V(graphoptimizer_timer, "flow graph optimizer timer") \ - V(graphcompiler_timer, "flow graph compiler timer") \ - V(codefinalizer_timer, "code finalization timer") - -#define STAT_COUNTERS(V) \ - V(num_tokens_total) \ - V(num_tokens_scanned) \ - V(num_tokens_consumed) \ - V(num_cached_consts) \ - V(num_const_cache_hits) \ - V(num_execute_const) \ - V(num_classes_parsed) \ - V(num_class_tokens) \ - V(num_functions_parsed) \ - V(num_functions_compiled) \ - V(num_functions_optimized) \ - V(num_func_tokens_compiled) \ - V(num_implicit_final_getters) \ - V(num_method_extractors) \ - V(src_length) \ - V(total_code_size) \ - V(total_instr_size) \ - V(pc_desc_size) \ - V(vardesc_size) - -class CompilerStats { - public: - explicit CompilerStats(Isolate* isolate); - ~CompilerStats() {} - - Isolate* isolate_; - - // We could use STAT_TIMERS and STAT_COUNTERS to declare fields, but then - // we would be losing the comments. - Timer parser_timer; // Cumulative runtime of parser. - Timer scanner_timer; // Cumulative runtime of scanner. - Timer codegen_timer; // Cumulative runtime of code generator. - Timer graphbuilder_timer; // Included in codegen_timer. - Timer ssa_timer; // Included in codegen_timer. - Timer graphinliner_timer; // Included in codegen_timer. - Timer graphinliner_parse_timer; // Included in codegen_timer. - Timer graphinliner_build_timer; // Included in codegen_timer. - Timer graphinliner_ssa_timer; // Included in codegen_timer. - Timer graphinliner_opt_timer; // Included in codegen_timer. - Timer graphinliner_subst_timer; // Included in codegen_timer. - - Timer graphoptimizer_timer; // Included in codegen_timer. - Timer graphcompiler_timer; // Included in codegen_timer. - Timer codefinalizer_timer; // Included in codegen_timer. - - ALIGN8 int64_t num_tokens_total; // Isolate + VM isolate. - ALIGN8 int64_t num_tokens_scanned; - ALIGN8 int64_t num_tokens_consumed; - ALIGN8 int64_t num_cached_consts; - ALIGN8 int64_t num_const_cache_hits; - ALIGN8 int64_t num_execute_const; - - ALIGN8 int64_t num_classes_parsed; - ALIGN8 int64_t num_class_tokens; - ALIGN8 int64_t num_functions_parsed; // Num parsed functions. - ALIGN8 int64_t num_functions_compiled; // Num unoptimized compilations. - ALIGN8 int64_t num_functions_optimized; // Num optimized compilations. - ALIGN8 int64_t num_func_tokens_compiled; - ALIGN8 int64_t num_implicit_final_getters; - ALIGN8 int64_t num_method_extractors; - - ALIGN8 int64_t src_length; // Total number of characters in source. - ALIGN8 int64_t total_code_size; // Bytes allocated for code and meta info. - ALIGN8 int64_t total_instr_size; // Total size of generated code in bytes. - ALIGN8 int64_t pc_desc_size; - ALIGN8 int64_t vardesc_size; - char* text; - bool use_benchmark_output; - - void EnableBenchmark(); - char* BenchmarkOutput(); - char* PrintToZone(); - - // Used to aggregate stats. - void Add(const CompilerStats& other); - void Clear(); - - bool IsCleared() const; - - private: - // Update stats that are computed, e.g. token count. - void Update(); -}; - -// Make increment atomic in case it occurs in parallel with aggregation from -// other thread. -#define INC_STAT(thread, counter, incr) \ - if (FLAG_support_compiler_stats && FLAG_compiler_stats) { \ - AtomicOperations::IncrementInt64By(&(thread)->compiler_stats()->counter, \ - (incr)); \ - } - -#define STAT_VALUE(thread, counter) \ - ((FLAG_support_compiler_stats && FLAG_compiler_stats) \ - ? (thread)->compiler_stats()->counter \ - : 0) - -#define CSTAT_TIMER_SCOPE(thr, t) \ - TimerScope timer(FLAG_support_compiler_stats&& FLAG_compiler_stats, \ - (FLAG_support_compiler_stats && FLAG_compiler_stats) \ - ? &((thr)->compiler_stats()->t) \ - : NULL, \ - thr); - -} // namespace dart - -#endif // RUNTIME_VM_COMPILER_STATS_H_ diff --git a/runtime/vm/dart_api_impl.cc b/runtime/vm/dart_api_impl.cc index fbd78b16aad..372ee75fdf8 100644 --- a/runtime/vm/dart_api_impl.cc +++ b/runtime/vm/dart_api_impl.cc @@ -48,7 +48,6 @@ #include "vm/symbols.h" #include "vm/tags.h" #include "vm/thread_registry.h" -#include "vm/timer.h" #include "vm/unicode.h" #include "vm/uri.h" #include "vm/version.h" diff --git a/runtime/vm/debugger.cc b/runtime/vm/debugger.cc index d96ae303045..bbdd04f5a97 100644 --- a/runtime/vm/debugger.cc +++ b/runtime/vm/debugger.cc @@ -2482,21 +2482,6 @@ void Debugger::PauseException(const Instance& exc) { ClearCachedStackTraces(); } -static TokenPosition LastTokenOnLine(Zone* zone, - const TokenStream& tokens, - TokenPosition pos) { - TokenStream::Iterator iter(zone, tokens, pos, - TokenStream::Iterator::kAllTokens); - ASSERT(iter.IsValid()); - TokenPosition last_pos = pos; - while ((iter.CurrentTokenKind() != Token::kNEWLINE) && - (iter.CurrentTokenKind() != Token::kEOS)) { - last_pos = iter.CurrentPosition(); - iter.Advance(); - } - return last_pos; -} - // Returns the best fit token position for a breakpoint. // // Takes a range of tokens [requested_token_pos, last_token_pos] and @@ -2635,8 +2620,8 @@ TokenPosition Debugger::ResolveBreakpointPos(const Function& func, end_of_line_pos = begin_pos; } } else { - const TokenStream& tokens = TokenStream::Handle(zone, script.tokens()); - end_of_line_pos = LastTokenOnLine(zone, tokens, begin_pos); + UNREACHABLE(); + end_of_line_pos = TokenPosition::kNoSource; } uword lowest_pc_offset = kUwordMax; @@ -3864,13 +3849,7 @@ bool Debugger::IsAtAsyncJump(ActivationFrame* top_frame) { } return false; } - const TokenStream& tokens = TokenStream::Handle(zone, script.tokens()); - TokenStream::Iterator iter(zone, tokens, top_frame->TokenPos()); - if ((iter.CurrentTokenKind() == Token::kIDENT) && - ((iter.CurrentLiteral() == Symbols::Await().raw()) || - (iter.CurrentLiteral() == Symbols::YieldKw().raw()))) { - return true; - } + UNREACHABLE(); } return false; } diff --git a/runtime/vm/flag_list.h b/runtime/vm/flag_list.h index 35ee0792d31..e9a78235412 100644 --- a/runtime/vm/flag_list.h +++ b/runtime/vm/flag_list.h @@ -163,7 +163,6 @@ constexpr bool kDartPrecompiledRuntime = false; "Stress test async stack traces") \ P(strong, bool, true, "Enable strong mode.") \ P(sync_async, bool, true, "Start `async` functions synchronously.") \ - R(support_compiler_stats, false, bool, true, "Support compiler stats.") \ R(support_disassembler, false, bool, true, "Support the disassembler.") \ R(support_il_printer, false, bool, true, "Support the IL printer.") \ C(support_reload, false, false, bool, true, "Support isolate reload.") \ diff --git a/runtime/vm/heap/pages.cc b/runtime/vm/heap/pages.cc index ba234b68816..7c0392a1f35 100644 --- a/runtime/vm/heap/pages.cc +++ b/runtime/vm/heap/pages.cc @@ -6,7 +6,6 @@ #include "platform/address_sanitizer.h" #include "platform/assert.h" -#include "vm/compiler_stats.h" #include "vm/heap/become.h" #include "vm/heap/compactor.h" #include "vm/heap/marker.h" diff --git a/runtime/vm/isolate.cc b/runtime/vm/isolate.cc index ac487d8606d..eb61dd47f52 100644 --- a/runtime/vm/isolate.cc +++ b/runtime/vm/isolate.cc @@ -12,7 +12,6 @@ #include "vm/class_finalizer.h" #include "vm/code_observers.h" #include "vm/compiler/jit/compiler.h" -#include "vm/compiler_stats.h" #include "vm/dart_api_message.h" #include "vm/dart_api_state.h" #include "vm/dart_entry.h" @@ -49,7 +48,6 @@ #include "vm/thread_registry.h" #include "vm/timeline.h" #include "vm/timeline_analysis.h" -#include "vm/timer.h" #include "vm/visitor.h" namespace dart { @@ -1240,7 +1238,6 @@ void Isolate::DoneLoading() { lib.SetLoaded(); } } - TokenStream::CloseSharedTokenList(this); } #if !defined(PRODUCT) && !defined(DART_PRECOMPILED_RUNTIME) @@ -1871,19 +1868,6 @@ void Isolate::Shutdown() { // Don't allow anymore dart code to execution on this isolate. thread->ClearStackLimit(); - // First, perform higher-level cleanup that may need to allocate. - { - // Ensure we have a zone and handle scope so that we can call VM functions. - StackZone stack_zone(thread); - HandleScope handle_scope(thread); - - // Write compiler stats data if enabled. - if (FLAG_support_compiler_stats && FLAG_compiler_stats && - !Isolate::IsVMInternalIsolate(this)) { - OS::PrintErr("%s", aggregate_compiler_stats()->PrintToZone()); - } - } - // Remove this isolate from the list *before* we start tearing it down, to // avoid exposing it in a state of decay. RemoveIsolateFromList(this); diff --git a/runtime/vm/isolate.h b/runtime/vm/isolate.h index 3117c526c40..6b8aa8b2b17 100644 --- a/runtime/vm/isolate.h +++ b/runtime/vm/isolate.h @@ -21,7 +21,6 @@ #include "vm/random.h" #include "vm/tags.h" #include "vm/thread.h" -#include "vm/timer.h" #include "vm/token_position.h" namespace dart { @@ -31,7 +30,6 @@ class ApiState; class BackgroundCompiler; class Capability; class CodeIndexTable; -class CompilerStats; class Debugger; class DeoptContext; class ExternalTypedData; @@ -510,11 +508,6 @@ class Isolate : public BaseIsolate { void PrintJSON(JSONStream* stream, bool ref = true); #endif - // Mutator thread is used to aggregate compiler stats. - CompilerStats* aggregate_compiler_stats() { - return mutator_thread()->compiler_stats(); - } - #if !defined(PRODUCT) VMTagCounters* vm_tag_counters() { return &vm_tag_counters_; } diff --git a/runtime/vm/object.cc b/runtime/vm/object.cc index a002c652f6d..d476641a355 100644 --- a/runtime/vm/object.cc +++ b/runtime/vm/object.cc @@ -18,7 +18,6 @@ #include "vm/compiler/frontend/kernel_translation_helper.h" #include "vm/compiler/intrinsifier.h" #include "vm/compiler/jit/compiler.h" -#include "vm/compiler_stats.h" #include "vm/cpu.h" #include "vm/dart.h" #include "vm/dart_api_state.h" @@ -52,7 +51,6 @@ #include "vm/tags.h" #include "vm/thread_registry.h" #include "vm/timeline.h" -#include "vm/timer.h" #include "vm/type_table.h" #include "vm/type_testing_stubs.h" #include "vm/unicode.h" @@ -122,8 +120,6 @@ RawClass* Object::signature_data_class_ = reinterpret_cast(RAW_NULL); RawClass* Object::redirection_data_class_ = reinterpret_cast(RAW_NULL); RawClass* Object::field_class_ = reinterpret_cast(RAW_NULL); -RawClass* Object::literal_token_class_ = reinterpret_cast(RAW_NULL); -RawClass* Object::token_stream_class_ = reinterpret_cast(RAW_NULL); RawClass* Object::script_class_ = reinterpret_cast(RAW_NULL); RawClass* Object::library_class_ = reinterpret_cast(RAW_NULL); RawClass* Object::namespace_class_ = reinterpret_cast(RAW_NULL); @@ -398,10 +394,6 @@ static inline bool IsAsciiNonprintable(int32_t c) { return ((0 <= c) && (c < 32)) || (c == 127); } -static inline bool NeedsEscapeSequence(int32_t c) { - return (c == '"') || (c == '\\') || (c == '$') || IsAsciiNonprintable(c); -} - static int32_t EscapeOverhead(int32_t c) { if (IsSpecialCharacter(c)) { return 1; // 1 additional byte for the backslash. @@ -586,12 +578,6 @@ void Object::Init(Isolate* isolate) { cls = Class::New(); field_class_ = cls.raw(); - cls = Class::New(); - literal_token_class_ = cls.raw(); - - cls = Class::New(); - token_stream_class_ = cls.raw(); - cls = Class::New\n"; - const char* line1 = text; - const char* line2 = strstr(line1, "\n") + 1; - const char* line3 = strstr(line2, "\n") + 1; - const char* line4 = strstr(line3, "\n") + 1; - const char* line5 = strstr(line4, "\n") + 1; - - const int first_dart_line = 3; - EXPECT(strstr(line3, "main") != NULL); - const int last_dart_line = 5; - EXPECT(strstr(line5, "}") != NULL); - - const char* script_begin = strstr(text, "main"); - EXPECT(script_begin != NULL); - const char* script_end = strstr(text, ""); - EXPECT(script_end != NULL); - int script_length = script_end - script_begin; - EXPECT(script_length > 0); - - // The Dart script starts on line 3 instead of 1, offset is 3 - 1 = 2. - int line_offset = 2; - // Dart script starts with "main" on line 3. - intptr_t col_offset = script_begin - line3; - EXPECT(col_offset > 0); - - char* src_chars = strdup(script_begin); - src_chars[script_length] = '\0'; - - const String& url = String::Handle(String::New(url_chars)); - const String& source = String::Handle(String::New(src_chars)); - const Script& script = - Script::Handle(Script::New(url, source, RawScript::kScriptTag)); - script.SetLocationOffset(line_offset, col_offset); - - String& str = String::Handle(); - str = script.GetLine(first_dart_line); - EXPECT_STREQ("main() {", str.ToCString()); - str = script.GetLine(last_dart_line); - EXPECT_STREQ(" }", str.ToCString()); - - script.Tokenize(String::Handle(String::New("ABC"))); - // Tokens: 0: kIDENT, 1: kLPAREN, 2: kRPAREN, 3: kLBRACE, 4: kNEWLINE, - // 5: kRETURN, 6: kSTRING, 7: kSEMICOLON, 8: kNEWLINE, - // 9: kRBRACE, 10: kNEWLINE - - intptr_t line, col; - intptr_t fast_line; - script.GetTokenLocation(TokenPosition(0), &line, &col); - EXPECT_EQ(first_dart_line, line); - EXPECT_EQ(col, col_offset + 1); - - // We allow asking for only the line number, which only scans the token stream - // instead of rescanning the script. - script.GetTokenLocation(TokenPosition(0), &fast_line, NULL); - EXPECT_EQ(line, fast_line); - - script.GetTokenLocation(TokenPosition(5), &line, &col); // Token 'return' - EXPECT_EQ(4, line); // 'return' is in line 4. - EXPECT_EQ(5, col); // Four spaces before 'return'. - - // We allow asking for only the line number, which only scans the token stream - // instead of rescanning the script. - script.GetTokenLocation(TokenPosition(5), &fast_line, NULL); - EXPECT_EQ(line, fast_line); - - TokenPosition first_idx, last_idx; - script.TokenRangeAtLine(3, &first_idx, &last_idx); - EXPECT_EQ(0, first_idx.value()); // Token 'main' is first token. - EXPECT_EQ(3, last_idx.value()); // Token { is last token. - script.TokenRangeAtLine(4, &first_idx, &last_idx); - EXPECT_EQ(5, first_idx.value()); // Token 'return' is first token. - EXPECT_EQ(7, last_idx.value()); // Token ; is last token. - script.TokenRangeAtLine(5, &first_idx, &last_idx); - EXPECT_EQ(9, first_idx.value()); // Token } is first and only token. - EXPECT_EQ(9, last_idx.value()); - script.TokenRangeAtLine(1, &first_idx, &last_idx); - EXPECT_EQ(0, first_idx.value()); - EXPECT_EQ(3, last_idx.value()); - script.TokenRangeAtLine(6, &first_idx, &last_idx); - EXPECT_EQ(-1, first_idx.value()); - EXPECT_EQ(-1, last_idx.value()); - script.TokenRangeAtLine(1000, &first_idx, &last_idx); - EXPECT_EQ(-1, first_idx.value()); - EXPECT_EQ(-1, last_idx.value()); - - free(src_chars); -} - ISOLATE_UNIT_TEST_CASE(Context) { const int kNumVariables = 5; const Context& parent_context = Context::Handle(Context::New(0)); @@ -4041,7 +3885,7 @@ class ObjectAccumulator : public ObjectVisitor { } Object& handle = Object::Handle(obj); // Skip some common simple objects to run in reasonable time. - if (handle.IsString() || handle.IsArray() || handle.IsLiteralToken()) { + if (handle.IsString() || handle.IsArray()) { return; } objects_->Add(&handle); @@ -4323,18 +4167,6 @@ ISOLATE_UNIT_TEST_CASE(PrintJSONPrimitives) { "\"valueAsString\":\"\"}", js.ToCString()); } - // LiteralToken reference. This is meant to be an example of a - // "weird" type that isn't usually returned by the VM Service except - // when we are doing direct heap inspection. - { - JSONStream js; - LiteralToken& tok = LiteralToken::Handle(LiteralToken::New()); - tok.PrintJSON(&js, true); - ElideJSONSubstring("objects", js.ToCString(), buffer); - EXPECT_STREQ( - "{\"type\":\"@Object\",\"_vmType\":\"LiteralToken\",\"id\":\"\"}", - buffer); - } } #endif // !PRODUCT diff --git a/runtime/vm/parser.cc b/runtime/vm/parser.cc index c053cd16ebe..199d0188764 100644 --- a/runtime/vm/parser.cc +++ b/runtime/vm/parser.cc @@ -15,7 +15,6 @@ #include "vm/compiler/backend/il_printer.h" #include "vm/compiler/frontend/scope_builder.h" #include "vm/compiler/jit/compiler.h" -#include "vm/compiler_stats.h" #include "vm/dart_api_impl.h" #include "vm/dart_entry.h" #include "vm/growable_array.h" @@ -38,7 +37,6 @@ #include "vm/symbols.h" #include "vm/tags.h" #include "vm/timeline.h" -#include "vm/timer.h" #include "vm/zone.h" namespace dart { diff --git a/runtime/vm/parser.h b/runtime/vm/parser.h index 7e7200f4057..da1c949e736 100644 --- a/runtime/vm/parser.h +++ b/runtime/vm/parser.h @@ -13,7 +13,6 @@ #include "vm/allocation.h" #include "vm/ast.h" #include "vm/class_finalizer.h" -#include "vm/compiler_stats.h" #include "vm/hash_table.h" #include "vm/kernel.h" #include "vm/object.h" diff --git a/runtime/vm/profiler_service.cc b/runtime/vm/profiler_service.cc index 286f2dda477..856df6804eb 100644 --- a/runtime/vm/profiler_service.cc +++ b/runtime/vm/profiler_service.cc @@ -2643,14 +2643,7 @@ const char* ProfileTrieWalker::CurrentToken() { script.GetTokenLocation(token_pos, &line, &column, &token_len); str = script.GetSnippet(line, column, line, column + token_len); } else { - const TokenStream& token_stream = - TokenStream::Handle(zone, script.tokens()); - if (token_stream.IsNull()) { - // No token position. - return NULL; - } - TokenStream::Iterator iterator(zone, token_stream, token_pos); - str = iterator.CurrentLiteral(); + UNREACHABLE(); } return str.IsNull() ? NULL : str.ToCString(); } diff --git a/runtime/vm/raw_object.cc b/runtime/vm/raw_object.cc index 2dea940ef3e..76a2569bb31 100644 --- a/runtime/vm/raw_object.cc +++ b/runtime/vm/raw_object.cc @@ -381,8 +381,6 @@ REGULAR_VISITOR(ClosureData) REGULAR_VISITOR(SignatureData) REGULAR_VISITOR(RedirectionData) REGULAR_VISITOR(Field) -REGULAR_VISITOR(LiteralToken) -REGULAR_VISITOR(TokenStream) REGULAR_VISITOR(Script) REGULAR_VISITOR(Library) REGULAR_VISITOR(LibraryPrefix) diff --git a/runtime/vm/raw_object.h b/runtime/vm/raw_object.h index 2018f111020..98d2b449aad 100644 --- a/runtime/vm/raw_object.h +++ b/runtime/vm/raw_object.h @@ -29,8 +29,6 @@ typedef RawObject* RawCompressed; V(SignatureData) \ V(RedirectionData) \ V(Field) \ - V(LiteralToken) \ - V(TokenStream) \ V(Script) \ V(Library) \ V(Namespace) \ @@ -1158,30 +1156,6 @@ class RawField : public RawObject { friend class CidRewriteVisitor; }; -class RawLiteralToken : public RawObject { - RAW_HEAP_OBJECT_IMPLEMENTATION(LiteralToken); - - VISIT_FROM(RawObject*, literal_); - RawString* literal_; // Literal characters as they appear in source text. - RawObject* value_; // The actual object corresponding to the token. - VISIT_TO(RawObject*, value_); - Token::Kind kind_; // The literal kind (string, integer, double). - - friend class SnapshotReader; -}; - -class RawTokenStream : public RawObject { - RAW_HEAP_OBJECT_IMPLEMENTATION(TokenStream); - - VISIT_FROM(RawObject*, private_key_); - RawString* private_key_; // Key used for private identifiers. - RawGrowableObjectArray* token_objects_; - RawExternalTypedData* stream_; - VISIT_TO(RawObject*, stream_); - - friend class SnapshotReader; -}; - class RawScript : public RawObject { public: enum Kind { @@ -1204,7 +1178,6 @@ class RawScript : public RawObject { RawArray* debug_positions_; RawArray* yield_positions_; RawKernelProgramInfo* kernel_program_info_; - RawTokenStream* tokens_; RawString* source_; VISIT_TO(RawObject*, source_); RawObject** to_snapshot(Snapshot::Kind kind) { @@ -1213,7 +1186,7 @@ class RawScript : public RawObject { return reinterpret_cast(&ptr()->url_); case Snapshot::kFull: case Snapshot::kFullJIT: - return reinterpret_cast(&ptr()->tokens_); + return reinterpret_cast(&ptr()->kernel_program_info_); case Snapshot::kMessage: case Snapshot::kNone: case Snapshot::kInvalid: @@ -2324,9 +2297,6 @@ class RawExternalTypedData : public RawInstance { VISIT_TO(RawCompressed, length_) uint8_t* data_; - - friend class TokenStream; - friend class RawTokenStream; }; // VM implementations of the basic types in the isolate. diff --git a/runtime/vm/raw_object_snapshot.cc b/runtime/vm/raw_object_snapshot.cc index 24a6cd4a5cf..7541e5a9803 100644 --- a/runtime/vm/raw_object_snapshot.cc +++ b/runtime/vm/raw_object_snapshot.cc @@ -591,38 +591,6 @@ void RawField::WriteTo(SnapshotWriter* writer, UNREACHABLE(); } -RawLiteralToken* LiteralToken::ReadFrom(SnapshotReader* reader, - intptr_t object_id, - intptr_t tags, - Snapshot::Kind kind, - bool as_reference) { - UNREACHABLE(); - return LiteralToken::null(); -} - -void RawLiteralToken::WriteTo(SnapshotWriter* writer, - intptr_t object_id, - Snapshot::Kind kind, - bool as_reference) { - UNREACHABLE(); -} - -RawTokenStream* TokenStream::ReadFrom(SnapshotReader* reader, - intptr_t object_id, - intptr_t tags, - Snapshot::Kind kind, - bool as_reference) { - UNREACHABLE(); - return TokenStream::null(); -} - -void RawTokenStream::WriteTo(SnapshotWriter* writer, - intptr_t object_id, - Snapshot::Kind kind, - bool as_reference) { - UNREACHABLE(); -} - RawScript* Script::ReadFrom(SnapshotReader* reader, intptr_t object_id, intptr_t tags, diff --git a/runtime/vm/service_test.cc b/runtime/vm/service_test.cc index 6c2ebb2ed5b..03c96f2493b 100644 --- a/runtime/vm/service_test.cc +++ b/runtime/vm/service_test.cc @@ -341,62 +341,6 @@ ISOLATE_UNIT_TEST_CASE(Service_Code) { EXPECT_SUBSTRING("\"error\"", handler.msg()); } -ISOLATE_UNIT_TEST_CASE(Service_TokenStream) { - const char* kScript = - "var port;\n" // Set to our mock port by C++. - "\n" - "main() {\n" - "}"; - - Isolate* isolate = thread->isolate(); - isolate->set_is_runnable(true); - Dart_Handle lib; - Library& vmlib = Library::Handle(); - { - TransitionVMToNative transition(thread); - lib = TestCase::LoadTestScript(kScript, NULL); - EXPECT_VALID(lib); - vmlib ^= Api::UnwrapHandle(lib); - EXPECT(!vmlib.IsNull()); - } - - const String& script_name = String::Handle(String::New("test-lib")); - EXPECT(!script_name.IsNull()); - const Script& script = Script::Handle(vmlib.LookupScript(script_name)); - EXPECT(!script.IsNull()); - - const TokenStream& token_stream = TokenStream::Handle(script.tokens()); - EXPECT(!token_stream.IsNull()); - ObjectIdRing* ring = isolate->object_id_ring(); - intptr_t id = ring->GetIdForObject(token_stream.raw()); - - // Build a mock message handler and wrap it in a dart port. - ServiceTestMessageHandler handler; - Dart_Port port_id = PortMap::CreatePort(&handler); - Dart_Handle port = Api::NewHandle(thread, SendPort::New(port_id)); - EXPECT_VALID(port); - { - TransitionVMToNative transition(thread); - EXPECT_VALID(Dart_SetField(lib, NewString("port"), port)); - } - - Array& service_msg = Array::Handle(); - - // Fetch object. - service_msg = EvalF(lib, - "[0, port, '0', 'getObject', " - "['objectId'], ['objects/%" Pd "']]", - id); - HandleIsolateMessage(isolate, service_msg); - EXPECT_EQ(MessageHandler::kOK, handler.HandleNextMessage()); - - // Check type. - EXPECT_SUBSTRING("\"type\":\"Object\"", handler.msg()); - EXPECT_SUBSTRING("\"_vmType\":\"TokenStream\"", handler.msg()); - // Check for members array. - EXPECT_SUBSTRING("\"members\":[", handler.msg()); -} - ISOLATE_UNIT_TEST_CASE(Service_PcDescriptors) { const char* kScript = "var port;\n" // Set to our mock port by C++. diff --git a/runtime/vm/snapshot.cc b/runtime/vm/snapshot.cc index c35af9c352d..eaae077bcb2 100644 --- a/runtime/vm/snapshot.cc +++ b/runtime/vm/snapshot.cc @@ -219,7 +219,6 @@ SnapshotReader::SnapshotReader(const uint8_t* buffer, type_(AbstractType::Handle(zone_)), type_arguments_(TypeArguments::Handle(zone_)), tokens_(GrowableObjectArray::Handle(zone_)), - stream_(TokenStream::Handle(zone_)), data_(ExternalTypedData::Handle(zone_)), typed_data_(TypedData::Handle(zone_)), function_(Function::Handle(zone_)), diff --git a/runtime/vm/snapshot.h b/runtime/vm/snapshot.h index 1c949ec0304..2010460689c 100644 --- a/runtime/vm/snapshot.h +++ b/runtime/vm/snapshot.h @@ -63,7 +63,6 @@ class RawLanguageError; class RawLibrary; class RawLibraryPrefix; class RawLinkedHashMap; -class RawLiteralToken; class RawLocalVarDescriptors; class RawMegamorphicCache; class RawMint; @@ -84,7 +83,6 @@ class RawSmi; class RawStackMap; class RawStackTrace; class RawSubtypeTestCache; -class RawTokenStream; class RawTwoByteString; class RawType; class RawTypeArguments; @@ -95,7 +93,6 @@ class RawUnhandledException; class RawUnresolvedClass; class RawWeakProperty; class String; -class TokenStream; class TypeArguments; class TypedData; class UnhandledException; @@ -331,7 +328,6 @@ class SnapshotReader : public BaseReader { AbstractType* TypeHandle() { return &type_; } TypeArguments* TypeArgumentsHandle() { return &type_arguments_; } GrowableObjectArray* TokensHandle() { return &tokens_; } - TokenStream* StreamHandle() { return &stream_; } ExternalTypedData* DataHandle() { return &data_; } TypedData* TypedDataHandle() { return &typed_data_; } Function* FunctionHandle() { return &function_; } @@ -441,7 +437,6 @@ class SnapshotReader : public BaseReader { AbstractType& type_; // Temporary type handle. TypeArguments& type_arguments_; // Temporary type argument handle. GrowableObjectArray& tokens_; // Temporary tokens handle. - TokenStream& stream_; // Temporary token stream handle. ExternalTypedData& data_; // Temporary stream data handle. TypedData& typed_data_; // Temporary typed data handle. Function& function_; // Temporary function handle. @@ -470,7 +465,6 @@ class SnapshotReader : public BaseReader { friend class Library; friend class LibraryPrefix; friend class LinkedHashMap; - friend class LiteralToken; friend class MirrorReference; friend class MixinAppType; friend class Namespace; @@ -480,7 +474,6 @@ class SnapshotReader : public BaseReader { friend class Script; friend class SignatureData; friend class SubtypeTestCache; - friend class TokenStream; friend class Type; friend class TypeArguments; friend class TypeParameter; @@ -746,7 +739,6 @@ class SnapshotWriter : public BaseWriter { friend class RawInstructions; friend class RawLibrary; friend class RawLinkedHashMap; - friend class RawLiteralToken; friend class RawLocalVarDescriptors; friend class RawMirrorReference; friend class RawObjectPool; @@ -755,7 +747,6 @@ class SnapshotWriter : public BaseWriter { friend class RawScript; friend class RawStackTrace; friend class RawSubtypeTestCache; - friend class RawTokenStream; friend class RawType; friend class RawTypeRef; friend class RawBoundedType; diff --git a/runtime/vm/snapshot_test.cc b/runtime/vm/snapshot_test.cc index 0da0506ad81..ad6ba9ed54e 100644 --- a/runtime/vm/snapshot_test.cc +++ b/runtime/vm/snapshot_test.cc @@ -16,6 +16,7 @@ #include "vm/malloc_hooks.h" #include "vm/snapshot.h" #include "vm/symbols.h" +#include "vm/timer.h" #include "vm/unicode.h" #include "vm/unit_test.h" @@ -399,7 +400,6 @@ ISOLATE_UNIT_TEST_CASE(SerializeSingletons) { TEST_ROUND_TRIP_IDENTICAL(Object::type_arguments_class()); TEST_ROUND_TRIP_IDENTICAL(Object::function_class()); TEST_ROUND_TRIP_IDENTICAL(Object::field_class()); - TEST_ROUND_TRIP_IDENTICAL(Object::token_stream_class()); TEST_ROUND_TRIP_IDENTICAL(Object::script_class()); TEST_ROUND_TRIP_IDENTICAL(Object::library_class()); TEST_ROUND_TRIP_IDENTICAL(Object::code_class()); @@ -726,78 +726,6 @@ ISOLATE_UNIT_TEST_CASE(SerializeEmptyByteArray) { delete message; } -static void GenerateSourceAndCheck(const Script& script) { - // Check if we are able to generate the source from the token stream. - // Rescan this source and compare the token stream to see if they are - // the same. - Zone* zone = Thread::Current()->zone(); - const TokenStream& expected_tokens = - TokenStream::Handle(zone, script.tokens()); - TokenStream::Iterator expected_iterator(zone, expected_tokens, - TokenPosition::kMinSource, - TokenStream::Iterator::kAllTokens); - const String& str = String::Handle(zone, expected_tokens.GenerateSource()); - const String& private_key = - String::Handle(zone, expected_tokens.PrivateKey()); - const TokenStream& reconstructed_tokens = - TokenStream::Handle(zone, TokenStream::New(str, private_key, false)); - expected_iterator.SetCurrentPosition(TokenPosition::kMinSource); - TokenStream::Iterator reconstructed_iterator( - zone, reconstructed_tokens, TokenPosition::kMinSource, - TokenStream::Iterator::kAllTokens); - Token::Kind expected_kind = expected_iterator.CurrentTokenKind(); - Token::Kind reconstructed_kind = reconstructed_iterator.CurrentTokenKind(); - String& expected_literal = String::Handle(zone); - String& actual_literal = String::Handle(zone); - while (expected_kind != Token::kEOS && reconstructed_kind != Token::kEOS) { - EXPECT_EQ(expected_kind, reconstructed_kind); - expected_literal ^= expected_iterator.CurrentLiteral(); - actual_literal ^= reconstructed_iterator.CurrentLiteral(); - EXPECT_STREQ(expected_literal.ToCString(), actual_literal.ToCString()); - expected_iterator.Advance(); - reconstructed_iterator.Advance(); - expected_kind = expected_iterator.CurrentTokenKind(); - reconstructed_kind = reconstructed_iterator.CurrentTokenKind(); - } -} - -static void IterateScripts(const Library& lib) { - const Array& lib_scripts = Array::Handle(lib.LoadedScripts()); - Script& script = Script::Handle(); - String& uri = String::Handle(); - for (intptr_t i = 0; i < lib_scripts.Length(); i++) { - script ^= lib_scripts.At(i); - EXPECT(!script.IsNull()); - uri = script.url(); - OS::PrintErr("Generating source for part: %s\n", uri.ToCString()); - GenerateSourceAndCheck(script); - } -} - -ISOLATE_UNIT_TEST_CASE(GenerateSource) { - // Disable stack trace collection for this test as it results in a timeout. - bool stack_trace_collection_enabled = - MallocHooks::stack_trace_collection_enabled(); - MallocHooks::set_stack_trace_collection_enabled(false); - - Zone* zone = thread->zone(); - Isolate* isolate = thread->isolate(); - const GrowableObjectArray& libs = - GrowableObjectArray::Handle(zone, isolate->object_store()->libraries()); - Library& lib = Library::Handle(); - String& uri = String::Handle(); - for (intptr_t i = 0; i < libs.Length(); i++) { - lib ^= libs.At(i); - EXPECT(!lib.IsNull()); - uri = lib.url(); - OS::PrintErr("Generating source for library: %s\n", uri.ToCString()); - IterateScripts(lib); - } - - MallocHooks::set_stack_trace_collection_enabled( - stack_trace_collection_enabled); -} - VM_UNIT_TEST_CASE(FullSnapshot) { const char* kScriptChars = "class Fields {\n" diff --git a/runtime/vm/symbols.h b/runtime/vm/symbols.h index 50b2ea5447f..f3572c294f1 100644 --- a/runtime/vm/symbols.h +++ b/runtime/vm/symbols.h @@ -184,8 +184,6 @@ class ObjectPointerVisitor; V(SignatureData, "SignatureData") \ V(RedirectionData, "RedirectionData") \ V(Field, "Field") \ - V(LiteralToken, "LiteralToken") \ - V(TokenStream, "TokenStream") \ V(Script, "Script") \ V(LibraryClass, "Library") \ V(LibraryPrefix, "LibraryPrefix") \ diff --git a/runtime/vm/thread.cc b/runtime/vm/thread.cc index 9584f37f628..1f267cc4841 100644 --- a/runtime/vm/thread.cc +++ b/runtime/vm/thread.cc @@ -4,7 +4,6 @@ #include "vm/thread.h" -#include "vm/compiler_stats.h" #include "vm/dart_api_state.h" #include "vm/growable_array.h" #include "vm/isolate.h" @@ -34,10 +33,6 @@ Thread::~Thread() { ASSERT(isolate_ == NULL); ASSERT(store_buffer_block_ == NULL); ASSERT(marking_stack_block_ == NULL); - if (compiler_stats_ != NULL) { - delete compiler_stats_; - compiler_stats_ = NULL; - } // There should be no top api scopes at this point. ASSERT(api_top_scope() == NULL); // Delete the resusable api scope if there is one. @@ -104,7 +99,6 @@ Thread::Thread(Isolate* isolate) active_stacktrace_(Object::null()), resume_pc_(0), sticky_error_(Error::null()), - compiler_stats_(NULL), REUSABLE_HANDLE_LIST(REUSABLE_HANDLE_INITIALIZERS) REUSABLE_HANDLE_LIST(REUSABLE_HANDLE_SCOPE_INIT) safepoint_state_(0), execution_state_(kThreadInNative), @@ -142,12 +136,6 @@ Thread::Thread(Isolate* isolate) InitVMConstants(); } - if (FLAG_support_compiler_stats) { - compiler_stats_ = new CompilerStats(isolate); - if (FLAG_compiler_benchmark) { - compiler_stats_->EnableBenchmark(); - } - } // This thread should not yet own any zones. If it does, we need to make sure // we've accounted for any memory it has already allocated. if (zone_ == NULL) { diff --git a/runtime/vm/thread.h b/runtime/vm/thread.h index 740c04338de..4e01da6e1db 100644 --- a/runtime/vm/thread.h +++ b/runtime/vm/thread.h @@ -25,7 +25,6 @@ class Array; class CompilerState; class Class; class Code; -class CompilerStats; class Error; class ExceptionHandlers; class Field; @@ -617,8 +616,6 @@ class Thread : public BaseThread { return OFFSET_OF(Thread, async_stack_trace_); } - CompilerStats* compiler_stats() { return compiler_stats_; } - #if defined(DEBUG) #define REUSABLE_HANDLE_SCOPE_ACCESSORS(object) \ void set_reusable_##object##_handle_scope_active(bool value) { \ @@ -887,8 +884,6 @@ class Thread : public BaseThread { RawError* sticky_error_; - CompilerStats* compiler_stats_; - // Reusable handles support. #define REUSABLE_HANDLE_FIELDS(object) object* object##_handle_; REUSABLE_HANDLE_LIST(REUSABLE_HANDLE_FIELDS) diff --git a/runtime/vm/timer.h b/runtime/vm/timer.h index c9e4a19cf6e..94b67eac3cd 100644 --- a/runtime/vm/timer.h +++ b/runtime/vm/timer.h @@ -98,74 +98,6 @@ class Timer : public ValueObject { DISALLOW_COPY_AND_ASSIGN(Timer); }; -// The class TimerScope is used to start and stop a timer within a scope. -// It is used as follows: -// { -// TimerScope timer(FLAG_name_of_flag, timer, isolate); -// ..... -// code that needs to be timed. -// .... -// } -class TimerScope : public StackResource { - public: - TimerScope(bool flag, Timer* timer, Thread* thread = NULL) - : StackResource(thread), nested_(false), timer_(flag ? timer : NULL) { - Init(); - } - - void Init() { - if (timer_ != NULL) { - if (!timer_->running()) { - timer_->Start(); - } else { - nested_ = true; - } - } - } - ~TimerScope() { - if (timer_ != NULL) { - if (!nested_) { - timer_->Stop(); - } - } - } - - private: - bool nested_; - Timer* const timer_; - - DISALLOW_ALLOCATION(); - DISALLOW_COPY_AND_ASSIGN(TimerScope); -}; - -class PauseTimerScope : public StackResource { - public: - PauseTimerScope(bool flag, Timer* timer, Thread* thread = NULL) - : StackResource(thread), nested_(false), timer_(flag ? timer : NULL) { - if (timer_) { - if (timer_->running()) { - timer_->Stop(); - } else { - nested_ = true; - } - } - } - ~PauseTimerScope() { - if (timer_) { - if (!nested_) { - timer_->Start(); - } - } - } - - private: - bool nested_; - Timer* const timer_; - - DISALLOW_ALLOCATION(); - DISALLOW_COPY_AND_ASSIGN(PauseTimerScope); -}; - } // namespace dart #endif // RUNTIME_VM_TIMER_H_ diff --git a/runtime/vm/unit_test.cc b/runtime/vm/unit_test.cc index dcc0fdbd624..f2a985715d2 100644 --- a/runtime/vm/unit_test.cc +++ b/runtime/vm/unit_test.cc @@ -779,7 +779,6 @@ void AssemblerTest::Assemble() { const Script& script = Script::Handle( Script::New(function_name, String::Handle(String::New(kDummyScript)), RawScript::kSourceTag)); - script.Tokenize(String::Handle()); const Library& lib = Library::Handle(Library::CoreLibrary()); const Class& cls = Class::ZoneHandle( Class::New(lib, function_name, script, TokenPosition::kMinSource)); diff --git a/runtime/vm/vm_sources.gni b/runtime/vm/vm_sources.gni index e818413bfba..3605252d65f 100644 --- a/runtime/vm/vm_sources.gni +++ b/runtime/vm/vm_sources.gni @@ -40,8 +40,6 @@ vm_sources = [ "code_patcher_x64.cc", "compilation_trace.cc", "compilation_trace.h", - "compiler_stats.cc", - "compiler_stats.h", "constants_arm.h", "constants_arm64.h", "constants_dbc.h", diff --git a/tests/lib_2/lib_2_kernel.status b/tests/lib_2/lib_2_kernel.status index c0aad4e42aa..1eaff77cd7d 100644 --- a/tests/lib_2/lib_2_kernel.status +++ b/tests/lib_2/lib_2_kernel.status @@ -159,7 +159,6 @@ mirrors/constructor_private_name_test: RuntimeError # Issue 33345 - Incorrect qu mirrors/constructors_test: CompileTimeError # Issue 31402 (Invocation arguments) mirrors/dart2js_mirrors_test: RuntimeError # 31916 mirrors/deferred_type_test: CompileTimeError, RuntimeError -mirrors/empty_test: Crash, RuntimeError mirrors/enum_test: RuntimeError # Issue 31402 (Invocation arguments) mirrors/equality_test: RuntimeError mirrors/fake_function_without_call_test: RuntimeError, OK