зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1599416 - Part 7: Remove unused lazyArrayBuffers table. r=mgaudet
Entries are never added to `lazyArrayBuffers` resp. `lazyArrayBuffers` isn't even allocated anymore. Differential Revision: https://phabricator.services.mozilla.com/D54711 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
b576e1d462
Коммит
7818859fb9
|
@ -730,7 +730,6 @@ struct RealmStats {
|
|||
MACRO(Other, MallocHeap, realmObject) \
|
||||
MACRO(Other, MallocHeap, realmTables) \
|
||||
MACRO(Other, MallocHeap, innerViewsTable) \
|
||||
MACRO(Other, MallocHeap, lazyArrayBuffersTable) \
|
||||
MACRO(Other, MallocHeap, objectMetadataTable) \
|
||||
MACRO(Other, MallocHeap, savedStacksSet) \
|
||||
MACRO(Other, MallocHeap, varNamesSet) \
|
||||
|
|
|
@ -1515,13 +1515,6 @@ uint8_t* TypedObject::typedMemBase() const {
|
|||
|
||||
bool TypedObject::isAttached() const {
|
||||
if (is<InlineTransparentTypedObject>()) {
|
||||
ObjectWeakMap* table = ObjectRealm::get(this).lazyArrayBuffers.get();
|
||||
if (table) {
|
||||
JSObject* buffer = table->lookup(this);
|
||||
if (buffer) {
|
||||
return !buffer->as<ArrayBufferObject>().isDetached();
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
if (is<InlineOpaqueTypedObject>()) {
|
||||
|
|
|
@ -240,9 +240,9 @@ static void StatsRealmCallback(JSContext* cx, void* data,
|
|||
&realmStats.typeInferenceArrayTypeTables,
|
||||
&realmStats.typeInferenceObjectTypeTables, &realmStats.realmObject,
|
||||
&realmStats.realmTables, &realmStats.innerViewsTable,
|
||||
&realmStats.lazyArrayBuffersTable, &realmStats.objectMetadataTable,
|
||||
&realmStats.savedStacksSet, &realmStats.varNamesSet,
|
||||
&realmStats.nonSyntacticLexicalScopesTable, &realmStats.jitRealm);
|
||||
&realmStats.objectMetadataTable, &realmStats.savedStacksSet,
|
||||
&realmStats.varNamesSet, &realmStats.nonSyntacticLexicalScopesTable,
|
||||
&realmStats.jitRealm);
|
||||
}
|
||||
|
||||
static void StatsArenaCallback(JSRuntime* rt, void* data, gc::Arena* arena,
|
||||
|
|
|
@ -276,10 +276,6 @@ void Realm::traceGlobal(JSTracer* trc) {
|
|||
}
|
||||
|
||||
void ObjectRealm::trace(JSTracer* trc) {
|
||||
if (lazyArrayBuffers) {
|
||||
lazyArrayBuffers->trace(trc);
|
||||
}
|
||||
|
||||
if (objectMetadataTable) {
|
||||
objectMetadataTable->trace(trc);
|
||||
}
|
||||
|
@ -324,10 +320,6 @@ void Realm::traceRoots(JSTracer* trc,
|
|||
}
|
||||
|
||||
void ObjectRealm::finishRoots() {
|
||||
if (lazyArrayBuffers) {
|
||||
lazyArrayBuffers->clear();
|
||||
}
|
||||
|
||||
if (objectMetadataTable) {
|
||||
objectMetadataTable->clear();
|
||||
}
|
||||
|
@ -739,14 +731,10 @@ void Realm::collectCodeCoverageInfo(JSScript* script, const char* name) {
|
|||
|
||||
void ObjectRealm::addSizeOfExcludingThis(
|
||||
mozilla::MallocSizeOf mallocSizeOf, size_t* innerViewsArg,
|
||||
size_t* lazyArrayBuffersArg, size_t* objectMetadataTablesArg,
|
||||
size_t* objectMetadataTablesArg,
|
||||
size_t* nonSyntacticLexicalEnvironmentsArg) {
|
||||
*innerViewsArg += innerViews.sizeOfExcludingThis(mallocSizeOf);
|
||||
|
||||
if (lazyArrayBuffers) {
|
||||
*lazyArrayBuffersArg += lazyArrayBuffers->sizeOfIncludingThis(mallocSizeOf);
|
||||
}
|
||||
|
||||
if (objectMetadataTable) {
|
||||
*objectMetadataTablesArg +=
|
||||
objectMetadataTable->sizeOfIncludingThis(mallocSizeOf);
|
||||
|
@ -761,10 +749,9 @@ void ObjectRealm::addSizeOfExcludingThis(
|
|||
void Realm::addSizeOfIncludingThis(
|
||||
mozilla::MallocSizeOf mallocSizeOf, size_t* tiAllocationSiteTables,
|
||||
size_t* tiArrayTypeTables, size_t* tiObjectTypeTables, size_t* realmObject,
|
||||
size_t* realmTables, size_t* innerViewsArg, size_t* lazyArrayBuffersArg,
|
||||
size_t* objectMetadataTablesArg, size_t* savedStacksSet,
|
||||
size_t* varNamesSet, size_t* nonSyntacticLexicalEnvironmentsArg,
|
||||
size_t* jitRealm) {
|
||||
size_t* realmTables, size_t* innerViewsArg, size_t* objectMetadataTablesArg,
|
||||
size_t* savedStacksSet, size_t* varNamesSet,
|
||||
size_t* nonSyntacticLexicalEnvironmentsArg, size_t* jitRealm) {
|
||||
*realmObject += mallocSizeOf(this);
|
||||
objectGroups_.addSizeOfExcludingThis(mallocSizeOf, tiAllocationSiteTables,
|
||||
tiArrayTypeTables, tiObjectTypeTables,
|
||||
|
@ -772,7 +759,7 @@ void Realm::addSizeOfIncludingThis(
|
|||
wasm.addSizeOfExcludingThis(mallocSizeOf, realmTables);
|
||||
|
||||
objects_.addSizeOfExcludingThis(mallocSizeOf, innerViewsArg,
|
||||
lazyArrayBuffersArg, objectMetadataTablesArg,
|
||||
objectMetadataTablesArg,
|
||||
nonSyntacticLexicalEnvironmentsArg);
|
||||
|
||||
*savedStacksSet += savedStacks_.sizeOfExcludingThis(mallocSizeOf);
|
||||
|
|
|
@ -248,11 +248,6 @@ class ObjectRealm {
|
|||
// Map from array buffers to views sharing that storage.
|
||||
JS::WeakCache<js::InnerViewTable> innerViews;
|
||||
|
||||
// Inline transparent typed objects do not initially have an array buffer,
|
||||
// but can have that buffer created lazily if it is accessed later. This
|
||||
// table manages references from such typed objects to their buffers.
|
||||
js::UniquePtr<js::ObjectWeakMap> lazyArrayBuffers;
|
||||
|
||||
// Keep track of the metadata objects which can be associated with each JS
|
||||
// object. Both keys and values are in this realm.
|
||||
js::UniquePtr<js::ObjectWeakMap> objectMetadataTable;
|
||||
|
@ -276,7 +271,6 @@ class ObjectRealm {
|
|||
|
||||
void addSizeOfExcludingThis(mozilla::MallocSizeOf mallocSizeOf,
|
||||
size_t* innerViewsArg,
|
||||
size_t* lazyArrayBuffersArg,
|
||||
size_t* objectMetadataTablesArg,
|
||||
size_t* nonSyntacticLexicalEnvironmentsArg);
|
||||
|
||||
|
@ -467,13 +461,15 @@ class JS::Realm : public JS::shadow::Realm {
|
|||
void destroy(JSFreeOp* fop);
|
||||
void clearTables();
|
||||
|
||||
void addSizeOfIncludingThis(
|
||||
mozilla::MallocSizeOf mallocSizeOf, size_t* tiAllocationSiteTables,
|
||||
size_t* tiArrayTypeTables, size_t* tiObjectTypeTables,
|
||||
size_t* realmObject, size_t* realmTables, size_t* innerViewsArg,
|
||||
size_t* lazyArrayBuffersArg, size_t* objectMetadataTablesArg,
|
||||
size_t* savedStacksSet, size_t* varNamesSet,
|
||||
size_t* nonSyntacticLexicalEnvironmentsArg, size_t* jitRealm);
|
||||
void addSizeOfIncludingThis(mozilla::MallocSizeOf mallocSizeOf,
|
||||
size_t* tiAllocationSiteTables,
|
||||
size_t* tiArrayTypeTables,
|
||||
size_t* tiObjectTypeTables, size_t* realmObject,
|
||||
size_t* realmTables, size_t* innerViewsArg,
|
||||
size_t* objectMetadataTablesArg,
|
||||
size_t* savedStacksSet, size_t* varNamesSet,
|
||||
size_t* nonSyntacticLexicalEnvironmentsArg,
|
||||
size_t* jitRealm);
|
||||
|
||||
JS::Zone* zone() { return zone_; }
|
||||
const JS::Zone* zone() const { return zone_; }
|
||||
|
|
|
@ -1895,10 +1895,6 @@ static void ReportRealmStats(const JS::RealmStats& realmStats,
|
|||
realmStats.innerViewsTable,
|
||||
"The table for array buffer inner views.");
|
||||
|
||||
ZRREPORT_BYTES(realmJSPathPrefix + NS_LITERAL_CSTRING("lazy-array-buffers"),
|
||||
realmStats.lazyArrayBuffersTable,
|
||||
"The table for typed object lazy array buffers.");
|
||||
|
||||
ZRREPORT_BYTES(
|
||||
realmJSPathPrefix + NS_LITERAL_CSTRING("object-metadata"),
|
||||
realmStats.objectMetadataTable,
|
||||
|
|
Загрузка…
Ссылка в новой задаче