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

Issue 15779006: Add deoptimization history to optimized functions. (Closed)

Created:
7 years, 7 months ago by Florian Schneider
Modified:
7 years, 6 months ago
CC:
reviews_dartlang.org, vm-dev_dartlang.org
Visibility:
Public.

Description

Add deoptimization history to optimized functions. Each function that is optimized or inlined into an optimized functions keeps an array of deoptimization ids. This history is used to avoid repeated deoptimization caused by speculative hoisting of check instructions. R=kmillikin@google.com Committed: https://code.google.com/p/dart/source/detail?r=23136

Patch Set 1 #

Patch Set 2 : #

Patch Set 3 : #

Patch Set 4 : #

Total comments: 6

Patch Set 5 : #

Patch Set 6 : #

Total comments: 4
Unified diffs Side-by-side diffs Delta from patch set Stats (+67 lines, -9 lines) Patch
M runtime/vm/compiler.cc View 1 2 3 4 1 chunk +7 lines, -0 lines 0 comments Download
M runtime/vm/deopt_instructions.cc View 1 2 3 2 chunks +13 lines, -0 lines 0 comments Download
M runtime/vm/flow_graph_inliner.cc View 1 2 3 4 1 chunk +8 lines, -0 lines 2 comments Download
M runtime/vm/flow_graph_optimizer.h View 1 1 chunk +2 lines, -0 lines 0 comments Download
M runtime/vm/flow_graph_optimizer.cc View 1 2 3 4 5 4 chunks +27 lines, -8 lines 0 comments Download
M runtime/vm/object.h View 1 1 chunk +3 lines, -0 lines 0 comments Download
M runtime/vm/object.cc View 1 1 chunk +5 lines, -0 lines 0 comments Download
M runtime/vm/raw_object.h View 1 2 3 2 chunks +2 lines, -1 line 2 comments Download

Messages

Total messages: 7 (0 generated)
Florian Schneider
7 years, 7 months ago (2013-05-23 19:20:16 UTC) #1
Florian Schneider
Redirecting to Kevin.
7 years, 7 months ago (2013-05-24 08:13:20 UTC) #2
Kevin Millikin (Google)
This is pretty sleazy but I kind of like it. LGTM. https://codereview.chromium.org/15779006/diff/17001/runtime/vm/compiler.cc File runtime/vm/compiler.cc (right): ...
7 years, 7 months ago (2013-05-24 11:39:21 UTC) #3
Florian Schneider
https://codereview.chromium.org/15779006/diff/17001/runtime/vm/compiler.cc File runtime/vm/compiler.cc (right): https://codereview.chromium.org/15779006/diff/17001/runtime/vm/compiler.cc#newcode377 runtime/vm/compiler.cc:377: const Array& deopt_history = Array::Handle(function.deopt_history()); On 2013/05/24 11:39:21, kmillikin ...
7 years, 7 months ago (2013-05-24 11:53:02 UTC) #4
Florian Schneider
Committed patchset #6 manually as r23136 (presubmit successful).
7 years, 7 months ago (2013-05-24 12:03:51 UTC) #5
srdjan
DBC https://codereview.chromium.org/15779006/diff/28002/runtime/vm/flow_graph_inliner.cc File runtime/vm/flow_graph_inliner.cc (right): https://codereview.chromium.org/15779006/diff/28002/runtime/vm/flow_graph_inliner.cc#newcode620 runtime/vm/flow_graph_inliner.cc:620: function.set_deopt_history(deopt_history); This code is used repeatedly. How about ...
7 years, 6 months ago (2013-05-28 10:48:48 UTC) #6
Florian Schneider
7 years, 6 months ago (2013-05-29 08:50:20 UTC) #7
Message was sent while issue was closed.
https://codereview.chromium.org/15779006/diff/28002/runtime/vm/flow_graph_inl...
File runtime/vm/flow_graph_inliner.cc (right):

https://codereview.chromium.org/15779006/diff/28002/runtime/vm/flow_graph_inl...
runtime/vm/flow_graph_inliner.cc:620: function.set_deopt_history(deopt_history);
On 2013/05/28 10:48:49, srdjan wrote:
> This code is used repeatedly. How about factoring it out into
> Function::NeedsDeoptHistory() ?

Good idea.

https://codereview.chromium.org/15779006/diff/28002/runtime/vm/raw_object.h
File runtime/vm/raw_object.h (right):

https://codereview.chromium.org/15779006/diff/28002/runtime/vm/raw_object.h#n...
runtime/vm/raw_object.h:618: int16_t deoptimization_counter_;
On 2013/05/28 10:48:49, srdjan wrote:
> Please document what negative counter means.

It should never be negative. I just made this consistent with the getter/setter
that expect int16_t. On the other hand we use intptr_t in many places even
though the value is always positive.

Powered by Google App Engine
This is Rietveld 408576698