| OLD | NEW |
| 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, 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 #include "vm/tags.h" | 5 #include "vm/tags.h" |
| 6 | 6 |
| 7 #include "vm/isolate.h" | 7 #include "vm/isolate.h" |
| 8 #include "vm/json_stream.h" | 8 #include "vm/json_stream.h" |
| 9 #include "vm/native_entry.h" | 9 #include "vm/native_entry.h" |
| 10 #include "vm/runtime_entry.h" | 10 #include "vm/runtime_entry.h" |
| (...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 138 for (intptr_t i = 1; i < VMTag::kNumVMTags; i++) { | 138 for (intptr_t i = 1; i < VMTag::kNumVMTags; i++) { |
| 139 arr.AddValue64(counters_[i]); | 139 arr.AddValue64(counters_[i]); |
| 140 } | 140 } |
| 141 } | 141 } |
| 142 } | 142 } |
| 143 | 143 |
| 144 | 144 |
| 145 const char* UserTags::TagName(uword tag_id) { | 145 const char* UserTags::TagName(uword tag_id) { |
| 146 ASSERT(tag_id >= kUserTagIdOffset); | 146 ASSERT(tag_id >= kUserTagIdOffset); |
| 147 ASSERT(tag_id < kUserTagIdOffset + kMaxUserTags); | 147 ASSERT(tag_id < kUserTagIdOffset + kMaxUserTags); |
| 148 Isolate* isolate = Isolate::Current(); | 148 Zone* zone = Thread::Current()->zone(); |
| 149 const UserTag& tag = | 149 const UserTag& tag = |
| 150 UserTag::Handle(isolate, UserTag::FindTagById(tag_id)); | 150 UserTag::Handle(zone, UserTag::FindTagById(tag_id)); |
| 151 ASSERT(!tag.IsNull()); | 151 ASSERT(!tag.IsNull()); |
| 152 const String& label = String::Handle(isolate, tag.label()); | 152 const String& label = String::Handle(zone, tag.label()); |
| 153 return label.ToCString(); | 153 return label.ToCString(); |
| 154 } | 154 } |
| 155 | 155 |
| 156 | 156 |
| 157 } // namespace dart | 157 } // namespace dart |
| OLD | NEW |