| Index: runtime/vm/tags.cc
|
| diff --git a/runtime/vm/tags.cc b/runtime/vm/tags.cc
|
| index 68f9c51c0deebf39451d744b05f6cd31af837a8b..199bf2631b8b7f20d75e36cfa764ce14abc95b16 100644
|
| --- a/runtime/vm/tags.cc
|
| +++ b/runtime/vm/tags.cc
|
| @@ -8,6 +8,7 @@
|
| #include "vm/json_stream.h"
|
| #include "vm/native_entry.h"
|
| #include "vm/runtime_entry.h"
|
| +#include "vm/object.h"
|
|
|
| namespace dart {
|
|
|
| @@ -138,4 +139,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
|
|
|