Commit 6888d68b authored by Jakob Gruber's avatar Jakob Gruber Committed by Commit Bot

[snapshot] Deoptimize all in --stress-snapshot mode

We don't yet support serialization of optimized code, so whenever the
serializer encounters an 'unexpected' Code object, it aborts.

Snapshot::ClearReconstructableDataForSerialization does not clear
weak links created through compilation dependencies. These links
make Code objects reachable even though recompilable data has been
cleared from JSFunctions/SFIs/JSRegExps.

Forcing a full deopt of the entire isolate is the simple of way of
solving this until serialization support for optimized code has been
implemented.

Bug: v8:10416,v8:10500,v8:10518
Change-Id: Ie1386cc9fa983b435825afa15441df38409bff98
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2196122
Auto-Submit: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: 's avatarLeszek Swirski <leszeks@chromium.org>
Reviewed-by: 's avatarClemens Backes <clemensb@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#67737}
parent d0dbee47
......@@ -3054,6 +3054,9 @@ int Shell::RunMain(Isolate* isolate, bool last_run) {
static constexpr bool kClearRecompilableData = true;
i::Isolate* i_isolate = reinterpret_cast<i::Isolate*>(isolate);
i::Handle<i::Context> i_context = Utils::OpenHandle(*context);
// TODO(jgruber,v8:10500): Don't deoptimize once we support serialization
// of optimized code.
i::Deoptimizer::DeoptimizeAll(i_isolate);
i::Snapshot::ClearReconstructableDataForSerialization(
i_isolate, kClearRecompilableData);
i::Snapshot::SerializeDeserializeAndVerifyForTesting(i_isolate,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment