Chromium Code Reviews| Index: runtime/vm/tags.cc |
| diff --git a/runtime/vm/tags.cc b/runtime/vm/tags.cc |
| index f05aa22cc77cf3b478de034d91fd3d78e946f146..2f50b1e35171ade63669c26a8758cf1c2ce85ddf 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(tag.label()); |
|
siva
2014/04/09 21:32:01
isolate, tag.label()) here as you already use that
Cutch
2014/04/09 22:27:20
Done.
|
| + return label.ToCString(); |
| +} |
| + |
| + |
| } // namespace dart |