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

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

Issue 1904153002: Add a stress testing flag --background-compilation-stop-alot; add an extra check if background comp… (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: r 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/compiler.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/code_generator.h" 5 #include "vm/code_generator.h"
6 6
7 #include "vm/assembler.h" 7 #include "vm/assembler.h"
8 #include "vm/ast.h" 8 #include "vm/ast.h"
9 #include "vm/code_patcher.h" 9 #include "vm/code_patcher.h"
10 #include "vm/compiler.h" 10 #include "vm/compiler.h"
(...skipping 1387 matching lines...) Expand 10 before | Expand all | Expand 10 after
1398 field.DeoptimizeDependentCode(); 1398 field.DeoptimizeDependentCode();
1399 // Get next field. 1399 // Get next field.
1400 field = isolate->GetDeoptimizingBoxedField(); 1400 field = isolate->GetDeoptimizingBoxedField();
1401 } 1401 }
1402 } 1402 }
1403 // TODO(srdjan): Fix background compilation of regular expressions. 1403 // TODO(srdjan): Fix background compilation of regular expressions.
1404 if (FLAG_background_compilation) { 1404 if (FLAG_background_compilation) {
1405 if (FLAG_enable_inlining_annotations) { 1405 if (FLAG_enable_inlining_annotations) {
1406 FATAL("Cannot enable inlining annotations and background compilation"); 1406 FATAL("Cannot enable inlining annotations and background compilation");
1407 } 1407 }
1408 if (FLAG_background_compilation_stop_alot) {
1409 BackgroundCompiler::Stop(isolate);
1410 }
1408 // Reduce the chance of triggering optimization while the function is 1411 // Reduce the chance of triggering optimization while the function is
1409 // being optimized in the background. INT_MIN should ensure that it takes 1412 // being optimized in the background. INT_MIN should ensure that it takes
1410 // long time to trigger optimization. 1413 // long time to trigger optimization.
1411 // Note that the background compilation queue rejects duplicate entries. 1414 // Note that the background compilation queue rejects duplicate entries.
1412 function.set_usage_counter(INT_MIN); 1415 function.set_usage_counter(INT_MIN);
1413 BackgroundCompiler::EnsureInit(thread); 1416 BackgroundCompiler::EnsureInit(thread);
1414 ASSERT(isolate->background_compiler() != NULL); 1417 ASSERT(isolate->background_compiler() != NULL);
1415 isolate->background_compiler()->CompileOptimized(function); 1418 isolate->background_compiler()->CompileOptimized(function);
1416 // Continue in the same code. 1419 // Continue in the same code.
1417 arguments.SetReturn(Code::Handle(zone, function.CurrentCode())); 1420 arguments.SetReturn(Code::Handle(zone, function.CurrentCode()));
(...skipping 420 matching lines...) Expand 10 before | Expand all | Expand 10 after
1838 const intptr_t elm_size = old_data.ElementSizeInBytes(); 1841 const intptr_t elm_size = old_data.ElementSizeInBytes();
1839 const TypedData& new_data = 1842 const TypedData& new_data =
1840 TypedData::Handle(TypedData::New(cid, new_size, Heap::kOld)); 1843 TypedData::Handle(TypedData::New(cid, new_size, Heap::kOld));
1841 TypedData::Copy(new_data, 0, old_data, 0, old_size * elm_size); 1844 TypedData::Copy(new_data, 0, old_data, 0, old_size * elm_size);
1842 typed_data_cell.SetAt(0, new_data); 1845 typed_data_cell.SetAt(0, new_data);
1843 arguments.SetReturn(new_data); 1846 arguments.SetReturn(new_data);
1844 } 1847 }
1845 1848
1846 1849
1847 } // namespace dart 1850 } // namespace dart
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/compiler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698