Skip to content

Commit 3a46c47

Browse files
rmacnak-googleCommit Queue
authored andcommitted
[vm] Don't feed the simulator's registers into ProfilerNativeStackWalker.
Default the simulators to --no-profile-vm same as the non-simulators. TEST=vm/dart/stream_timeline_to_test Bug: #61811 Change-Id: I26cf956e240ffa542f3d52345e680404bc2d2021 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/457840 Commit-Queue: Ryan Macnak <[email protected]> Reviewed-by: Alexander Aprelev <[email protected]>
1 parent fc60a05 commit 3a46c47

File tree

2 files changed

+2
-6
lines changed

2 files changed

+2
-6
lines changed

runtime/tests/vm/dart/gc/splay_test.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
// VMOptions=--profiler --no_load_cse --no_dead_store_elimination
3636
// VMOptions=--profiler --test_il_serialization
3737
// VMOptions=--profiler --dontneed_on_sweep
38-
// VMOptions=--profiler --sim_buffer_memory
38+
// VMOptions=--sim_buffer_memory
3939

4040
import "splay_common.dart";
4141

runtime/vm/profiler.cc

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -46,11 +46,7 @@ DEFINE_FLAG(int,
4646
max_profile_depth,
4747
Sample::kPCArraySizeInWords* kMaxSamplesPerTick,
4848
"Maximum number stack frames walked. Minimum 2. Maximum 255.");
49-
#if defined(DART_INCLUDE_SIMULATOR)
50-
DEFINE_FLAG(bool, profile_vm, true, "Always collect native stack traces.");
51-
#else
5249
DEFINE_FLAG(bool, profile_vm, false, "Always collect native stack traces.");
53-
#endif
5450
DEFINE_FLAG(bool,
5551
profile_vm_allocation,
5652
false,
@@ -1478,7 +1474,7 @@ void Profiler::SampleThread(Thread* thread,
14781474
if (in_dart_code) {
14791475
// If we're in Dart code, use the Dart stack pointer.
14801476
#if defined(DART_INCLUDE_SIMULATOR)
1481-
if (FLAG_use_simulator) {
1477+
if (FLAG_use_simulator && !FLAG_profile_vm) {
14821478
Simulator* simulator = isolate->simulator();
14831479
sp = simulator->get_register(SPREG);
14841480
fp = simulator->get_register(FPREG);

0 commit comments

Comments
 (0)