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

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

Issue 2646443005: Track async causal stack traces (Closed)
Patch Set: rebase Created 3 years, 10 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/symbols.h ('k') | runtime/vm/thread.cc » ('j') | 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 #ifndef RUNTIME_VM_THREAD_H_ 5 #ifndef RUNTIME_VM_THREAD_H_
6 #define RUNTIME_VM_THREAD_H_ 6 #define RUNTIME_VM_THREAD_H_
7 7
8 #include "include/dart_api.h" 8 #include "include/dart_api.h"
9 #include "platform/assert.h" 9 #include "platform/assert.h"
10 #include "vm/atomic.h" 10 #include "vm/atomic.h"
(...skipping 26 matching lines...) Expand all
37 class LongJumpScope; 37 class LongJumpScope;
38 class Object; 38 class Object;
39 class OSThread; 39 class OSThread;
40 class JSONObject; 40 class JSONObject;
41 class PcDescriptors; 41 class PcDescriptors;
42 class RawBool; 42 class RawBool;
43 class RawObject; 43 class RawObject;
44 class RawCode; 44 class RawCode;
45 class RawError; 45 class RawError;
46 class RawGrowableObjectArray; 46 class RawGrowableObjectArray;
47 class RawStackTrace;
47 class RawString; 48 class RawString;
48 class RuntimeEntry; 49 class RuntimeEntry;
49 class Smi; 50 class Smi;
50 class StackResource; 51 class StackResource;
52 class StackTrace;
51 class String; 53 class String;
52 class TimelineStream; 54 class TimelineStream;
53 class TypeArguments; 55 class TypeArguments;
54 class TypeParameter; 56 class TypeParameter;
55 class Zone; 57 class Zone;
56 58
57 #define REUSABLE_HANDLE_LIST(V) \ 59 #define REUSABLE_HANDLE_LIST(V) \
58 V(AbstractType) \ 60 V(AbstractType) \
59 V(Array) \ 61 V(Array) \
60 V(Class) \ 62 V(Class) \
(...skipping 437 matching lines...) Expand 10 before | Expand all | Expand 10 after
498 } 500 }
499 501
500 uword resume_pc() const { return resume_pc_; } 502 uword resume_pc() const { return resume_pc_; }
501 void set_resume_pc(uword value) { resume_pc_ = value; } 503 void set_resume_pc(uword value) { resume_pc_ = value; }
502 static uword resume_pc_offset() { return OFFSET_OF(Thread, resume_pc_); } 504 static uword resume_pc_offset() { return OFFSET_OF(Thread, resume_pc_); }
503 505
504 RawError* sticky_error() const; 506 RawError* sticky_error() const;
505 void set_sticky_error(const Error& value); 507 void set_sticky_error(const Error& value);
506 void clear_sticky_error(); 508 void clear_sticky_error();
507 509
510 RawStackTrace* async_stack_trace() const;
511 void set_async_stack_trace(const StackTrace& stack_trace);
512 void set_raw_async_stack_trace(RawStackTrace* raw_stack_trace);
513 void clear_async_stack_trace();
514 static intptr_t async_stack_trace_offset() {
515 return OFFSET_OF(Thread, async_stack_trace_);
516 }
517
508 CompilerStats* compiler_stats() { return compiler_stats_; } 518 CompilerStats* compiler_stats() { return compiler_stats_; }
509 519
510 #if defined(DEBUG) 520 #if defined(DEBUG)
511 #define REUSABLE_HANDLE_SCOPE_ACCESSORS(object) \ 521 #define REUSABLE_HANDLE_SCOPE_ACCESSORS(object) \
512 void set_reusable_##object##_handle_scope_active(bool value) { \ 522 void set_reusable_##object##_handle_scope_active(bool value) { \
513 reusable_##object##_handle_scope_active_ = value; \ 523 reusable_##object##_handle_scope_active_ = value; \
514 } \ 524 } \
515 bool reusable_##object##_handle_scope_active() const { \ 525 bool reusable_##object##_handle_scope_active() const { \
516 return reusable_##object##_handle_scope_active_; \ 526 return reusable_##object##_handle_scope_active_; \
517 } 527 }
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
680 // We use only word-sized fields to avoid differences in struct packing on the 690 // We use only word-sized fields to avoid differences in struct packing on the
681 // different architectures. See also CheckOffsets in dart.cc. 691 // different architectures. See also CheckOffsets in dart.cc.
682 uword stack_limit_; 692 uword stack_limit_;
683 uword stack_overflow_flags_; 693 uword stack_overflow_flags_;
684 Isolate* isolate_; 694 Isolate* isolate_;
685 Heap* heap_; 695 Heap* heap_;
686 uword top_exit_frame_info_; 696 uword top_exit_frame_info_;
687 StoreBufferBlock* store_buffer_block_; 697 StoreBufferBlock* store_buffer_block_;
688 uword vm_tag_; 698 uword vm_tag_;
689 TaskKind task_kind_; 699 TaskKind task_kind_;
700 RawStackTrace* async_stack_trace_;
690 // State that is cached in the TLS for fast access in generated code. 701 // State that is cached in the TLS for fast access in generated code.
691 #define DECLARE_MEMBERS(type_name, member_name, expr, default_init_value) \ 702 #define DECLARE_MEMBERS(type_name, member_name, expr, default_init_value) \
692 type_name member_name; 703 type_name member_name;
693 CACHED_CONSTANTS_LIST(DECLARE_MEMBERS) 704 CACHED_CONSTANTS_LIST(DECLARE_MEMBERS)
694 #undef DECLARE_MEMBERS 705 #undef DECLARE_MEMBERS
695 706
696 #define DECLARE_MEMBERS(name) uword name##_entry_point_; 707 #define DECLARE_MEMBERS(name) uword name##_entry_point_;
697 RUNTIME_ENTRY_LIST(DECLARE_MEMBERS) 708 RUNTIME_ENTRY_LIST(DECLARE_MEMBERS)
698 #undef DECLARE_MEMBERS 709 #undef DECLARE_MEMBERS
699 710
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
805 // Disable thread interrupts. 816 // Disable thread interrupts.
806 class DisableThreadInterruptsScope : public StackResource { 817 class DisableThreadInterruptsScope : public StackResource {
807 public: 818 public:
808 explicit DisableThreadInterruptsScope(Thread* thread); 819 explicit DisableThreadInterruptsScope(Thread* thread);
809 ~DisableThreadInterruptsScope(); 820 ~DisableThreadInterruptsScope();
810 }; 821 };
811 822
812 } // namespace dart 823 } // namespace dart
813 824
814 #endif // RUNTIME_VM_THREAD_H_ 825 #endif // RUNTIME_VM_THREAD_H_
OLDNEW
« no previous file with comments | « runtime/vm/symbols.h ('k') | runtime/vm/thread.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698