Open Bug 806379 Opened 12 years ago Updated 2 years ago

Add memory reporter for JARs


(Core :: Networking: JAR, defect, P3)





(Reporter: justin.lebar+bug, Unassigned)


(Blocks 1 open bug)


(Whiteboard: [MemShrink:P2][necko-backlog])

njn in bug 802466 comment 14:

> I'm also seeing lots of variants on this within a single process:
>  Unreported: 28 block(s) in record 3 of 12897 
>   114,688 bytes (60,256 requested / 54,432 slop)
>   0.70% of the heap (3.15% cumulative unreported)
>     at 0x402C2AF: malloc (vg_replace_malloc.c:270)
>     by 0x418E03B: moz_xmalloc (mozalloc.cpp:54)
>     by 0x54C1611: operator new[](unsigned long) (mozalloc.h:200)
>     by 0x57ABE9E: nsJAR::nsJAR() (nsJAR.cpp:92)
>     by 0x57B00E8: nsZipReaderCache::GetZip(nsIFile*, nsIZipReader**) (nsJAR.cpp:1092)
>     by 0x57B409E: nsJARChannel::CreateJarInput(nsIZipReaderCache*) (nsJARChannel.cpp:276)
>     by 0x57B4845: nsJARChannel::EnsureJarInput(bool) (nsJARChannel.cpp:357)
>     by 0x57B55FA: nsJARChannel::AsyncOpen(nsIStreamListener*, nsISupports*) (nsJARChannel.cpp:702)
>     by 0x582F077: imgLoader::LoadImage(nsIURI*, nsIURI*, nsIURI*, nsIPrincipal*, nsILoadGroup*, imgINotificationObserver*, nsISupports*, unsigned int, nsISupp
> orts*, imgIRequest*, nsIChannelPolicy*, imgIRequest**) (imgLoader.cpp:1716)
>     by 0x5C5959D: nsContentUtils::LoadImage(nsIURI*, nsIDocument*, nsIPrincipal*, nsIURI*, imgINotificationObserver*, int, imgIRequest**) (nsContentUtils.cpp:
> 2764)
>     by 0x5CF992A: nsImageLoadingContent::LoadImage(nsIURI*, bool, bool, nsIDocument*, unsigned int) (nsImageLoadingContent.cpp:664)
>     by 0x5CF9475: nsImageLoadingContent::LoadImage(nsAString_internal const&, bool, bool) (nsImageLoadingContent.cpp:578)
>     by 0x5EDED9A: nsHTMLImageElement::SetAttr(int, nsIAtom*, nsIAtom*, nsAString_internal const&, bool) (nsHTMLImageElement.cpp:378)
>     by 0x5E94D7E: nsGenericHTMLElement::SetAttr(int, nsIAtom*, nsAString_internal const&, bool) (nsGenericHTMLElement.h:245)
>     by 0x5E9DC7C: nsGenericHTMLElement::SetAttrHelper(nsIAtom*, nsAString_internal const&) (nsGenericHTMLElement.cpp:2871)
>     by 0x5EDE3E5: nsHTMLImageElement::SetSrc(nsAString_internal const&) (nsHTMLImageElement.cpp:114)
>     by 0x66ED8A2: nsIDOMHTMLImageElement_SetSrc(JSContext*, JS::Handle<JSObject*>, JS::Handle<jsid>, int, JS::MutableHandle<JS::Value>) (dom_quickstubs.cpp:13
> 179)
>     by 0x7BD13A3: js::CallJSPropertyOpSetter(JSContext*, int (*)(JSContext*, JS::Handle<JSObject*>, JS::Handle<jsid>, int, JS::MutableHandle<JS::Value>), JS::
> Handle<JSObject*>, JS::Handle<jsid>, int, JS::MutableHandle<JS::Value>) (jscntxtinlines.h:450)
>     by 0x7BD26D3: js::Shape::set(JSContext*, JS::Handle<JSObject*>, JS::Handle<JSObject*>, bool, JS::MutableHandle<JS::Value>) (jsscopeinlines.h:333)
>     by 0x7BE624D: js_NativeSet(JSContext*, JS::Handle<JSObject*>, JS::Handle<JSObject*>, js::Shape*, bool, bool, JS::Value*) (jsobj.cpp:4284)
> Lots of images are being loaded from JARs, and the unzipping requires
> memory(?)  I don't see ones like this on desktop.

We should add a memory reporter for this if we can.

We should also look into reducing the amount of memory used here; we can do that in a separate bug which I'll file in a sec.
Reducing the memory used here (on b2g) is bug 806383.
Whiteboard: [MemShrink]
Whiteboard: [MemShrink] → [MemShrink:P2]
Whiteboard: [MemShrink:P2] → [MemShrink:P2][necko-backlog]
Bulk change to priority:
Priority: -- → P1
Bulk change to priority:
Priority: P1 → P3
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.