| Index: runtime/vm/tags.cc
|
| diff --git a/runtime/vm/tags.cc b/runtime/vm/tags.cc
|
| index f05aa22cc77cf3b478de034d91fd3d78e946f146..403bce842cdb278db95a22f84cea02424de985df 100644
|
| --- a/runtime/vm/tags.cc
|
| +++ b/runtime/vm/tags.cc
|
| @@ -6,6 +6,8 @@
|
|
|
| #include "vm/isolate.h"
|
| #include "vm/json_stream.h"
|
| +#include "vm/object.h"
|
| +#include "vm/object_store.h"
|
|
|
| namespace dart {
|
|
|
| @@ -78,4 +80,17 @@ void VMTagCounters::PrintToJSONObject(JSONObject* obj) {
|
| }
|
| }
|
|
|
| +
|
| +const char* UserTags::TagName(uword tag_address) {
|
| + ASSERT(tag_address >= kUserTagIdOffset);
|
| + ASSERT(tag_address < kUserTagIdOffset + kMaxUserTags);
|
| + Isolate* isolate = Isolate::Current();
|
| + const UserTag& tag =
|
| + UserTag::Handle(isolate, UserTag::FindTagById(tag_address));
|
| + ASSERT(!tag.IsNull());
|
| + const String& label = String::Handle(isolate, tag.label());
|
| + return label.ToCString();
|
| +}
|
| +
|
| +
|
| } // namespace dart
|
|
|