Commit db2d98cd authored by Georg Neis's avatar Georg Neis Committed by Commit Bot

Introduce --trace-flush-bytecode

This prints a message whenever we discard compiled metadata of an SFI.
The message identifies the SFI. I've found this helpful when debugging.

Change-Id: Ib34266199ade2ef88a6bafe32295ab505ce7c899
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2324260Reviewed-by: 's avatarMythri Alle <mythria@chromium.org>
Commit-Queue: Mythri Alle <mythria@chromium.org>
Auto-Submit: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#69132}
parent 18350fc2
......@@ -1043,6 +1043,7 @@ DEFINE_BOOL(compact_code_space, true, "Compact code space on full collections")
DEFINE_BOOL(flush_bytecode, true,
"flush of bytecode when it has not been executed recently")
DEFINE_BOOL(stress_flush_bytecode, false, "stress bytecode flushing")
DEFINE_BOOL(trace_flush_bytecode, false, "trace bytecode flushing")
DEFINE_IMPLICATION(stress_flush_bytecode, flush_bytecode)
DEFINE_BOOL(use_marking_progress_bar, true,
"Use a progress bar to scan large objects in increments when "
......
......@@ -258,6 +258,13 @@ void SharedFunctionInfo::DiscardCompiledMetadata(
gc_notify_updated_slot) {
DisallowHeapAllocation no_gc;
if (is_compiled()) {
if (FLAG_trace_flush_bytecode) {
CodeTracer::Scope scope(GetIsolate()->GetCodeTracer());
PrintF(scope.file(), "[discarding compiled metadata for ");
ShortPrint(scope.file());
PrintF(scope.file(), "]\n");
}
HeapObject outer_scope_info;
if (scope_info().HasOuterScopeInfo()) {
outer_scope_info = scope_info().OuterScopeInfo();
......
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