Bug 1573817: Remove unused seenBytes parameters from misc wasm memory accounting methods; r=luke
authorBenjamin Bouvier <benj@benj.me>
Wed, 14 Aug 2019 18:54:27 +0000
changeset 488466 44087ad30d0f68217396ceb93ef9110ccafc38cf
parent 488465 c1e8e7a3928ca1a22d096248f77415751cc9c34f
child 488467 d03dae246c889522f5f83aefdc05c2dd02e445ce
push id36444
push userccoroiu@mozilla.com
push dateFri, 16 Aug 2019 16:24:18 +0000
treeherdermozilla-central@8a9e9189cd98 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersluke
bugs1573817
milestone70.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1573817: Remove unused seenBytes parameters from misc wasm memory accounting methods; r=luke Differential Revision: https://phabricator.services.mozilla.com/D41959
js/src/vm/MemoryMetrics.cpp
js/src/wasm/WasmDebug.cpp
js/src/wasm/WasmDebug.h
js/src/wasm/WasmInstance.cpp
js/src/wasm/WasmInstance.h
js/src/wasm/WasmModule.cpp
js/src/wasm/WasmModule.h
--- a/js/src/vm/MemoryMetrics.cpp
+++ b/js/src/vm/MemoryMetrics.cpp
@@ -178,17 +178,16 @@ NotableScriptSourceInfo::NotableScriptSo
 typedef HashSet<ScriptSource*, DefaultHasher<ScriptSource*>, SystemAllocPolicy>
     SourceSet;
 
 struct StatsClosure {
   RuntimeStats* rtStats;
   ObjectPrivateVisitor* opv;
   SourceSet seenSources;
   wasm::Metadata::SeenSet wasmSeenMetadata;
-  wasm::ShareableBytes::SeenSet wasmSeenBytes;
   wasm::Code::SeenSet wasmSeenCode;
   wasm::Table::SeenSet wasmSeenTables;
   bool anonymize;
 
   StatsClosure(RuntimeStats* rt, ObjectPrivateVisitor* v, bool anon)
       : rtStats(rt), opv(v), anonymize(anon) {}
 };
 
@@ -350,29 +349,28 @@ static void StatsCellCallback(JSRuntime*
       // These classes require special handling due to shared resources which
       // we must be careful not to report twice.
       if (obj->is<WasmModuleObject>()) {
         const wasm::Module& module = obj->as<WasmModuleObject>().module();
         if (ScriptSource* ss = module.metadata().maybeScriptSource()) {
           CollectScriptSourceStats<granularity>(closure, ss);
         }
         module.addSizeOfMisc(rtStats->mallocSizeOf_, &closure->wasmSeenMetadata,
-                             &closure->wasmSeenBytes, &closure->wasmSeenCode,
+                             &closure->wasmSeenCode,
                              &info.objectsNonHeapCodeWasm,
                              &info.objectsMallocHeapMisc);
       } else if (obj->is<WasmInstanceObject>()) {
         wasm::Instance& instance = obj->as<WasmInstanceObject>().instance();
         if (ScriptSource* ss = instance.metadata().maybeScriptSource()) {
           CollectScriptSourceStats<granularity>(closure, ss);
         }
         instance.addSizeOfMisc(
             rtStats->mallocSizeOf_, &closure->wasmSeenMetadata,
-            &closure->wasmSeenBytes, &closure->wasmSeenCode,
-            &closure->wasmSeenTables, &info.objectsNonHeapCodeWasm,
-            &info.objectsMallocHeapMisc);
+            &closure->wasmSeenCode, &closure->wasmSeenTables,
+            &info.objectsNonHeapCodeWasm, &info.objectsMallocHeapMisc);
       }
 
       realmStats.classInfo.add(info);
 
       const JSClass* clasp = obj->getClass();
       const char* className = clasp->name;
       AddClassInfo(granularity, realmStats, className, info);
 
--- a/js/src/wasm/WasmDebug.cpp
+++ b/js/src/wasm/WasmDebug.cpp
@@ -450,16 +450,14 @@ bool DebugState::getSourceMappingURL(JSC
     }
     result.set(str);
   }
   return true;
 }
 
 void DebugState::addSizeOfMisc(MallocSizeOf mallocSizeOf,
                                Metadata::SeenSet* seenMetadata,
-                               ShareableBytes::SeenSet* seenBytes,
                                Code::SeenSet* seenCode, size_t* code,
                                size_t* data) const {
   code_->addSizeOfMiscIfNotSeen(mallocSizeOf, seenMetadata, seenCode, code,
                                 data);
-  module_->addSizeOfMisc(mallocSizeOf, seenMetadata, seenBytes, seenCode, code,
-                         data);
+  module_->addSizeOfMisc(mallocSizeOf, seenMetadata, seenCode, code, data);
 }
--- a/js/src/wasm/WasmDebug.h
+++ b/js/src/wasm/WasmDebug.h
@@ -132,17 +132,16 @@ class DebugState {
 
   uint32_t funcToCodeRangeIndex(uint32_t funcIndex) const {
     return metadata(Tier::Debug).funcToCodeRange[funcIndex];
   }
 
   // about:memory reporting:
 
   void addSizeOfMisc(MallocSizeOf mallocSizeOf, Metadata::SeenSet* seenMetadata,
-                     ShareableBytes::SeenSet* seenBytes,
                      Code::SeenSet* seenCode, size_t* code, size_t* data) const;
 };
 
 typedef UniquePtr<DebugState> UniqueDebugState;
 
 }  // namespace wasm
 }  // namespace js
 
--- a/js/src/wasm/WasmInstance.cpp
+++ b/js/src/wasm/WasmInstance.cpp
@@ -1998,26 +1998,25 @@ WasmBreakpointSite* Instance::getOrCreat
 
 void Instance::destroyBreakpointSite(JSFreeOp* fop, uint32_t offset) {
   MOZ_ASSERT(debugEnabled());
   return debug().destroyBreakpointSite(fop, this, offset);
 }
 
 void Instance::addSizeOfMisc(MallocSizeOf mallocSizeOf,
                              Metadata::SeenSet* seenMetadata,
-                             ShareableBytes::SeenSet* seenBytes,
                              Code::SeenSet* seenCode,
                              Table::SeenSet* seenTables, size_t* code,
                              size_t* data) const {
   *data += mallocSizeOf(this);
   *data += mallocSizeOf(tlsData_.get());
   for (const SharedTable& table : tables_) {
     *data += table->sizeOfIncludingThisIfNotSeen(mallocSizeOf, seenTables);
   }
 
   if (maybeDebug_) {
-    maybeDebug_->addSizeOfMisc(mallocSizeOf, seenMetadata, seenBytes, seenCode,
-                               code, data);
+    maybeDebug_->addSizeOfMisc(mallocSizeOf, seenMetadata, seenCode, code,
+                               data);
   }
 
   code_->addSizeOfMiscIfNotSeen(mallocSizeOf, seenMetadata, seenCode, code,
                                 data);
 }
--- a/js/src/wasm/WasmInstance.h
+++ b/js/src/wasm/WasmInstance.h
@@ -169,17 +169,16 @@ class Instance {
 
   JSString* createDisplayURL(JSContext* cx);
   WasmBreakpointSite* getOrCreateBreakpointSite(JSContext* cx, uint32_t offset);
   void destroyBreakpointSite(JSFreeOp* fop, uint32_t offset);
 
   // about:memory reporting:
 
   void addSizeOfMisc(MallocSizeOf mallocSizeOf, Metadata::SeenSet* seenMetadata,
-                     ShareableBytes::SeenSet* seenBytes,
                      Code::SeenSet* seenCode, Table::SeenSet* seenTables,
                      size_t* code, size_t* data) const;
 
  public:
   // Functions to be called directly from wasm code.
   static int32_t callImport_void(Instance*, int32_t, int32_t, uint64_t*);
   static int32_t callImport_i32(Instance*, int32_t, int32_t, uint64_t*);
   static int32_t callImport_i64(Instance*, int32_t, int32_t, uint64_t*);
--- a/js/src/wasm/WasmModule.cpp
+++ b/js/src/wasm/WasmModule.cpp
@@ -410,17 +410,16 @@ RefPtr<JS::WasmModule> wasm::Deserialize
 
   // The public interface is effectively const.
   return RefPtr<JS::WasmModule>(const_cast<Module*>(module.get()));
 }
 
 /* virtual */
 void Module::addSizeOfMisc(MallocSizeOf mallocSizeOf,
                            Metadata::SeenSet* seenMetadata,
-                           ShareableBytes::SeenSet* seenBytes,
                            Code::SeenSet* seenCode, size_t* code,
                            size_t* data) const {
   code_->addSizeOfMiscIfNotSeen(mallocSizeOf, seenMetadata, seenCode, code,
                                 data);
   *data += mallocSizeOf(this) +
            SizeOfVectorExcludingThis(imports_, mallocSizeOf) +
            SizeOfVectorExcludingThis(exports_, mallocSizeOf) +
            SizeOfVectorExcludingThis(dataSegments_, mallocSizeOf) +
--- a/js/src/wasm/WasmModule.h
+++ b/js/src/wasm/WasmModule.h
@@ -209,17 +209,16 @@ class Module : public JS::WasmModule {
 
   // JS API and JS::WasmModule implementation:
 
   JSObject* createObject(JSContext* cx) override;
 
   // about:memory reporting:
 
   void addSizeOfMisc(MallocSizeOf mallocSizeOf, Metadata::SeenSet* seenMetadata,
-                     ShareableBytes::SeenSet* seenBytes,
                      Code::SeenSet* seenCode, size_t* code, size_t* data) const;
 
   // GC malloc memory tracking:
 
   void initGCMallocBytesExcludingCode();
   size_t gcMallocBytesExcludingCode() const {
     return gcMallocBytesExcludingCode_;
   }