47 {
48 auto isolate_group = thread->isolate_group();
49 SafepointMutexLocker ml(isolate_group->megamorphic_table_mutex());
50
51 StackZone zone(thread);
56 isolate_group->object_store()->megamorphic_cache_table());
57 if (
table.IsNull())
return;
58 intptr_t max_size = 0;
59 for (intptr_t
i = 0;
i <
table.Length();
i++) {
61 buckets =
cache.buckets();
64 if (buckets.Length() > max_size) {
65 max_size = buckets.Length();
66 }
67 }
70
71 intptr_t* probe_counts = new intptr_t[max_size];
72 intptr_t entry_count = 0;
73 intptr_t max_probe_count = 0;
74 for (intptr_t
i = 0;
i < max_size;
i++) {
76 }
77 for (intptr_t
i = 0;
i <
table.Length();
i++) {
79 buckets =
cache.buckets();
80 intptr_t mask =
cache.mask();
81 intptr_t capacity = mask + 1;
82 for (intptr_t j = 0; j < capacity; j++) {
83 intptr_t class_id =
86 intptr_t probe_count = 0;
87 intptr_t probe_index =
89 intptr_t probe_cid;
90 while (true) {
91 probe_count++;
92 probe_cid =
94 if (probe_cid == class_id) {
95 break;
96 }
97 probe_index = (probe_index + 1) & mask;
98 }
99 probe_counts[probe_count]++;
100 if (probe_count > max_probe_count) {
101 max_probe_count = probe_count;
102 }
103 entry_count++;
104 }
105 }
106 }
107 intptr_t cumulative_entries = 0;
108 for (intptr_t
i = 0;
i <= max_probe_count;
i++) {
109 cumulative_entries += probe_counts[
i];
112 static_cast<double>(cumulative_entries) /
113 static_cast<double>(entry_count));
114 }
115 delete[] probe_counts;
116}
static intptr_t InstanceSize()
static constexpr intptr_t kSpreadFactor
static intptr_t InstanceSize()
static void static void PrintErr(const char *format,...) PRINTF_ATTRIBUTE(1
static ObjectPtr RawCast(ObjectPtr obj)
it will be possible to load the file into Perfetto s trace viewer disable asset Prevents usage of any non test fonts unless they were explicitly Loaded via prefetched default font Indicates whether the embedding started a prefetch of the default font manager before creating the engine run In non interactive keep the shell running after the Dart script has completed enable serial On low power devices with low core running concurrent GC tasks on threads can cause them to contend with the UI thread which could potentially lead to jank This option turns off all concurrent GC activities domain network JSON encoded network policy per domain This overrides the DisallowInsecureConnections switch Embedder can specify whether to allow or disallow insecure connections at a domain level old gen heap size