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

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
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 class RuntimeEntry;
siva 2014/04/10 17:58:22 Repeated again below, I guess it is not needed her
Cutch 2014/04/10 20:17:32 Done.
9 10
10 namespace dart { 11 namespace dart {
11 12
12 class Isolate; 13 class Isolate;
13 class JSONObject; 14 class JSONObject;
15 class RuntimeEntry;
16
14 17
15 #define VM_TAG_LIST(V) \ 18 #define VM_TAG_LIST(V) \
16 V(Idle) \ 19 V(Idle) \
17 V(VM) /* Catch all */ \ 20 V(VM) /* Catch all */ \
18 V(Compile) \ 21 V(Compile) \
19 V(Script) \ 22 V(Script) \
20 V(GCNewSpace) \ 23 V(GCNewSpace) \
21 V(GCOldSpace) \ 24 V(GCOldSpace) \
22 V(RuntimeNative) \ 25 V(Runtime) \
26 V(Native) \
23 27
24 28
25 class VMTag : public AllStatic { 29 class VMTag : public AllStatic {
26 public: 30 public:
27 enum VMTagId { 31 enum VMTagId {
28 kInvalidTagId = 0, 32 kInvalidTagId = 0,
29 #define DEFINE_VM_TAG_ID(tag) \ 33 #define DEFINE_VM_TAG_ID(tag) \
30 k##tag##TagId, 34 k##tag##TagId,
31 VM_TAG_LIST(DEFINE_VM_TAG_ID) 35 VM_TAG_LIST(DEFINE_VM_TAG_ID)
32 #undef DEFINE_VM_TAG_KIND 36 #undef DEFINE_VM_TAG_KIND
33 kNumVMTags, 37 kNumVMTags,
34 }; 38 };
35 39
36 static const char* TagName(uword id); 40 static const char* TagName(uword id);
41 static bool IsNativeEntryTag(uword id);
42
43 static bool IsRuntimeEntryTag(uword id);
44 static const char* RuntimeEntryTagName(uword id);
45
46 static void RegisterRuntimeEntry(const RuntimeEntry* runtime_entry);
37 47
38 private: 48 private:
39 struct TagEntry { 49 struct TagEntry {
40 const char* name; 50 const char* name;
41 uword id; 51 uword id;
42 }; 52 };
43 static TagEntry entries_[]; 53 static TagEntry entries_[];
44 }; 54 };
45 55
46 56
(...skipping 19 matching lines...) Expand all
66 76
67 void PrintToJSONObject(JSONObject* obj); 77 void PrintToJSONObject(JSONObject* obj);
68 78
69 private: 79 private:
70 int64_t counters_[VMTag::kNumVMTags]; 80 int64_t counters_[VMTag::kNumVMTags];
71 }; 81 };
72 82
73 } // namespace dart 83 } // namespace dart
74 84
75 #endif // VM_TAGS_H_ 85 #endif // VM_TAGS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698