Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(221)

Side by Side Diff: runtime/vm/isolate.cc

Issue 1352483002: Add benchmark output to compiler stats. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: cleanup Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include "vm/isolate.h" 5 #include "vm/isolate.h"
6 6
7 #include "include/dart_api.h" 7 #include "include/dart_api.h"
8 #include "platform/assert.h" 8 #include "platform/assert.h"
9 #include "platform/json.h" 9 #include "platform/json.h"
10 #include "vm/code_observers.h" 10 #include "vm/code_observers.h"
(...skipping 824 matching lines...) Expand 10 before | Expand all | Expand 10 after
835 835
836 result->BuildName(name_prefix); 836 result->BuildName(name_prefix);
837 result->debugger_ = new Debugger(); 837 result->debugger_ = new Debugger();
838 result->debugger_->Initialize(result); 838 result->debugger_->Initialize(result);
839 if (FLAG_trace_isolates) { 839 if (FLAG_trace_isolates) {
840 if (name_prefix == NULL || strcmp(name_prefix, "vm-isolate") != 0) { 840 if (name_prefix == NULL || strcmp(name_prefix, "vm-isolate") != 0) {
841 OS::Print("[+] Starting isolate:\n" 841 OS::Print("[+] Starting isolate:\n"
842 "\tisolate: %s\n", result->name()); 842 "\tisolate: %s\n", result->name());
843 } 843 }
844 } 844 }
845 if (FLAG_compiler_stats) { 845
846 result->compiler_stats_ = new CompilerStats(result); 846 result->compiler_stats_ = new CompilerStats(result);
847 if (FLAG_compiler_benchmark) {
848 result->compiler_stats_->EnableBenchmark();
847 } 849 }
850
848 ObjectIdRing::Init(result); 851 ObjectIdRing::Init(result);
849 // Add to isolate list. 852 // Add to isolate list.
850 AddIsolateTolist(result); 853 AddIsolateTolist(result);
851 854
852 return result; 855 return result;
853 } 856 }
854 857
855 858
856 void Isolate::InitializeStackLimit() { 859 void Isolate::InitializeStackLimit() {
857 SetStackLimitFromStackBase(Isolate::GetCurrentStackPointer()); 860 SetStackLimitFromStackBase(Isolate::GetCurrentStackPointer());
(...skipping 641 matching lines...) Expand 10 before | Expand all | Expand 10 after
1499 } 1502 }
1500 1503
1501 // Then, proceed with low-level teardown. 1504 // Then, proceed with low-level teardown.
1502 { 1505 {
1503 // Ensure we have a zone and handle scope so that we can call VM functions, 1506 // Ensure we have a zone and handle scope so that we can call VM functions,
1504 // but we no longer allocate new heap objects. 1507 // but we no longer allocate new heap objects.
1505 StackZone stack_zone(thread); 1508 StackZone stack_zone(thread);
1506 HandleScope handle_scope(thread); 1509 HandleScope handle_scope(thread);
1507 NoSafepointScope no_safepoint_scope; 1510 NoSafepointScope no_safepoint_scope;
1508 1511
1509 if (compiler_stats_ != NULL) { 1512 if (FLAG_compiler_stats) {
1510 OS::Print("%s", compiler_stats()->PrintToZone()); 1513 OS::Print("%s", compiler_stats()->PrintToZone());
1511 } 1514 }
1512 1515
1513 // Notify exit listeners that this isolate is shutting down. 1516 // Notify exit listeners that this isolate is shutting down.
1514 if (object_store() != NULL) { 1517 if (object_store() != NULL) {
1515 NotifyExitListeners(); 1518 NotifyExitListeners();
1516 } 1519 }
1517 1520
1518 // Clean up debugger resources. 1521 // Clean up debugger resources.
1519 debugger()->Shutdown(); 1522 debugger()->Shutdown();
(...skipping 829 matching lines...) Expand 10 before | Expand all | Expand 10 after
2349 serialized_message_, serialized_message_len_); 2352 serialized_message_, serialized_message_len_);
2350 } 2353 }
2351 2354
2352 2355
2353 void IsolateSpawnState::Cleanup() { 2356 void IsolateSpawnState::Cleanup() {
2354 SwitchIsolateScope switch_scope(I); 2357 SwitchIsolateScope switch_scope(I);
2355 Dart::ShutdownIsolate(); 2358 Dart::ShutdownIsolate();
2356 } 2359 }
2357 2360
2358 } // namespace dart 2361 } // namespace dart
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698