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

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

Issue 227433004: Add runtime and native entry tags (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 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 | Annotate | Revision Log
« no previous file with comments | « runtime/vm/stub_code_x64.cc ('k') | runtime/vm/tags.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) 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_TAGS_H_ 5 #ifndef VM_TAGS_H_
6 #define VM_TAGS_H_ 6 #define VM_TAGS_H_
7 7
8 #include "vm/allocation.h" 8 #include "vm/allocation.h"
9 9
10 namespace dart { 10 namespace dart {
11 11
12 class Isolate; 12 class Isolate;
13 class JSONObject; 13 class JSONObject;
14 class RuntimeEntry;
14 15
15 #define VM_TAG_LIST(V) \ 16 #define VM_TAG_LIST(V) \
16 V(Idle) \ 17 V(Idle) \
17 V(VM) /* Catch all */ \ 18 V(VM) /* Catch all */ \
18 V(Compile) \ 19 V(Compile) \
19 V(Script) \ 20 V(Script) \
20 V(GCNewSpace) \ 21 V(GCNewSpace) \
21 V(GCOldSpace) \ 22 V(GCOldSpace) \
22 V(RuntimeNative) \ 23 V(Runtime) \
24 V(Native) \
23 25
24 26
25 class VMTag : public AllStatic { 27 class VMTag : public AllStatic {
26 public: 28 public:
27 enum VMTagId { 29 enum VMTagId {
28 kInvalidTagId = 0, 30 kInvalidTagId = 0,
29 #define DEFINE_VM_TAG_ID(tag) \ 31 #define DEFINE_VM_TAG_ID(tag) \
30 k##tag##TagId, 32 k##tag##TagId,
31 VM_TAG_LIST(DEFINE_VM_TAG_ID) 33 VM_TAG_LIST(DEFINE_VM_TAG_ID)
32 #undef DEFINE_VM_TAG_KIND 34 #undef DEFINE_VM_TAG_KIND
33 kNumVMTags, 35 kNumVMTags,
34 }; 36 };
35 37
36 static const char* TagName(uword id); 38 static const char* TagName(uword id);
39 static bool IsNativeEntryTag(uword id);
40
41 static bool IsRuntimeEntryTag(uword id);
42 static const char* RuntimeEntryTagName(uword id);
43
44 static void RegisterRuntimeEntry(RuntimeEntry* runtime_entry);
37 45
38 private: 46 private:
39 struct TagEntry { 47 struct TagEntry {
40 const char* name; 48 const char* name;
41 uword id; 49 uword id;
42 }; 50 };
43 static TagEntry entries_[]; 51 static TagEntry entries_[];
44 }; 52 };
45 53
46 54
(...skipping 19 matching lines...) Expand all
66 74
67 void PrintToJSONObject(JSONObject* obj); 75 void PrintToJSONObject(JSONObject* obj);
68 76
69 private: 77 private:
70 int64_t counters_[VMTag::kNumVMTags]; 78 int64_t counters_[VMTag::kNumVMTags];
71 }; 79 };
72 80
73 } // namespace dart 81 } // namespace dart
74 82
75 #endif // VM_TAGS_H_ 83 #endif // VM_TAGS_H_
OLDNEW
« no previous file with comments | « runtime/vm/stub_code_x64.cc ('k') | runtime/vm/tags.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698