| Index: runtime/vm/tags.cc
|
| diff --git a/runtime/vm/tags.cc b/runtime/vm/tags.cc
|
| index 30e284c96c04d445d1edfb175ff4497a3496095c..f1cd1e0901e42b98e0cc9f0456ab3f66cee85238 100644
|
| --- a/runtime/vm/tags.cc
|
| +++ b/runtime/vm/tags.cc
|
| @@ -7,8 +7,8 @@
|
| #include "vm/isolate.h"
|
| #include "vm/json_stream.h"
|
| #include "vm/native_entry.h"
|
| -#include "vm/runtime_entry.h"
|
| #include "vm/object.h"
|
| +#include "vm/runtime_entry.h"
|
|
|
| namespace dart {
|
|
|
| @@ -31,26 +31,21 @@ const char* VMTag::TagName(uword tag) {
|
| return entry.name;
|
| }
|
|
|
| -
|
| bool VMTag::IsNativeEntryTag(uword tag) {
|
| return (tag > kLastTagId) && !IsRuntimeEntryTag(tag);
|
| }
|
|
|
| -
|
| bool VMTag::IsDartTag(uword id) {
|
| return id == kDartTagId;
|
| }
|
|
|
| -
|
| bool VMTag::IsExitFrameTag(uword id) {
|
| return (id != 0) && !IsDartTag(id) && (id != kIdleTagId) &&
|
| (id != kVMTagId) && (id != kEmbedderTagId);
|
| }
|
|
|
| -
|
| static RuntimeEntry* runtime_entry_list = NULL;
|
|
|
| -
|
| bool VMTag::IsRuntimeEntryTag(uword id) {
|
| const RuntimeEntry* current = runtime_entry_list;
|
| while (current != NULL) {
|
| @@ -62,7 +57,6 @@ bool VMTag::IsRuntimeEntryTag(uword id) {
|
| return false;
|
| }
|
|
|
| -
|
| const char* VMTag::RuntimeEntryTagName(uword id) {
|
| const RuntimeEntry* current = runtime_entry_list;
|
| while (current != NULL) {
|
| @@ -74,14 +68,12 @@ const char* VMTag::RuntimeEntryTagName(uword id) {
|
| return NULL;
|
| }
|
|
|
| -
|
| void VMTag::RegisterRuntimeEntry(RuntimeEntry* runtime_entry) {
|
| ASSERT(runtime_entry != NULL);
|
| runtime_entry->set_next(runtime_entry_list);
|
| runtime_entry_list = runtime_entry;
|
| }
|
|
|
| -
|
| VMTag::TagEntry VMTag::entries_[] = {
|
| {
|
| "InvalidTag", kInvalidTagId,
|
| @@ -92,7 +84,6 @@ VMTag::TagEntry VMTag::entries_[] = {
|
| {"kNumVMTags", kNumVMTags},
|
| };
|
|
|
| -
|
| VMTagScope::VMTagScope(Thread* thread, uword tag, bool conditional_set)
|
| : StackResource(thread) {
|
| ASSERT(isolate() != NULL);
|
| @@ -102,20 +93,17 @@ VMTagScope::VMTagScope(Thread* thread, uword tag, bool conditional_set)
|
| }
|
| }
|
|
|
| -
|
| VMTagScope::~VMTagScope() {
|
| ASSERT(isolate() != NULL);
|
| thread()->set_vm_tag(previous_tag_);
|
| }
|
|
|
| -
|
| VMTagCounters::VMTagCounters() {
|
| for (intptr_t i = 0; i < VMTag::kNumVMTags; i++) {
|
| counters_[i] = 0;
|
| }
|
| }
|
|
|
| -
|
| void VMTagCounters::Increment(uword tag) {
|
| if (VMTag::IsRuntimeEntryTag(tag)) {
|
| counters_[VMTag::kRuntimeTagId]++;
|
| @@ -130,14 +118,12 @@ void VMTagCounters::Increment(uword tag) {
|
| counters_[tag]++;
|
| }
|
|
|
| -
|
| int64_t VMTagCounters::count(uword tag) {
|
| ASSERT(tag != VMTag::kInvalidTagId);
|
| ASSERT(tag < VMTag::kNumVMTags);
|
| return counters_[tag];
|
| }
|
|
|
| -
|
| #ifndef PRODUCT
|
| void VMTagCounters::PrintToJSONObject(JSONObject* obj) {
|
| if (!FLAG_support_service) {
|
| @@ -158,7 +144,6 @@ void VMTagCounters::PrintToJSONObject(JSONObject* obj) {
|
| }
|
| #endif // !PRODUCT
|
|
|
| -
|
| const char* UserTags::TagName(uword tag_id) {
|
| ASSERT(tag_id >= kUserTagIdOffset);
|
| ASSERT(tag_id < kUserTagIdOffset + kMaxUserTags);
|
| @@ -169,5 +154,4 @@ const char* UserTags::TagName(uword tag_id) {
|
| return label.ToCString();
|
| }
|
|
|
| -
|
| } // namespace dart
|
|
|