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

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

Issue 1841213003: Move CompilerStats from isolate to thread. Aggregate stats. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: cleanup Created 4 years, 8 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
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 VM_THREAD_H_ 5 #ifndef VM_THREAD_H_
6 #define VM_THREAD_H_ 6 #define 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"
11 #include "vm/bitfield.h" 11 #include "vm/bitfield.h"
12 #include "vm/globals.h" 12 #include "vm/globals.h"
13 #include "vm/handles.h" 13 #include "vm/handles.h"
14 #include "vm/os_thread.h" 14 #include "vm/os_thread.h"
15 #include "vm/store_buffer.h" 15 #include "vm/store_buffer.h"
16 #include "vm/runtime_entry_list.h" 16 #include "vm/runtime_entry_list.h"
17 17
18 namespace dart { 18 namespace dart {
19 19
20 class AbstractType; 20 class AbstractType;
21 class ApiLocalScope; 21 class ApiLocalScope;
22 class Array; 22 class Array;
23 class CHA; 23 class CHA;
24 class Class; 24 class Class;
25 class Code; 25 class Code;
26 class CompilerStats;
26 class Error; 27 class Error;
27 class ExceptionHandlers; 28 class ExceptionHandlers;
28 class Field; 29 class Field;
29 class Function; 30 class Function;
30 class GrowableObjectArray; 31 class GrowableObjectArray;
31 class HandleScope; 32 class HandleScope;
32 class Heap; 33 class Heap;
33 class Instance; 34 class Instance;
34 class Isolate; 35 class Isolate;
35 class Library; 36 class Library;
(...skipping 400 matching lines...) Expand 10 before | Expand all | Expand 10 after
436 return OFFSET_OF(Thread, vm_tag_); 437 return OFFSET_OF(Thread, vm_tag_);
437 } 438 }
438 439
439 RawGrowableObjectArray* pending_functions(); 440 RawGrowableObjectArray* pending_functions();
440 void clear_pending_functions(); 441 void clear_pending_functions();
441 442
442 RawError* sticky_error() const; 443 RawError* sticky_error() const;
443 void set_sticky_error(const Error& value); 444 void set_sticky_error(const Error& value);
444 void clear_sticky_error(); 445 void clear_sticky_error();
445 446
447 CompilerStats* compiler_stats() { return compiler_stats_; }
448
446 #if defined(DEBUG) 449 #if defined(DEBUG)
447 #define REUSABLE_HANDLE_SCOPE_ACCESSORS(object) \ 450 #define REUSABLE_HANDLE_SCOPE_ACCESSORS(object) \
448 void set_reusable_##object##_handle_scope_active(bool value) { \ 451 void set_reusable_##object##_handle_scope_active(bool value) { \
449 reusable_##object##_handle_scope_active_ = value; \ 452 reusable_##object##_handle_scope_active_ = value; \
450 } \ 453 } \
451 bool reusable_##object##_handle_scope_active() const { \ 454 bool reusable_##object##_handle_scope_active() const { \
452 return reusable_##object##_handle_scope_active_; \ 455 return reusable_##object##_handle_scope_active_; \
453 } 456 }
454 REUSABLE_HANDLE_LIST(REUSABLE_HANDLE_SCOPE_ACCESSORS) 457 REUSABLE_HANDLE_LIST(REUSABLE_HANDLE_SCOPE_ACCESSORS)
455 #undef REUSABLE_HANDLE_SCOPE_ACCESSORS 458 #undef REUSABLE_HANDLE_SCOPE_ACCESSORS
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after
644 uint16_t deferred_interrupts_; 647 uint16_t deferred_interrupts_;
645 int32_t stack_overflow_count_; 648 int32_t stack_overflow_count_;
646 649
647 // Compiler state: 650 // Compiler state:
648 CHA* cha_; 651 CHA* cha_;
649 intptr_t deopt_id_; // Compilation specific counter. 652 intptr_t deopt_id_; // Compilation specific counter.
650 RawGrowableObjectArray* pending_functions_; 653 RawGrowableObjectArray* pending_functions_;
651 654
652 RawError* sticky_error_; 655 RawError* sticky_error_;
653 656
657 CompilerStats* compiler_stats_;
658
654 // Reusable handles support. 659 // Reusable handles support.
655 #define REUSABLE_HANDLE_FIELDS(object) \ 660 #define REUSABLE_HANDLE_FIELDS(object) \
656 object* object##_handle_; 661 object* object##_handle_;
657 REUSABLE_HANDLE_LIST(REUSABLE_HANDLE_FIELDS) 662 REUSABLE_HANDLE_LIST(REUSABLE_HANDLE_FIELDS)
658 #undef REUSABLE_HANDLE_FIELDS 663 #undef REUSABLE_HANDLE_FIELDS
659 664
660 #if defined(DEBUG) 665 #if defined(DEBUG)
661 #define REUSABLE_HANDLE_SCOPE_VARIABLE(object) \ 666 #define REUSABLE_HANDLE_SCOPE_VARIABLE(object) \
662 bool reusable_##object##_handle_scope_active_; 667 bool reusable_##object##_handle_scope_active_;
663 REUSABLE_HANDLE_LIST(REUSABLE_HANDLE_SCOPE_VARIABLE); 668 REUSABLE_HANDLE_LIST(REUSABLE_HANDLE_SCOPE_VARIABLE);
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
727 // Disable thread interrupts. 732 // Disable thread interrupts.
728 class DisableThreadInterruptsScope : public StackResource { 733 class DisableThreadInterruptsScope : public StackResource {
729 public: 734 public:
730 explicit DisableThreadInterruptsScope(Thread* thread); 735 explicit DisableThreadInterruptsScope(Thread* thread);
731 ~DisableThreadInterruptsScope(); 736 ~DisableThreadInterruptsScope();
732 }; 737 };
733 738
734 } // namespace dart 739 } // namespace dart
735 740
736 #endif // VM_THREAD_H_ 741 #endif // VM_THREAD_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698