Skip to content

Commit

Permalink
[test][compiler] Add flag --stress-concurrent-inlining-attach-code
Browse files Browse the repository at this point in the history
It works like --stress-concurrent-inlining but instead of throwing
away the produced code it attaches it to the function as usual. This
mode will be used for fuzzing.

Bug: v8:7790
Change-Id: I010cbb7ab7ec29fccfa561eaff72e66c7444239f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3140602
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/main@{#76669}
  • Loading branch information
GeorgNeis authored and V8 LUCI CQ committed Sep 6, 2021
1 parent 9b3745f commit 062b86e
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
6 changes: 5 additions & 1 deletion src/codegen/compiler.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1179,9 +1179,13 @@ void SpawnDuplicateConcurrentJobForStressTesting(Isolate* isolate,
isolate->concurrent_recompilation_enabled() &&
mode == ConcurrencyMode::kNotConcurrent &&
isolate->node_observer() == nullptr);
GetOptimizedCodeResultHandling result_handling =
FLAG_stress_concurrent_inlining_attach_code
? GetOptimizedCodeResultHandling::kDefault
: GetOptimizedCodeResultHandling::kDiscardForTesting;
USE(GetOptimizedCode(isolate, function, ConcurrencyMode::kConcurrent,
code_kind, BytecodeOffset::None(), nullptr,
GetOptimizedCodeResultHandling::kDiscardForTesting));
result_handling));
}

bool FailAndClearPendingException(Isolate* isolate) {
Expand Down
9 changes: 7 additions & 2 deletions src/flags/flag-definitions.h
Original file line number Diff line number Diff line change
Expand Up @@ -713,12 +713,17 @@ DEFINE_INT(concurrent_recompilation_delay, 0,
"artificial compilation delay in ms")
DEFINE_BOOL(concurrent_inlining, true,
"run optimizing compiler's inlining phase on a separate thread")
DEFINE_BOOL(stress_concurrent_inlining, false,
"makes concurrent inlining more likely to trigger in tests")
DEFINE_BOOL(
stress_concurrent_inlining, false,
"create additional concurrent optimization jobs but throw away result")
DEFINE_IMPLICATION(stress_concurrent_inlining, concurrent_inlining)
DEFINE_NEG_IMPLICATION(stress_concurrent_inlining, lazy_feedback_allocation)
DEFINE_WEAK_VALUE_IMPLICATION(stress_concurrent_inlining, interrupt_budget,
15 * KB)
DEFINE_BOOL(stress_concurrent_inlining_attach_code, false,
"create additional concurrent optimization jobs")
DEFINE_IMPLICATION(stress_concurrent_inlining_attach_code,
stress_concurrent_inlining)
DEFINE_INT(max_serializer_nesting, 25,
"maximum levels for nesting child serializers")
DEFINE_BOOL(trace_heap_broker_verbose, false,
Expand Down

0 comments on commit 062b86e

Please sign in to comment.