Open
Bug 1513678
Opened 7 years ago
Updated 3 years ago
Twice-reported memory allocations in StyleSheet code
Categories
(Core :: CSS Parsing and Computation, defect, P3)
Tracking
()
NEW
People
(Reporter: kats, Unassigned)
References
Details
+++ This bug was initially created as a clone of Bug #1513672 +++
I ran DMD today on a WR-enabled mac build to chase down bug 1491512 a bit more, and the DMD report told me about some twice-reported blocks. There is the entry below in StyleSheet code. Full log is attached to bug 1513672.
Twice-reported {
1 block in heap block record 6 of 11
256 bytes (248 requested / 8 slop)
0.00% of the heap (0.00% cumulative)
3.35% of twice-reported (89.10% cumulative)
Allocated at {
#01: replace_malloc(unsigned long) (DMD.cpp:1123, in libmozglue.dylib)
#02: moz_xmalloc (mozalloc.cpp:69, in libmozglue.dylib)
#03: mozilla::StyleSheet::StyleSheet(mozilla::css::SheetParsingMode, mozilla::CORSMode, mozilla::net::ReferrerPolicy, mozilla::dom::SRIMetadata const&) (mozalloc.h:131, in XUL)
#04: mozilla::css::Loader::CreateSheet(nsIURI*, nsIContent*, nsIPrincipal*, mozilla::css::SheetParsingMode, mozilla::CORSMode, mozilla::net::ReferrerPolicy, nsTSubstring<char16_t> const&, bool, mozilla::css::StyleSheetState&, RefPtr<mozilla::StyleSheet>*) (RefPtr.h:54, in XUL)
#05: mozilla::css::Loader::InternalLoadNonDocumentSheet(nsIURI*, bool, mozilla::css::SheetParsingMode, bool, nsIPrincipal*, mozilla::Encoding const*, RefPtr<mozilla::StyleSheet>*, nsICSSLoaderObserver*, mozilla::CORSMode, mozilla::net::ReferrerPolicy, nsTSubstring<char16_t> const&) (Loader.cpp:2193, in XUL)
#06: mozilla::css::Loader::LoadSheet(nsIURI*, bool, nsIPrincipal*, mozilla::Encoding const*, nsICSSLoaderObserver*, mozilla::CORSMode, mozilla::net::ReferrerPolicy, nsTSubstring<char16_t> const&) (Loader.cpp:2155, in XUL)
#07: nsXBLResourceLoader::LoadResources(nsIContent*) (nsXBLResourceLoader.cpp:132, in XUL)
#08: nsXBLService::GetBinding(nsIContent*, nsIURI*, bool, nsIPrincipal*, bool*, nsXBLBinding**, nsTArray<nsCOMPtr<nsIURI> >&) (nsXBLPrototypeResources.cpp:48, in XUL)
}
Reported at {
#01: mozilla::dmd::ReportHelper(void const*, bool) (DMD.cpp:425, in libmozglue.dylib)
#02: CacheMallocSizeOf(void const*) (nsXULPrototypeCache.cpp:523, in XUL)
#03: mozilla::StyleSheet::SizeOfIncludingThis(unsigned long (*)(void const*)) const (StyleSheet.cpp:322, in XUL)
#04: mozilla::css::Loader::SizeOfIncludingThis(unsigned long (*)(void const*)) const (Loader.cpp:0, in XUL)
#05: nsDocument::DocAddSizeOfExcludingThis(nsWindowSizes&) const (nsDocument.cpp:11104, in XUL)
#06: nsXBLDocumentInfo::SizeOfIncludingThis(unsigned long (*)(void const*)) const (nsXBLDocumentInfo.cpp:310, in XUL)
#07: nsXULPrototypeCache::CollectMemoryReports(nsIHandleReportCallback*, nsISupports*) (nsXULPrototypeCache.cpp:573, in XUL)
#08: nsWindowMemoryReporter::CollectReports(nsIHandleReportCallback*, nsISupports*, bool) (nsWindowMemoryReporter.cpp:573, in XUL)
}
Reported again at {
#01: mozilla::dmd::ReportHelper(void const*, bool) (DMD.cpp:425, in libmozglue.dylib)
#02: CacheMallocSizeOf(void const*) (nsXULPrototypeCache.cpp:523, in XUL)
#03: mozilla::StyleSheet::SizeOfIncludingThis(unsigned long (*)(void const*)) const (StyleSheet.cpp:322, in XUL)
#04: nsXBLPrototypeResources::SizeOfIncludingThis(unsigned long (*)(void const*)) const (nsXBLPrototypeResources.cpp:175, in XUL)
#05: nsXBLPrototypeBinding::SizeOfIncludingThis(unsigned long (*)(void const*)) const (nsXBLPrototypeBinding.cpp:1563, in XUL)
#06: nsXBLDocumentInfo::SizeOfIncludingThis(unsigned long (*)(void const*)) const (nsXBLDocumentInfo.cpp:316, in XUL)
#07: nsXULPrototypeCache::CollectMemoryReports(nsIHandleReportCallback*, nsISupports*) (nsXULPrototypeCache.cpp:573, in XUL)
#08: nsWindowMemoryReporter::CollectReports(nsIHandleReportCallback*, nsISupports*, bool) (nsWindowMemoryReporter.cpp:573, in XUL)
}
}
| Reporter | ||
Comment 1•7 years ago
|
||
The full log has a couple more at the end of the "twice reported blocks" section
Comment 2•7 years ago
|
||
If this is the parent process, which I guess it is, I guess we're hitting multiple XBL stylesheets which are shared because of this cache:
https://searchfox.org/mozilla-central/rev/3160ddc1f0ab55d230c595366662c62950e5c785/layout/style/Loader.cpp#903
Updated•6 years ago
|
Priority: -- → P3
Updated•3 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•