Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(12)

Side by Side Diff: runtime/vm/thread.cc

Issue 2229553005: Use log prints for simulation tracing and fix --disassemble-stubs. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « runtime/vm/simulator_mips.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include "vm/thread.h" 5 #include "vm/thread.h"
6 6
7 #include "vm/compiler_stats.h" 7 #include "vm/compiler_stats.h"
8 #include "vm/dart_api_state.h" 8 #include "vm/dart_api_state.h"
9 #include "vm/growable_array.h" 9 #include "vm/growable_array.h"
10 #include "vm/isolate.h" 10 #include "vm/isolate.h"
(...skipping 624 matching lines...) Expand 10 before | Expand all | Expand 10 after
635 ASSERT((expr)->IsVMHeapObject()); \ 635 ASSERT((expr)->IsVMHeapObject()); \
636 if (object.raw() == expr) return Thread::member_name##offset(); 636 if (object.raw() == expr) return Thread::member_name##offset();
637 CACHED_VM_OBJECTS_LIST(COMPUTE_OFFSET) 637 CACHED_VM_OBJECTS_LIST(COMPUTE_OFFSET)
638 #undef COMPUTE_OFFSET 638 #undef COMPUTE_OFFSET
639 UNREACHABLE(); 639 UNREACHABLE();
640 return -1; 640 return -1;
641 } 641 }
642 642
643 643
644 bool Thread::ObjectAtOffset(intptr_t offset, Object* object) { 644 bool Thread::ObjectAtOffset(intptr_t offset, Object* object) {
645 if (Isolate::Current() == Dart::vm_isolate()) {
646 // --disassemble-stubs runs before all the references through
647 // thread have targets
648 return false;
649 }
650
645 #define COMPUTE_OFFSET(type_name, member_name, expr, default_init_value) \ 651 #define COMPUTE_OFFSET(type_name, member_name, expr, default_init_value) \
646 if (Thread::member_name##offset() == offset) { \ 652 if (Thread::member_name##offset() == offset) { \
647 *object = expr; \ 653 *object = expr; \
648 return true; \ 654 return true; \
649 } 655 }
650 CACHED_VM_OBJECTS_LIST(COMPUTE_OFFSET) 656 CACHED_VM_OBJECTS_LIST(COMPUTE_OFFSET)
651 #undef COMPUTE_OFFSET 657 #undef COMPUTE_OFFSET
652 return false; 658 return false;
653 } 659 }
654 660
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
748 754
749 DisableThreadInterruptsScope::~DisableThreadInterruptsScope() { 755 DisableThreadInterruptsScope::~DisableThreadInterruptsScope() {
750 if (thread() != NULL) { 756 if (thread() != NULL) {
751 OSThread* os_thread = thread()->os_thread(); 757 OSThread* os_thread = thread()->os_thread();
752 ASSERT(os_thread != NULL); 758 ASSERT(os_thread != NULL);
753 os_thread->EnableThreadInterrupts(); 759 os_thread->EnableThreadInterrupts();
754 } 760 }
755 } 761 }
756 762
757 } // namespace dart 763 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/simulator_mips.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698