16MallocGrowableArray<const char*> UserTags::subscribed_tags_(4);
17Mutex* UserTags::subscribed_tags_lock_ =
nullptr;
22 if (native_reverse_lookup !=
nullptr) {
23 return reinterpret_cast<const char*
>(native_reverse_lookup);
25 return "Unknown native entry";
28 ASSERT(runtime_entry_name !=
nullptr);
29 return runtime_entry_name;
33 const TagEntry& entry = entries_[tag];
43 return (
id != 0) && !
IsDartTag(
id) && (
id != kIdleTagId) &&
44 (
id != kVMTagId) && (
id != kEmbedderTagId);
52 const void* address =
reinterpret_cast<const void*
>(
id);
54#define CHECK_RUNTIME_ADDRESS(n) \
55 if (address == k##n##RuntimeEntry.function()) \
56 return k##n##RuntimeEntry.name();
58#undef CHECK_RUNTIME_ADDRESS
60#define CHECK_LEAF_RUNTIME_ADDRESS(type, n, ...) \
61 if (address == k##n##RuntimeEntry.function()) \
62 return k##n##RuntimeEntry.name();
64#undef CHECK_LEAF_RUNTIME_ADDRESS
69const VMTag::TagEntry VMTag::entries_[] = {
74#define DEFINE_VM_TAG_ENTRY(tag) {"" #tag, k##tag##TagId},
76#undef DEFINE_VM_TAG_ENTRY
77 {
"kNumVMTags", kNumVMTags},
85 if (conditional_set) {
109 counters_[VMTag::kRuntimeTagId]++;
112 counters_[VMTag::kNativeTagId]++;
119 return counters_[tag];
155 for (intptr_t
i = 0;
i < subscribed_tags_.
length(); ++
i) {
156 if (strcmp(tag, subscribed_tags_.
At(
i)) == 0) {
166 for (intptr_t
i = 0;
i < subscribed_tags_.
length(); ++
i) {
167 if (strcmp(tag, subscribed_tags_.
At(
i)) == 0) {
168 free(
const_cast<char*
>(subscribed_tags_.
At(
i)));
179 for (intptr_t
i = 0;
i < subscribed_tags_.
length(); ++
i) {
180 if (strcmp(tag, subscribed_tags_.
At(
i)) == 0) {
188 subscribed_tags_lock_ =
new Mutex();
194 for (intptr_t
i = 0;
i < subscribed_tags_.
length(); ++
i) {
195 free(
const_cast<char*
>(subscribed_tags_.
At(
i)));
197 subscribed_tags_.
Clear();
199 delete subscribed_tags_lock_;
200 subscribed_tags_lock_ =
nullptr;
const T & At(intptr_t index) const
void RemoveAt(intptr_t i)
void AddValue64(int64_t i) const
void AddValue(bool b) const
static const uint8_t * ResolveSymbol(uword pc)
static const char * ToCString(Thread *thread, StringPtr ptr)
IsolateGroup * isolate_group() const
void set_vm_tag(uword tag)
static Thread * Current()
Isolate * isolate() const
static UserTagPtr FindTagById(const Isolate *isolate, uword tag_id)
static char * StrDup(const char *s)
void Increment(uword tag)
void PrintToJSONObject(JSONObject *obj)
static bool IsExitFrameTag(uword id)
static const char * RuntimeEntryTagName(uword id)
static bool IsNativeEntryTag(uword id)
static bool IsRuntimeEntryTag(uword id)
static const char * TagName(uword id)
static bool IsDartTag(uword id)
#define RUNTIME_ENTRY_LIST(V)
#define LEAF_RUNTIME_ENTRY_LIST(V)