Commit 4bbf78f9 authored by Ulan Degenbaev's avatar Ulan Degenbaev Committed by Commit Bot

Add a flag for flushing icache for embedded builtins

It will be used in a Finch experiment to evaluate if icache flushing
helps with crashes on certain CPUs.

Bug: chromium:889460
Change-Id: I1218ce93db001833e29fdeca8fde3e863e26dfdd
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2267297Reviewed-by: 's avatarJakob Gruber <jgruber@chromium.org>
Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68545}
parent 15e54593
......@@ -25,6 +25,7 @@
#include "src/builtins/constants-table-builder.h"
#include "src/codegen/assembler-inl.h"
#include "src/codegen/compilation-cache.h"
#include "src/codegen/flush-instruction-cache.h"
#include "src/common/ptr-compr.h"
#include "src/compiler-dispatcher/compiler-dispatcher.h"
#include "src/compiler-dispatcher/optimizing-compile-dispatcher.h"
......@@ -239,6 +240,10 @@ void Isolate::SetEmbeddedBlob(const uint8_t* blob, uint32_t blob_size) {
"cause is a debugging breakpoint set within builtin code.");
}
#endif // DEBUG
if (FLAG_experimental_flush_embedded_blob_icache) {
FlushInstructionCache(const_cast<uint8_t*>(blob), blob_size);
}
}
void Isolate::ClearEmbeddedBlob() {
......
......@@ -1337,6 +1337,8 @@ DEFINE_BOOL(
"includes arguments for each function call in the error stack frames array")
DEFINE_BOOL(adjust_os_scheduling_parameters, true,
"adjust OS specific scheduling params for the isolate")
DEFINE_BOOL(experimental_flush_embedded_blob_icache, false,
"Used in an experiment to evaluate icache flushing on certain CPUs")
// runtime.cc
DEFINE_BOOL(runtime_call_stats, false, "report runtime call counts and times")
......
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