Commit 6a6ef5c8 authored by Jakob Gruber's avatar Jakob Gruber Committed by Commit Bot

[compiler] Fix more tsan issues

- Allow pass/fail for all test-heap/LeakNativeContextVia* tests in
stress_concurrent_inlining mode.
- Don't capture stack locations in lambdas passed between threads.

Bug: v8:7790,v8:11650
Change-Id: I6c23b527d5f96f2f4b2354d16f39d832dea17e71
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2827895
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: 's avatarLeszek Swirski <leszeks@chromium.org>
Auto-Submit: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73974}
parent d4aafa40
......@@ -709,11 +709,9 @@
'test-cpu-profiler/TracingCpuProfiler': [PASS, FAIL],
# crbug.com/v8/11513: Flakily failing due to the additional compile task.
'test-heap/EnsureAllocationSiteDependentCodesProcessed': [PASS, FAIL],
'test-heap/LeakNativeContextViaMapProto': [PASS, FAIL],
'test-heap/LeakNativeContextVia*': [PASS, FAIL],
'test-heap/NewSpaceObjectsInOptimizedCode': [PASS, FAIL],
'test-heap/ObjectsInEagerlyDeoptimizedCodeAreWeak': [PASS, FAIL],
# crbug.com/v8/11650: Flakily failing after increased coverage.
'test-js-to-wasm/*': [PASS, FAIL],
}], # variant == stress_concurrent_inlining
]
......@@ -591,23 +591,25 @@ class FastJSWasmCallTester {
v8::Local<v8::Value> CompileRunWithJSWasmCallNodeObserver(
const std::string& js_code) {
// Note: Make sure to not capture stack locations (e.g. `this`) here since
// these lambdas are executed on another thread.
const auto test_mode = test_mode_;
compiler::ModificationObserver js_wasm_call_observer(
[](const compiler::Node* node) {
CHECK_EQ(compiler::IrOpcode::kJSCall, node->opcode());
},
[this](const compiler::Node* node,
const compiler::ObservableNodeState& old_state)
[test_mode](const compiler::Node* node,
const compiler::ObservableNodeState& old_state)
-> compiler::NodeObserver::Observation {
if (old_state.opcode() != node->opcode()) {
CHECK_EQ(compiler::IrOpcode::kJSCall, old_state.opcode());
// JS-to-Wasm inlining is disabled when targeting 32 bits if the
// Wasm function signature contains an I64.
if (test_mode_ == kJSToWasmInliningEnabled) {
CHECK_EQ(compiler::IrOpcode::kJSWasmCall, node->opcode());
} else {
CHECK_EQ(compiler::IrOpcode::kCall, node->opcode());
}
CHECK_EQ(test_mode == kJSToWasmInliningEnabled
? compiler::IrOpcode::kJSWasmCall
: compiler::IrOpcode::kCall,
node->opcode());
return compiler::NodeObserver::Observation::kStop;
}
......
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