- 22 Aug, 2019 1 commit
-
-
Sigurd Schneider authored
This CL adds a mechanism that prevents the RuntimeProfiler from triggering optimization of a function after %PrepareFunctionForOptimization has been called. This is useful to prevent flakiness in tests, as sometimes a function that already got deoptimized would receive a new code object from a concurrent compile that was triggered by a heuristic just in the right moment for the assertUnoptimized test to fail. For example, the following was happening: PrepareFunctionForOptimization [marking `testAdd` for optimized recompilation, reason: small function] [concurrently compiling method `testAdd` using TurboFan] [manually marking `testAdd` for non-concurrent optimization] [synchonously compiling method `testAdd` using TurboFan] [synchonously optimizing `testAdd` produced code object 0xAAAA - took 1.638 ms] Runtime_GetOptimizationStatus OPTIMIZED `testAdd` (code object 0xAAAA) DeoptimizeFunction `testAdd` with Code Object 0xAAAA [concurrently optimizing `testAdd` produced code object 0xBBBB - took 3.377 ms] Runtime_GetOptimizationStatus OPTIMIZED `testAdd` (code object 0xBBBB) Bug: v8:9563 Change-Id: Ia4c846aba95281589317d43b82383e70fe0a35f5 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1763546Reviewed-by: Ross McIlroy <rmcilroy@chromium.org> Reviewed-by: Yang Guo <yangguo@chromium.org> Commit-Queue: Sigurd Schneider <sigurds@chromium.org> Cr-Commit-Position: refs/heads/master@{#63343}
-
- 11 Jul, 2019 1 commit
-
-
Mythri A authored
With lazy feedback allocation and bytecode flushing we need to call %PrepareFunctionForOptimize before we call %OptimizeFunctionOnNextCall/ %OptimizeOsr. This cl: 1. Adds an additional state in pending optimized table to check if the optimization was triggered manually. 2. Changes the compilation pipeline to delete the entry from pending optimized table only if the optimization was triggered through %OptimizeFunctionOnNextCall / %OptimizeOsr. 3. Adds a check to enforce %PrepareFunctionForOptimize was called. 4. Adds a new run-time flag to only check in the d8 test runner. We don't want this check enabled in other cases like clusterfuzz that doesn't ensure %PrepareFunctionForOptimize is called. Bug: v8:8394, v8:8801, v8:9183 Change-Id: I9ae2b2da812e313c746b6df0b2da864c2ed5de51 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1664810 Commit-Queue: Mythri Alle <mythria@chromium.org> Reviewed-by: Michael Achenbach <machenbach@chromium.org> Reviewed-by: Ross McIlroy <rmcilroy@chromium.org> Cr-Commit-Position: refs/heads/master@{#62653}
-