| 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 23 matching lines...) Expand all Loading... |
| 34 | 34 |
| 35 class VMTag : public AllStatic { | 35 class VMTag : public AllStatic { |
| 36 public: | 36 public: |
| 37 enum VMTagId { | 37 enum VMTagId { |
| 38 kInvalidTagId = 0, | 38 kInvalidTagId = 0, |
| 39 #define DEFINE_VM_TAG_ID(tag) \ | 39 #define DEFINE_VM_TAG_ID(tag) \ |
| 40 k##tag##TagId, | 40 k##tag##TagId, |
| 41 VM_TAG_LIST(DEFINE_VM_TAG_ID) | 41 VM_TAG_LIST(DEFINE_VM_TAG_ID) |
| 42 #undef DEFINE_VM_TAG_KIND | 42 #undef DEFINE_VM_TAG_KIND |
| 43 kNumVMTags, | 43 kNumVMTags, |
| 44 // |
| 45 // All tags below |kNumVMTags| are special meta-data tags and do not |
| 46 // indicate the state of the VM during a sample. |
| 47 // |
| 44 kRootTagId, // Special tag used as root of all profiles. | 48 kRootTagId, // Special tag used as root of all profiles. |
| 45 kTruncatedTagId, // Special tag used to indicate a truncated call stack. | 49 kTruncatedTagId, // Special tag used to indicate a truncated call stack. |
| 46 // ProfileInfo tags. | 50 // Code transition tags (used by unit tests). |
| 47 kNoneCodeTagId, | 51 kNoneCodeTagId, |
| 48 kOptimizedCodeTagId, | 52 kOptimizedCodeTagId, |
| 49 kUnoptimizedCodeTagId, | 53 kUnoptimizedCodeTagId, |
| 50 kNativeCodeTagId, | 54 kNativeCodeTagId, |
| 51 kInlineStartCodeTagId, | 55 kInlineStartCodeTagId, |
| 52 kInlineEndCodeTagId, | 56 kInlineEndCodeTagId, |
| 53 kLastTagId, | 57 kLastTagId, |
| 54 }; | 58 }; |
| 55 | 59 |
| 56 static bool IsVMTag(uword id) { | 60 static bool IsVMTag(uword id) { |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 110 static bool IsUserTag(uword tag_id) { | 114 static bool IsUserTag(uword tag_id) { |
| 111 return (tag_id >= kUserTagIdOffset) && | 115 return (tag_id >= kUserTagIdOffset) && |
| 112 (tag_id < kUserTagIdOffset + kMaxUserTags); | 116 (tag_id < kUserTagIdOffset + kMaxUserTags); |
| 113 } | 117 } |
| 114 }; | 118 }; |
| 115 | 119 |
| 116 | 120 |
| 117 } // namespace dart | 121 } // namespace dart |
| 118 | 122 |
| 119 #endif // VM_TAGS_H_ | 123 #endif // VM_TAGS_H_ |
| OLD | NEW |