Skip to content

Commit 7e9d594

Browse files
LeszekSwirskiV8 LUCI CQ
authored andcommitted
[fpu] Ensure FPU state is consistent for code cache
Add FPU state to the code cache hash, and ensure deserialization threads preserve it. Fixed: 425703809 Change-Id: Id89613685536a04d28389b95b342fac14ba296a1 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/6658269 Reviewed-by: Jakob Kummerow <[email protected]> Commit-Queue: Jakob Kummerow <[email protected]> Auto-Submit: Leszek Swirski <[email protected]> Cr-Commit-Position: refs/heads/main@{#100966}
1 parent cff4bd4 commit 7e9d594

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

src/codegen/compiler.cc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2757,6 +2757,9 @@ BackgroundDeserializeTask::BackgroundDeserializeTask(
27572757
}
27582758

27592759
void BackgroundDeserializeTask::Run() {
2760+
base::FlushDenormalsScope flush_denormals_scope(
2761+
isolate_for_local_isolate_->flush_denormals());
2762+
27602763
TimedHistogramScope timer(timer_, nullptr, &background_time_in_microseconds_);
27612764
LocalIsolate isolate(isolate_for_local_isolate_, ThreadKind::kBackground);
27622765
UnparkedScope unparked_scope(&isolate);
@@ -2791,6 +2794,9 @@ bool BackgroundDeserializeTask::ShouldMergeWithExistingScript() const {
27912794
void BackgroundDeserializeTask::MergeWithExistingScript() {
27922795
DCHECK(ShouldMergeWithExistingScript());
27932796

2797+
base::FlushDenormalsScope flush_denormals_scope(
2798+
isolate_for_local_isolate_->flush_denormals());
2799+
27942800
LocalIsolate isolate(isolate_for_local_isolate_, ThreadKind::kBackground);
27952801
UnparkedScope unparked_scope(&isolate);
27962802
LocalHandleScope handle_scope(isolate.heap());

src/flags/flags.cc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
#include <set>
1717
#include <sstream>
1818

19+
#include "src/base/fpu.h"
1920
#include "src/base/hashing.h"
2021
#include "src/base/lazy-instance.h"
2122
#include "src/base/platform/platform.h"
@@ -450,6 +451,9 @@ uint32_t ComputeFlagListHash() {
450451
std::ostringstream modified_args_as_string;
451452
if (COMPRESS_POINTERS_BOOL) modified_args_as_string << "ptr-compr";
452453
if (DEBUG_BOOL) modified_args_as_string << "debug";
454+
if (base::FPU::GetFlushDenormals()) {
455+
modified_args_as_string << "flush-denormals";
456+
}
453457

454458
#ifdef DEBUG
455459
// These two sets are used to check that we don't leave out any flags

0 commit comments

Comments
 (0)