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

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: mmmmmmerge 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
« no previous file with comments | « runtime/vm/compiler_stats.cc ('k') | runtime/vm/object.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "include/dart_native_api.h" 8 #include "include/dart_native_api.h"
9 #include "platform/assert.h" 9 #include "platform/assert.h"
10 #include "platform/json.h" 10 #include "platform/json.h"
(...skipping 827 matching lines...) Expand 10 before | Expand all | Expand 10 after
838 838
839 result->BuildName(name_prefix); 839 result->BuildName(name_prefix);
840 result->debugger_ = new Debugger(); 840 result->debugger_ = new Debugger();
841 result->debugger_->Initialize(result); 841 result->debugger_->Initialize(result);
842 if (FLAG_trace_isolates) { 842 if (FLAG_trace_isolates) {
843 if (name_prefix == NULL || strcmp(name_prefix, "vm-isolate") != 0) { 843 if (name_prefix == NULL || strcmp(name_prefix, "vm-isolate") != 0) {
844 OS::Print("[+] Starting isolate:\n" 844 OS::Print("[+] Starting isolate:\n"
845 "\tisolate: %s\n", result->name()); 845 "\tisolate: %s\n", result->name());
846 } 846 }
847 } 847 }
848 if (FLAG_compiler_stats) { 848
849 result->compiler_stats_ = new CompilerStats(result); 849 result->compiler_stats_ = new CompilerStats(result);
850 if (FLAG_compiler_benchmark) {
851 result->compiler_stats_->EnableBenchmark();
850 } 852 }
853
851 ObjectIdRing::Init(result); 854 ObjectIdRing::Init(result);
852 855
853 // Add to isolate list. Shutdown and delete the isolate on failure. 856 // Add to isolate list. Shutdown and delete the isolate on failure.
854 if (!AddIsolateToList(result)) { 857 if (!AddIsolateToList(result)) {
855 result->LowLevelShutdown(); 858 result->LowLevelShutdown();
856 Thread::ExitIsolate(); 859 Thread::ExitIsolate();
857 delete result; 860 delete result;
858 return NULL; 861 return NULL;
859 } 862 }
860 863
(...skipping 611 matching lines...) Expand 10 before | Expand all | Expand 10 after
1472 1475
1473 1476
1474 void Isolate::LowLevelShutdown() { 1477 void Isolate::LowLevelShutdown() {
1475 // Ensure we have a zone and handle scope so that we can call VM functions, 1478 // Ensure we have a zone and handle scope so that we can call VM functions,
1476 // but we no longer allocate new heap objects. 1479 // but we no longer allocate new heap objects.
1477 Thread* thread = Thread::Current(); 1480 Thread* thread = Thread::Current();
1478 StackZone stack_zone(thread); 1481 StackZone stack_zone(thread);
1479 HandleScope handle_scope(thread); 1482 HandleScope handle_scope(thread);
1480 NoSafepointScope no_safepoint_scope; 1483 NoSafepointScope no_safepoint_scope;
1481 1484
1482 if (compiler_stats_ != NULL) { 1485 if (FLAG_compiler_stats) {
1483 OS::Print("%s", compiler_stats()->PrintToZone()); 1486 OS::Print("%s", compiler_stats()->PrintToZone());
1484 } 1487 }
1485 1488
1486 // Notify exit listeners that this isolate is shutting down. 1489 // Notify exit listeners that this isolate is shutting down.
1487 if (object_store() != NULL) { 1490 if (object_store() != NULL) {
1488 NotifyExitListeners(); 1491 NotifyExitListeners();
1489 } 1492 }
1490 1493
1491 // Clean up debugger resources. 1494 // Clean up debugger resources.
1492 debugger()->Shutdown(); 1495 debugger()->Shutdown();
(...skipping 980 matching lines...) Expand 10 before | Expand all | Expand 10 after
2473 serialized_message_, serialized_message_len_); 2476 serialized_message_, serialized_message_len_);
2474 } 2477 }
2475 2478
2476 2479
2477 void IsolateSpawnState::Cleanup() { 2480 void IsolateSpawnState::Cleanup() {
2478 SwitchIsolateScope switch_scope(I); 2481 SwitchIsolateScope switch_scope(I);
2479 Dart::ShutdownIsolate(); 2482 Dart::ShutdownIsolate();
2480 } 2483 }
2481 2484
2482 } // namespace dart 2485 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/compiler_stats.cc ('k') | runtime/vm/object.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698