Commit ce2a9e16 authored by Sigurd Schneider's avatar Sigurd Schneider Committed by Commit Bot

[turbofan] Add performance counters for speculation mode change

Bug: v8:7127, v8:7216
Change-Id: I57f8bc3f486c53b11475bd174961c4547bb07b04
Reviewed-on: https://chromium-review.googlesource.com/827073
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Reviewed-by: 's avatarBenedikt Meurer <bmeurer@chromium.org>
Reviewed-by: 's avatarMichael Hablich <hablich@chromium.org>
Cr-Commit-Position: refs/heads/master@{#50121}
parent ab38b03d
......@@ -1088,7 +1088,9 @@ class RuntimeCallTimerScope {
20) \
HR(wasm_lazy_compilation_throughput, V8.WasmLazyCompilationThroughput, 1, \
10000, 50) \
HR(compile_script_cache_behaviour, V8.CompileScript.CacheBehaviour, 0, 19, 20)
HR(compile_script_cache_behaviour, V8.CompileScript.CacheBehaviour, 0, 19, \
20) \
HR(speculation_mode_change, V8.SpeculationModeChange, 0, 1, 2)
#define HISTOGRAM_TIMER_LIST(HT) \
/* Garbage collection timers. */ \
......
......@@ -3860,8 +3860,13 @@ void TranslatedState::DoUpdateFeedback() {
if (!feedback_vector_handle_.is_null()) {
CHECK(!feedback_slot_.IsInvalid());
isolate()->CountUsage(v8::Isolate::kDeoptimizerDisableSpeculation);
isolate()->counters()->speculation_mode_change()->AddSample(
static_cast<int>(SpeculationModeChange::kSetSpeculationDisallow));
CallICNexus nexus(feedback_vector_handle_, feedback_slot_);
nexus.SetSpeculationMode(SpeculationMode::kDisallowSpeculation);
} else {
isolate()->counters()->speculation_mode_change()->AddSample(
static_cast<int>(SpeculationModeChange::kNoSpeculationModeChange));
}
}
......
......@@ -1041,6 +1041,11 @@ class DeoptimizedFrameInfo : public Malloced {
friend class Deoptimizer;
};
enum class SpeculationModeChange {
kNoSpeculationModeChange = 0,
kSetSpeculationDisallow = 1
};
} // namespace internal
} // namespace v8
......
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