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

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

Issue 3001763002: [VM-corelib] Improve performance for very big maps and sets.
Patch Set: Created 3 years, 4 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
« runtime/lib/compact_hash.dart ('K') | « runtime/lib/compact_hash.dart ('k') | no next file » | 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 #if !defined(DART_PRECOMPILED_RUNTIME) 5 #if !defined(DART_PRECOMPILED_RUNTIME)
6 6
7 #include "vm/flow_graph_inliner.h" 7 #include "vm/flow_graph_inliner.h"
8 8
9 #include "vm/aot_optimizer.h" 9 #include "vm/aot_optimizer.h"
10 #include "vm/block_scheduler.h" 10 #include "vm/block_scheduler.h"
(...skipping 1253 matching lines...) Expand 10 before | Expand all | Expand 10 after
1264 const GrowableArray<CallSites::StaticCallInfo>& call_info = 1264 const GrowableArray<CallSites::StaticCallInfo>& call_info =
1265 inlining_call_sites_->static_calls(); 1265 inlining_call_sites_->static_calls();
1266 TRACE_INLINING(THR_Print(" Static Calls (%" Pd ")\n", call_info.length())); 1266 TRACE_INLINING(THR_Print(" Static Calls (%" Pd ")\n", call_info.length()));
1267 for (intptr_t call_idx = 0; call_idx < call_info.length(); ++call_idx) { 1267 for (intptr_t call_idx = 0; call_idx < call_info.length(); ++call_idx) {
1268 StaticCallInstr* call = call_info[call_idx].call; 1268 StaticCallInstr* call = call_info[call_idx].call;
1269 const Function& target = call->function(); 1269 const Function& target = call->function();
1270 if (!inliner_->AlwaysInline(target) && 1270 if (!inliner_->AlwaysInline(target) &&
1271 (call_info[call_idx].ratio * 100) < FLAG_inlining_hotness) { 1271 (call_info[call_idx].ratio * 100) < FLAG_inlining_hotness) {
1272 if (trace_inlining()) { 1272 if (trace_inlining()) {
1273 String& name = String::Handle(target.QualifiedUserVisibleName()); 1273 String& name = String::Handle(target.QualifiedUserVisibleName());
1274 THR_Print(" => %s (deopt count %d)\n Bailout: cold %f\n", 1274 THR_Print(" => %s (deopt count %d, optimized instructions %" Pd
1275 ")\n Bailout: cold %f\n",
1275 name.ToCString(), target.deoptimization_counter(), 1276 name.ToCString(), target.deoptimization_counter(),
1277 target.optimized_instruction_count(),
1276 call_info[call_idx].ratio); 1278 call_info[call_idx].ratio);
1277 } 1279 }
1278 PRINT_INLINING_TREE("Too cold", &call_info[call_idx].caller(), 1280 PRINT_INLINING_TREE("Too cold", &call_info[call_idx].caller(),
1279 &call->function(), call); 1281 &call->function(), call);
1280 continue; 1282 continue;
1281 } 1283 }
1282 GrowableArray<Value*> arguments(call->ArgumentCount()); 1284 GrowableArray<Value*> arguments(call->ArgumentCount());
1283 for (int i = 0; i < call->ArgumentCount(); ++i) { 1285 for (int i = 0; i < call->ArgumentCount(); ++i) {
1284 arguments.Add(call->PushArgumentAt(i)->value()); 1286 arguments.Add(call->PushArgumentAt(i)->value());
1285 } 1287 }
(...skipping 2451 matching lines...) Expand 10 before | Expand all | Expand 10 after
3737 } 3739 }
3738 3740
3739 default: 3741 default:
3740 return false; 3742 return false;
3741 } 3743 }
3742 } 3744 }
3743 3745
3744 } // namespace dart 3746 } // namespace dart
3745 3747
3746 #endif // !defined(DART_PRECOMPILED_RUNTIME) 3748 #endif // !defined(DART_PRECOMPILED_RUNTIME)
OLDNEW
« runtime/lib/compact_hash.dart ('K') | « runtime/lib/compact_hash.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698