| OLD | NEW |
| 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 { |
| (...skipping 18 matching lines...) Expand all Loading... |
| 29 | 29 |
| 30 class VMTag : public AllStatic { | 30 class VMTag : public AllStatic { |
| 31 public: | 31 public: |
| 32 enum VMTagId { | 32 enum VMTagId { |
| 33 kInvalidTagId = 0, | 33 kInvalidTagId = 0, |
| 34 #define DEFINE_VM_TAG_ID(tag) \ | 34 #define DEFINE_VM_TAG_ID(tag) \ |
| 35 k##tag##TagId, | 35 k##tag##TagId, |
| 36 VM_TAG_LIST(DEFINE_VM_TAG_ID) | 36 VM_TAG_LIST(DEFINE_VM_TAG_ID) |
| 37 #undef DEFINE_VM_TAG_KIND | 37 #undef DEFINE_VM_TAG_KIND |
| 38 kNumVMTags, | 38 kNumVMTags, |
| 39 kRootTagId, // Special tag used as root of all profiles. |
| 40 kTruncatedTagId, // Special tag used to indicate a truncated call stack. |
| 41 kLastTagId, |
| 39 }; | 42 }; |
| 40 | 43 |
| 41 static bool IsVMTag(uword id) { | 44 static bool IsVMTag(uword id) { |
| 42 return (id != kInvalidTagId) && (id < kNumVMTags); | 45 return (id != kInvalidTagId) && (id < kNumVMTags); |
| 43 } | 46 } |
| 44 static const char* TagName(uword id); | 47 static const char* TagName(uword id); |
| 45 static bool IsNativeEntryTag(uword id); | 48 static bool IsNativeEntryTag(uword id); |
| 46 | 49 |
| 47 static bool IsRuntimeEntryTag(uword id); | 50 static bool IsRuntimeEntryTag(uword id); |
| 48 static const char* RuntimeEntryTagName(uword id); | 51 static const char* RuntimeEntryTagName(uword id); |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 95 static bool IsUserTag(uword tag_id) { | 98 static bool IsUserTag(uword tag_id) { |
| 96 return (tag_id >= kUserTagIdOffset) && | 99 return (tag_id >= kUserTagIdOffset) && |
| 97 (tag_id < kUserTagIdOffset + kMaxUserTags); | 100 (tag_id < kUserTagIdOffset + kMaxUserTags); |
| 98 } | 101 } |
| 99 }; | 102 }; |
| 100 | 103 |
| 101 | 104 |
| 102 } // namespace dart | 105 } // namespace dart |
| 103 | 106 |
| 104 #endif // VM_TAGS_H_ | 107 #endif // VM_TAGS_H_ |
| OLD | NEW |