Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(100)

Side by Side Diff: runtime/vm/tags.cc

Issue 1851293005: Improve CPU Profile View (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « runtime/vm/tags.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 19 matching lines...) Expand all
30 ASSERT(entry.id == tag); 30 ASSERT(entry.id == tag);
31 return entry.name; 31 return entry.name;
32 } 32 }
33 33
34 34
35 bool VMTag::IsNativeEntryTag(uword tag) { 35 bool VMTag::IsNativeEntryTag(uword tag) {
36 return (tag > kLastTagId) && !IsRuntimeEntryTag(tag); 36 return (tag > kLastTagId) && !IsRuntimeEntryTag(tag);
37 } 37 }
38 38
39 39
40 bool VMTag::IsDartTag(uword id) {
41 return id == kDartTagId;
42 }
43
44
45 bool VMTag::IsExitFrameTag(uword id) {
46 return (id != 0) && !IsDartTag(id) && (id != kIdleTagId) &&
47 (id != kVMTagId) && (id != kEmbedderTagId);
48 }
49
50
40 static RuntimeEntry* runtime_entry_list = NULL; 51 static RuntimeEntry* runtime_entry_list = NULL;
41 52
42 53
43 bool VMTag::IsRuntimeEntryTag(uword id) { 54 bool VMTag::IsRuntimeEntryTag(uword id) {
44 const RuntimeEntry* current = runtime_entry_list; 55 const RuntimeEntry* current = runtime_entry_list;
45 while (current != NULL) { 56 while (current != NULL) {
46 if (reinterpret_cast<uword>(current->function()) == id) { 57 if (reinterpret_cast<uword>(current->function()) == id) {
47 return true; 58 return true;
48 } 59 }
49 current = current->next(); 60 current = current->next();
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
151 Zone* zone = Thread::Current()->zone(); 162 Zone* zone = Thread::Current()->zone();
152 const UserTag& tag = 163 const UserTag& tag =
153 UserTag::Handle(zone, UserTag::FindTagById(tag_id)); 164 UserTag::Handle(zone, UserTag::FindTagById(tag_id));
154 ASSERT(!tag.IsNull()); 165 ASSERT(!tag.IsNull());
155 const String& label = String::Handle(zone, tag.label()); 166 const String& label = String::Handle(zone, tag.label());
156 return label.ToCString(); 167 return label.ToCString();
157 } 168 }
158 169
159 170
160 } // namespace dart 171 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/tags.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698