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

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

Issue 336683003: Light-weight stats counters for experiments. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 6 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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_ISOLATE_H_ 5 #ifndef VM_ISOLATE_H_
6 #define VM_ISOLATE_H_ 6 #define VM_ISOLATE_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 "platform/thread.h" 10 #include "platform/thread.h"
11 #include "vm/base_isolate.h" 11 #include "vm/base_isolate.h"
12 #include "vm/class_table.h" 12 #include "vm/class_table.h"
13 #include "vm/counters.h"
13 #include "vm/handles.h" 14 #include "vm/handles.h"
14 #include "vm/megamorphic_cache_table.h" 15 #include "vm/megamorphic_cache_table.h"
15 #include "vm/random.h" 16 #include "vm/random.h"
16 #include "vm/store_buffer.h" 17 #include "vm/store_buffer.h"
17 #include "vm/tags.h" 18 #include "vm/tags.h"
18 #include "vm/trace_buffer.h" 19 #include "vm/trace_buffer.h"
19 #include "vm/timer.h" 20 #include "vm/timer.h"
20 21
21 namespace dart { 22 namespace dart {
22 23
(...skipping 512 matching lines...) Expand 10 before | Expand all | Expand 10 after
535 536
536 #define REUSABLE_HANDLE(object) \ 537 #define REUSABLE_HANDLE(object) \
537 object& object##Handle() const { \ 538 object& object##Handle() const { \
538 return *object##_handle_; \ 539 return *object##_handle_; \
539 } 540 }
540 REUSABLE_HANDLE_LIST(REUSABLE_HANDLE) 541 REUSABLE_HANDLE_LIST(REUSABLE_HANDLE)
541 #undef REUSABLE_HANDLE 542 #undef REUSABLE_HANDLE
542 543
543 static void VisitIsolates(IsolateVisitor* visitor); 544 static void VisitIsolates(IsolateVisitor* visitor);
544 545
546 Counters* counters() { return &counters_; }
547
545 private: 548 private:
546 Isolate(); 549 Isolate();
547 550
548 void BuildName(const char* name_prefix); 551 void BuildName(const char* name_prefix);
549 void PrintInvokedFunctions(); 552 void PrintInvokedFunctions();
550 553
551 void ProfileIdle(); 554 void ProfileIdle();
552 555
553 void set_user_tag(uword tag) { 556 void set_user_tag(uword tag) {
554 user_tag_ = tag; 557 user_tag_ = tag;
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
610 613
611 IsolateProfilerData* profiler_data_; 614 IsolateProfilerData* profiler_data_;
612 Mutex profiler_data_mutex_; 615 Mutex profiler_data_mutex_;
613 InterruptableThreadState* thread_state_; 616 InterruptableThreadState* thread_state_;
614 617
615 VMTagCounters vm_tag_counters_; 618 VMTagCounters vm_tag_counters_;
616 uword user_tag_; 619 uword user_tag_;
617 RawGrowableObjectArray* tag_table_; 620 RawGrowableObjectArray* tag_table_;
618 RawUserTag* current_tag_; 621 RawUserTag* current_tag_;
619 622
623 Counters counters_;
624
620 // Isolate list next pointer. 625 // Isolate list next pointer.
621 Isolate* next_; 626 Isolate* next_;
622 627
623 // Reusable handles support. 628 // Reusable handles support.
624 #define REUSABLE_HANDLE_FIELDS(object) \ 629 #define REUSABLE_HANDLE_FIELDS(object) \
625 object* object##_handle_; 630 object* object##_handle_;
626 REUSABLE_HANDLE_LIST(REUSABLE_HANDLE_FIELDS) 631 REUSABLE_HANDLE_LIST(REUSABLE_HANDLE_FIELDS)
627 #undef REUSABLE_HANDLE_FIELDS 632 #undef REUSABLE_HANDLE_FIELDS
628 633
629 #if defined(DEBUG) 634 #if defined(DEBUG)
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
751 char* script_url_; 756 char* script_url_;
752 char* library_url_; 757 char* library_url_;
753 char* class_name_; 758 char* class_name_;
754 char* function_name_; 759 char* function_name_;
755 char* exception_callback_name_; 760 char* exception_callback_name_;
756 }; 761 };
757 762
758 } // namespace dart 763 } // namespace dart
759 764
760 #endif // VM_ISOLATE_H_ 765 #endif // VM_ISOLATE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698