[vm] Remove unnecessary check for compaction from the profiler.

The PC marker slots are transiently invalid during a compaction, but the profiler's stack walker no longer uses them, as they are completely absent in bare instructions mode.

TEST=ci
Change-Id: I3dba373ccccaba48e6dcc2b01d48e5e75620a4db
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/284744
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
This commit is contained in:
Ryan Macnak 2023-02-24 03:39:05 +00:00 committed by Commit Queue
parent 789a5061ac
commit 8949974caf
6 changed files with 48 additions and 65 deletions

View file

@ -9,30 +9,30 @@
// objects, and between marked and unmarked objects.
// VMOptions=
// VMOptions=--no_concurrent_mark --no_concurrent_sweep
// VMOptions=--no_concurrent_mark --concurrent_sweep
// VMOptions=--no_concurrent_mark --use_compactor
// VMOptions=--no_concurrent_mark --use_compactor --force_evacuation
// VMOptions=--concurrent_mark --no_concurrent_sweep
// VMOptions=--concurrent_mark --concurrent_sweep
// VMOptions=--concurrent_mark --use_compactor
// VMOptions=--concurrent_mark --use_compactor --force_evacuation
// VMOptions=--scavenger_tasks=0
// VMOptions=--scavenger_tasks=1
// VMOptions=--scavenger_tasks=2
// VMOptions=--scavenger_tasks=3
// VMOptions=--verify_before_gc
// VMOptions=--verify_after_gc
// VMOptions=--verify_before_gc --verify_after_gc
// VMOptions=--verify_store_buffer
// VMOptions=--verify_after_marking
// VMOptions=--stress_write_barrier_elimination
// VMOptions=--old_gen_heap_size=100
// VMOptions=--mark_when_idle
// VMOptions=--no_load_cse
// VMOptions=--no_dead_store_elimination
// VMOptions=--no_load_cse --no_dead_store_elimination
// VMOptions=--test_il_serialization
// VMOptions=--profiler --no_concurrent_mark --no_concurrent_sweep
// VMOptions=--profiler --no_concurrent_mark --concurrent_sweep
// VMOptions=--profiler --no_concurrent_mark --use_compactor
// VMOptions=--profiler --no_concurrent_mark --use_compactor --force_evacuation
// VMOptions=--profiler --concurrent_mark --no_concurrent_sweep
// VMOptions=--profiler --concurrent_mark --concurrent_sweep
// VMOptions=--profiler --concurrent_mark --use_compactor
// VMOptions=--profiler --concurrent_mark --use_compactor --force_evacuation
// VMOptions=--profiler --scavenger_tasks=0
// VMOptions=--profiler --scavenger_tasks=1
// VMOptions=--profiler --scavenger_tasks=2
// VMOptions=--profiler --scavenger_tasks=3
// VMOptions=--profiler --verify_before_gc
// VMOptions=--profiler --verify_after_gc
// VMOptions=--profiler --verify_before_gc --verify_after_gc
// VMOptions=--profiler --verify_store_buffer
// VMOptions=--profiler --verify_after_marking
// VMOptions=--profiler --stress_write_barrier_elimination
// VMOptions=--profiler --old_gen_heap_size=100
// VMOptions=--profiler --mark_when_idle
// VMOptions=--profiler --no_load_cse
// VMOptions=--profiler --no_dead_store_elimination
// VMOptions=--profiler --no_load_cse --no_dead_store_elimination
// VMOptions=--profiler --test_il_serialization
import "splay_common.dart";

View file

@ -13,30 +13,30 @@
// @dart=2.9
// VMOptions=
// VMOptions=--no_concurrent_mark --no_concurrent_sweep
// VMOptions=--no_concurrent_mark --concurrent_sweep
// VMOptions=--no_concurrent_mark --use_compactor
// VMOptions=--no_concurrent_mark --use_compactor --force_evacuation
// VMOptions=--concurrent_mark --no_concurrent_sweep
// VMOptions=--concurrent_mark --concurrent_sweep
// VMOptions=--concurrent_mark --use_compactor
// VMOptions=--concurrent_mark --use_compactor --force_evacuation
// VMOptions=--scavenger_tasks=0
// VMOptions=--scavenger_tasks=1
// VMOptions=--scavenger_tasks=2
// VMOptions=--scavenger_tasks=3
// VMOptions=--verify_before_gc
// VMOptions=--verify_after_gc
// VMOptions=--verify_before_gc --verify_after_gc
// VMOptions=--verify_store_buffer
// VMOptions=--verify_after_marking
// VMOptions=--stress_write_barrier_elimination
// VMOptions=--old_gen_heap_size=100
// VMOptions=--mark_when_idle
// VMOptions=--no_load_cse
// VMOptions=--no_dead_store_elimination
// VMOptions=--no_load_cse --no_dead_store_elimination
// VMOptions=--test_il_serialization
// VMOptions=--profiler --no_concurrent_mark --no_concurrent_sweep
// VMOptions=--profiler --no_concurrent_mark --concurrent_sweep
// VMOptions=--profiler --no_concurrent_mark --use_compactor
// VMOptions=--profiler --no_concurrent_mark --use_compactor --force_evacuation
// VMOptions=--profiler --concurrent_mark --no_concurrent_sweep
// VMOptions=--profiler --concurrent_mark --concurrent_sweep
// VMOptions=--profiler --concurrent_mark --use_compactor
// VMOptions=--profiler --concurrent_mark --use_compactor --force_evacuation
// VMOptions=--profiler --scavenger_tasks=0
// VMOptions=--profiler --scavenger_tasks=1
// VMOptions=--profiler --scavenger_tasks=2
// VMOptions=--profiler --scavenger_tasks=3
// VMOptions=--profiler --verify_before_gc
// VMOptions=--profiler --verify_after_gc
// VMOptions=--profiler --verify_before_gc --verify_after_gc
// VMOptions=--profiler --verify_store_buffer
// VMOptions=--profiler --verify_after_marking
// VMOptions=--profiler --stress_write_barrier_elimination
// VMOptions=--profiler --old_gen_heap_size=100
// VMOptions=--profiler --mark_when_idle
// VMOptions=--profiler --no_load_cse
// VMOptions=--profiler --no_dead_store_elimination
// VMOptions=--profiler --no_load_cse --no_dead_store_elimination
// VMOptions=--profiler --test_il_serialization
import "splay_common.dart";

View file

@ -1206,10 +1206,8 @@ void PageSpace::ConcurrentSweep(IsolateGroup* isolate_group) {
}
void PageSpace::Compact(Thread* thread) {
thread->isolate_group()->set_compaction_in_progress(true);
GCCompactor compactor(thread, heap_);
compactor.Compact(pages_, &freelists_[Page::kData], &pages_lock_);
thread->isolate_group()->set_compaction_in_progress(false);
if (FLAG_verify_after_gc) {
OS::PrintErr("Verifying after compacting...");

View file

@ -753,14 +753,6 @@ class IsolateGroup : public IntrusiveDListEntry<IsolateGroup> {
void VisitObjectIdRingPointers(ObjectPointerVisitor* visitor);
void VisitWeakPersistentHandles(HandleVisitor* visitor);
bool compaction_in_progress() const {
return CompactionInProgressBit::decode(isolate_group_flags_);
}
void set_compaction_in_progress(bool value) {
isolate_group_flags_ =
CompactionInProgressBit::update(value, isolate_group_flags_);
}
// In precompilation we finalize all regular classes before compiling.
bool all_classes_finalized() const {
return AllClassesFinalizedBit::decode(isolate_group_flags_);
@ -807,7 +799,6 @@ class IsolateGroup : public IntrusiveDListEntry<IsolateGroup> {
#define ISOLATE_GROUP_FLAG_BITS(V) \
V(AllClassesFinalized) \
V(CompactionInProgress) \
V(EnableAsserts) \
V(HasAttemptedReload) \
V(NullSafety) \

View file

@ -12933,7 +12933,6 @@ ClassPtr Object::clazz() const {
if ((raw_value & kSmiTagMask) == kSmiTag) {
return Smi::Class();
}
ASSERT(!IsolateGroup::Current()->compaction_in_progress());
return IsolateGroup::Current()->class_table()->At(ptr()->GetClassId());
}

View file

@ -1533,11 +1533,6 @@ void Profiler::SampleThread(Thread* thread,
SampleThreadSingleFrame(thread, sample, pc);
return;
}
if (isolate->group()->compaction_in_progress()) {
// The Dart stack isn't fully walkable.
SampleThreadSingleFrame(thread, sample, pc);
return;
}
}
uword stack_lower = 0;