| Index: runtime/vm/profiler.cc
|
| diff --git a/runtime/vm/profiler.cc b/runtime/vm/profiler.cc
|
| index 0d1ad844bc3b698fe986a23820e2c7a9577dc22e..a4e5bad03e4f2ca61fd299ec281d9f0a0648ffbc 100644
|
| --- a/runtime/vm/profiler.cc
|
| +++ b/runtime/vm/profiler.cc
|
| @@ -290,6 +290,11 @@ bool ReturnAddressLocator::LocateReturnAddress(uword* return_address) {
|
| ASSERT(return_address != NULL);
|
| return false;
|
| }
|
| +#elif defined(TARGET_ARCH_DBC)
|
| +bool ReturnAddressLocator::LocateReturnAddress(uword* return_address) {
|
| + ASSERT(return_address != NULL);
|
| + return false;
|
| +}
|
| #else
|
| #error ReturnAddressLocator implementation missing for this architecture.
|
| #endif
|
| @@ -833,7 +838,7 @@ static Sample* SetupSample(Thread* thread,
|
| Sample* sample = sample_buffer->ReserveSample();
|
| sample->Init(isolate, OS::GetCurrentMonotonicMicros(), tid);
|
| uword vm_tag = thread->vm_tag();
|
| -#if defined(USING_SIMULATOR)
|
| +#if defined(USING_SIMULATOR) && !defined(TARGET_ARCH_DBC)
|
| // When running in the simulator, the runtime entry function address
|
| // (stored as the vm tag) is the address of a redirect function.
|
| // Attempt to find the real runtime entry function address and use that.
|
| @@ -940,6 +945,11 @@ void Profiler::SampleAllocation(Thread* thread, intptr_t cid) {
|
|
|
| void Profiler::SampleThread(Thread* thread,
|
| const InterruptedThreadState& state) {
|
| +#if defined(TARGET_ARCH_DBC)
|
| + // TODO(vegorov) implement simulator stack sampling.
|
| + return;
|
| +#endif
|
| +
|
| ASSERT(thread != NULL);
|
| OSThread* os_thread = thread->os_thread();
|
| ASSERT(os_thread != NULL);
|
| @@ -958,13 +968,15 @@ void Profiler::SampleThread(Thread* thread,
|
| uintptr_t sp = 0;
|
| uintptr_t fp = state.fp;
|
| uintptr_t pc = state.pc;
|
| -#if defined(USING_SIMULATOR)
|
| +#if defined(USING_SIMULATOR) && !defined(TARGET_ARCH_DBC)
|
| Simulator* simulator = NULL;
|
| #endif
|
|
|
| if (in_dart_code) {
|
| // If we're in Dart code, use the Dart stack pointer.
|
| -#if defined(USING_SIMULATOR)
|
| +#if defined(TARGET_ARCH_DBC)
|
| + UNIMPLEMENTED();
|
| +#elif defined(USING_SIMULATOR)
|
| simulator = isolate->simulator();
|
| sp = simulator->get_register(SPREG);
|
| fp = simulator->get_register(FPREG);
|
|
|