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

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

Issue 2118923002: Add --hot-reload-test-mode flag to embedder and wire it up to test.py (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 5 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/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 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 56
57 DEFINE_FLAG(int, stacktrace_every, 0, 57 DEFINE_FLAG(int, stacktrace_every, 0,
58 "Compute debugger stacktrace on every N stack overflow checks"); 58 "Compute debugger stacktrace on every N stack overflow checks");
59 DEFINE_FLAG(charp, stacktrace_filter, NULL, 59 DEFINE_FLAG(charp, stacktrace_filter, NULL,
60 "Compute stacktrace in named function on stack overflow checks"); 60 "Compute stacktrace in named function on stack overflow checks");
61 DEFINE_FLAG(charp, deoptimize_filter, NULL, 61 DEFINE_FLAG(charp, deoptimize_filter, NULL,
62 "Deoptimize in named function on stack overflow checks"); 62 "Deoptimize in named function on stack overflow checks");
63 63
64 DECLARE_FLAG(int, reload_every); 64 DECLARE_FLAG(int, reload_every);
65 DECLARE_FLAG(bool, reload_every_optimized); 65 DECLARE_FLAG(bool, reload_every_optimized);
66 DECLARE_FLAG(bool, reload_every_back_off);
66 67
67 #ifdef DEBUG 68 #ifdef DEBUG
68 DEFINE_FLAG(charp, gc_at_instance_allocation, NULL, 69 DEFINE_FLAG(charp, gc_at_instance_allocation, NULL,
69 "Perform a GC before allocation of instances of " 70 "Perform a GC before allocation of instances of "
70 "the specified class"); 71 "the specified class");
71 #endif 72 #endif
72 73
73 DEFINE_RUNTIME_ENTRY(TraceFunctionEntry, 1) { 74 DEFINE_RUNTIME_ENTRY(TraceFunctionEntry, 1) {
74 const Function& function = Function::CheckedHandle(arguments.ArgAt(0)); 75 const Function& function = Function::CheckedHandle(arguments.ArgAt(0));
75 const String& function_name = String::Handle(function.name()); 76 const String& function_name = String::Handle(function.name());
(...skipping 1214 matching lines...) Expand 10 before | Expand all | Expand 10 after
1290 OS::PrintErr("*** Computing stacktrace (%s)\n", 1291 OS::PrintErr("*** Computing stacktrace (%s)\n",
1291 function.ToFullyQualifiedCString()); 1292 function.ToFullyQualifiedCString());
1292 do_stacktrace = true; 1293 do_stacktrace = true;
1293 } 1294 }
1294 } 1295 }
1295 if (do_deopt) { 1296 if (do_deopt) {
1296 // TODO(turnidge): Consider using DeoptimizeAt instead. 1297 // TODO(turnidge): Consider using DeoptimizeAt instead.
1297 DeoptimizeFunctionsOnStack(); 1298 DeoptimizeFunctionsOnStack();
1298 } 1299 }
1299 if (do_reload) { 1300 if (do_reload) {
1301 if (FLAG_reload_every_back_off) {
1302 FLAG_reload_every *= 2;
1303 }
1300 NOT_IN_PRODUCT(isolate->ReloadSources();) 1304 NOT_IN_PRODUCT(isolate->ReloadSources();)
1301 } 1305 }
1302 if (FLAG_support_debugger && do_stacktrace) { 1306 if (FLAG_support_debugger && do_stacktrace) {
1303 String& var_name = String::Handle(); 1307 String& var_name = String::Handle();
1304 Instance& var_value = Instance::Handle(); 1308 Instance& var_value = Instance::Handle();
1305 // Collecting the stack trace and accessing local variables 1309 // Collecting the stack trace and accessing local variables
1306 // of frames may trigger parsing of functions to compute 1310 // of frames may trigger parsing of functions to compute
1307 // variable descriptors of functions. Parsing may trigger 1311 // variable descriptors of functions. Parsing may trigger
1308 // code execution, e.g. to compute compile-time constants. Thus, 1312 // code execution, e.g. to compute compile-time constants. Thus,
1309 // disable FLAG_stacktrace_every during trace collection to prevent 1313 // disable FLAG_stacktrace_every during trace collection to prevent
(...skipping 569 matching lines...) Expand 10 before | Expand all | Expand 10 after
1879 const intptr_t elm_size = old_data.ElementSizeInBytes(); 1883 const intptr_t elm_size = old_data.ElementSizeInBytes();
1880 const TypedData& new_data = 1884 const TypedData& new_data =
1881 TypedData::Handle(TypedData::New(cid, new_size, Heap::kOld)); 1885 TypedData::Handle(TypedData::New(cid, new_size, Heap::kOld));
1882 TypedData::Copy(new_data, 0, old_data, 0, old_size * elm_size); 1886 TypedData::Copy(new_data, 0, old_data, 0, old_size * elm_size);
1883 typed_data_cell.SetAt(0, new_data); 1887 typed_data_cell.SetAt(0, new_data);
1884 arguments.SetReturn(new_data); 1888 arguments.SetReturn(new_data);
1885 } 1889 }
1886 1890
1887 1891
1888 } // namespace dart 1892 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/bin/main.cc ('k') | runtime/vm/isolate.cc » ('j') | runtime/vm/isolate.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698