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

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

Issue 1847683002: Fix CompilerStats aggregation: do not aggregate if there is no mutator thread (isolate shutting dow… (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: d Created 4 years, 8 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 | « no previous file | runtime/vm/profiler_test.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) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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/compiler.h" 5 #include "vm/compiler.h"
6 6
7 #include "vm/assembler.h" 7 #include "vm/assembler.h"
8 8
9 #include "vm/ast_printer.h" 9 #include "vm/ast_printer.h"
10 #include "vm/block_scheduler.h" 10 #include "vm/block_scheduler.h"
(...skipping 1670 matching lines...) Expand 10 before | Expand all | Expand 10 after
1681 ASSERT(thread->compiler_stats()->IsCleared()); 1681 ASSERT(thread->compiler_stats()->IsCleared());
1682 const Error& error = Error::Handle(zone, 1682 const Error& error = Error::Handle(zone,
1683 Compiler::CompileOptimizedFunction(thread, 1683 Compiler::CompileOptimizedFunction(thread,
1684 function, 1684 function,
1685 Compiler::kNoOSRDeoptId)); 1685 Compiler::kNoOSRDeoptId));
1686 // TODO(srdjan): We do not expect errors while compiling optimized 1686 // TODO(srdjan): We do not expect errors while compiling optimized
1687 // code, any errors should have been caught when compiling 1687 // code, any errors should have been caught when compiling
1688 // unoptimized code. Any issues while optimizing are flagged by 1688 // unoptimized code. Any issues while optimizing are flagged by
1689 // making the result invalid. 1689 // making the result invalid.
1690 ASSERT(error.IsNull()); 1690 ASSERT(error.IsNull());
1691 isolate->aggregate_compiler_stats()->Add(*thread->compiler_stats()); 1691 // We cannot aggregate stats if isolate is shutting down.
1692 if (isolate->HasMutatorThread()) {
1693 isolate->aggregate_compiler_stats()->Add(*thread->compiler_stats());
1694 }
1692 thread->compiler_stats()->Clear(); 1695 thread->compiler_stats()->Clear();
1693 QueueElement* qelem = function_queue()->Remove(); 1696 QueueElement* qelem = function_queue()->Remove();
1694 delete qelem; 1697 delete qelem;
1695 function = function_queue()->PeekFunction(); 1698 function = function_queue()->PeekFunction();
1696 } 1699 }
1697 } 1700 }
1698 Thread::ExitIsolateAsHelper(); 1701 Thread::ExitIsolateAsHelper();
1699 { 1702 {
1700 // Wait to be notified when the work queue is not empty. 1703 // Wait to be notified when the work queue is not empty.
1701 MonitorLocker ml(queue_monitor_); 1704 MonitorLocker ml(queue_monitor_);
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after
1902 } 1905 }
1903 1906
1904 1907
1905 void BackgroundCompiler::EnsureInit(Thread* thread) { 1908 void BackgroundCompiler::EnsureInit(Thread* thread) {
1906 UNREACHABLE(); 1909 UNREACHABLE();
1907 } 1910 }
1908 1911
1909 #endif // DART_PRECOMPILED_RUNTIME 1912 #endif // DART_PRECOMPILED_RUNTIME
1910 1913
1911 } // namespace dart 1914 } // namespace dart
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/profiler_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698