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

Issue 2002583002: Background compiler should validate CHA decisions before committing the code. (Closed)

Created:
4 years, 7 months ago by Vyacheslav Egorov (Google)
Modified:
4 years, 7 months ago
Reviewers:
Florian Schneider
CC:
reviews_dartlang.org, vm-dev_dartlang.org
Base URL:
git@github.com:dart-lang/sdk.git@master
Target Ref:
refs/heads/master
Visibility:
Public.

Description

Background compiler should validate CHA decisions before committing the code. CHA::HasOverride skips non-finalized classes when looking for overrides which means that we will install incorrect code if some subclass with an override was finalized while compilation was in progress. To catch situations like this we record the number of finalized subclasses that class had when CHA made the first negative decision about it (e.g. that it has no subclasses or that it has no overrides for some function) and before installing the code we check that number of subclasses matches. Additionally renamed "leaf classes" to "guarded classes" because those classes are not necessarily leaf. R=fschneider@google.com BUG= Committed: https://github.com/dart-lang/sdk/commit/6bb73bd2e41f9847e4b7a24bbd4d50d41a6536cf

Patch Set 1 #

Total comments: 8

Patch Set 2 : address comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+133 lines, -50 lines) Patch
M runtime/vm/aot_optimizer.cc View 1 2 chunks +5 lines, -5 lines 0 comments Download
M runtime/vm/cha.h View 2 chunks +32 lines, -10 lines 0 comments Download
M runtime/vm/cha.cc View 1 3 chunks +71 lines, -9 lines 0 comments Download
M runtime/vm/cha_test.cc View 2 chunks +6 lines, -13 lines 0 comments Download
M runtime/vm/compiler.cc View 2 chunks +12 lines, -8 lines 0 comments Download
M runtime/vm/flow_graph.cc View 1 chunk +3 lines, -2 lines 0 comments Download
M runtime/vm/flow_graph_type_propagator.cc View 2 chunks +3 lines, -2 lines 0 comments Download
M runtime/vm/jit_optimizer.cc View 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 6 (1 generated)
Vyacheslav Egorov (Google)
4 years, 7 months ago (2016-05-20 11:10:13 UTC) #1
Florian Schneider
https://codereview.chromium.org/2002583002/diff/1/runtime/vm/aot_optimizer.cc File runtime/vm/aot_optimizer.cc (right): https://codereview.chromium.org/2002583002/diff/1/runtime/vm/aot_optimizer.cc#newcode2070 runtime/vm/aot_optimizer.cc:2070: thread()->cha()->AddToGuardedClasses(type_class, /*subclass_count=*/0); You can remove this, or add ASSERT(!FLAG_use_cha_deopt) ...
4 years, 7 months ago (2016-05-20 11:23:28 UTC) #2
Vyacheslav Egorov (Google)
PTAL https://codereview.chromium.org/2002583002/diff/1/runtime/vm/aot_optimizer.cc File runtime/vm/aot_optimizer.cc (right): https://codereview.chromium.org/2002583002/diff/1/runtime/vm/aot_optimizer.cc#newcode2070 runtime/vm/aot_optimizer.cc:2070: thread()->cha()->AddToGuardedClasses(type_class, /*subclass_count=*/0); On 2016/05/20 11:23:28, Florian Schneider wrote: ...
4 years, 7 months ago (2016-05-20 11:31:21 UTC) #3
Florian Schneider
LGTM!
4 years, 7 months ago (2016-05-20 11:35:42 UTC) #4
Vyacheslav Egorov (Google)
4 years, 7 months ago (2016-05-20 11:48:34 UTC) #6
Message was sent while issue was closed.
Committed patchset #2 (id:20001) manually as
6bb73bd2e41f9847e4b7a24bbd4d50d41a6536cf (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698