Closed Bug 1007438 Opened 12 years ago Closed 12 years ago

Add a memory reporter for VectorImages' SurfaceCache entries

Categories

(Core :: Graphics: ImageLib, defect)

defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 923302

People

(Reporter: jwatt, Unassigned)

References

(Depends on 1 open bug, Blocks 2 open bugs)

Details

(Whiteboard: [MemShrink:P2])

Attachments

(2 files)

We need a memory reporter for VectorImages' SurfaceCache entries. I'm using DMD to find places in the SVG code that we need to add memory reporters, and this is the top source of dark matter for my testcase.
Unreported: 201 blocks in stack trace record 1 of 2,234 9,056,256 bytes (8,686,215 requested / 370,041 slop) 5.82% of the heap (5.82% cumulative); 15.59% of unreported (15.59% cumulative) Allocated at replace_malloc[/Users/jwatt/mozilla/trees/obj/i-debug/dist/lib/libdmd.dylib +0x2A58] 0x1aa58 malloc_impl[/Users/jwatt/mozilla/trees/obj/i-debug/dist/NightlyDebug.app/Contents/MacOS/libmozglue.dylib +0x2260] 0x76260 zone_malloc[/Users/jwatt/mozilla/trees/obj/i-debug/dist/NightlyDebug.app/Contents/MacOS/libmozglue.dylib +0x1AD9] 0x75ad9 malloc_zone_malloc[/usr/lib/system/libsystem_malloc.dylib +0x10868] 0x8936f868 malloc[/usr/lib/system/libsystem_malloc.dylib +0x1127C] 0x8937027c moz_malloc[/Users/jwatt/mozilla/trees/obj/i-debug/dist/NightlyDebug.app/Contents/MacOS/libmozalloc.dylib +0x1DD5] 0x345dd5 mozilla::gfx::AlignedArray<unsigned char, 16>::Realloc(unsigned long)[/Users/jwatt/mozilla/trees/obj/i-debug/dist/NightlyDebug.app/Contents/MacOS/XUL +0x1000E10] 0x3d5ee10 mozilla::gfx::DrawTargetCG::Init(mozilla::gfx::BackendType, unsigned char*, mozilla::gfx::IntSizeTyped<mozilla::gfx::UnknownUnits> const&, int, mozilla::gfx::SurfaceFormat)[/Users/jwatt/mozilla/trees/obj/i-debug/dist/NightlyDebug.app/Contents/MacOS/XUL +0xFCE344] 0x3d2c344 mozilla::gfx::DrawTargetCG::Init(mozilla::gfx::BackendType, mozilla::gfx::IntSizeTyped<mozilla::gfx::UnknownUnits> const&, mozilla::gfx::SurfaceFormat&)[/Users/jwatt/mozilla/trees/obj/i-debug/dist/NightlyDebug.app/Contents/MacOS/XUL +0xFC9166] 0x3d27166 mozilla::gfx::Factory::CreateDrawTarget(mozilla::gfx::BackendType, mozilla::gfx::IntSizeTyped<mozilla::gfx::UnknownUnits> const&, mozilla::gfx::SurfaceFormat)[/Users/jwatt/mozilla/trees/obj/i-debug/dist/NightlyDebug.app/Contents/MacOS/XUL +0xFDB30D] 0x3d3930d gfxPlatform::CreateDrawTargetForBackend(mozilla::gfx::BackendType, mozilla::gfx::IntSizeTyped<mozilla::gfx::UnknownUnits> const&, mozilla::gfx::SurfaceFormat)[/Users/jwatt/mozilla/trees/obj/i-debug/dist/NightlyDebug.app/Contents/MacOS/XUL +0x111441F] 0x3e7241f gfxPlatform::CreateOffscreenContentDrawTarget(mozilla::gfx::IntSizeTyped<mozilla::gfx::UnknownUnits> const&, mozilla::gfx::SurfaceFormat)[/Users/jwatt/mozilla/trees/obj/i-debug/dist/NightlyDebug.app/Contents/MacOS/XUL +0x11124BB] 0x3e704bb mozilla::image::VectorImage::CreateDrawableAndShow(mozilla::image::SVGDrawingParameters const&)[/Users/jwatt/mozilla/trees/obj/i-debug/dist/NightlyDebug.app/Contents/MacOS/XUL +0x12D2C64] 0x4030c64 mozilla::image::VectorImage::Draw(gfxContext*, GraphicsFilter, gfxMatrix const&, gfxRect const&, nsIntRect const&, nsIntSize const&, mozilla::SVGImageContext const*, unsigned int, unsigned int)[/Users/jwatt/mozilla/trees/obj/i-debug/dist/NightlyDebug.app/Contents/MacOS/XUL +0x12D2802] 0x4030802 DrawImageInternal(nsRenderingContext*, imgIContainer*, GraphicsFilter, nsRect const&, nsRect const&, nsPoint const&, nsRect const&, nsIntSize const&, mozilla::SVGImageContext const*, unsigned int)[/Users/jwatt/mozilla/trees/obj/i-debug/dist/NightlyDebug.app/Contents/MacOS/XUL +0x30B3457] 0x5e11457 nsLayoutUtils::DrawSingleImage(nsRenderingContext*, imgIContainer*, GraphicsFilter, nsRect const&, nsRect const&, mozilla::SVGImageContext const*, unsigned int, nsRect const*)[/Users/jwatt/mozilla/trees/obj/i-debug/dist/NightlyDebug.app/Contents/MacOS/XUL +0x307CCD0] 0x5ddacd0 nsImageFrame::PaintImage(nsRenderingContext&, nsPoint, nsRect const&, imgIContainer*, unsigned int)[/Users/jwatt/mozilla/trees/obj/i-debug/dist/NightlyDebug.app/Contents/MacOS/XUL +0x319726D] 0x5ef526d nsDisplayImage::Paint(nsDisplayListBuilder*, nsRenderingContext*)[/Users/jwatt/mozilla/trees/obj/i-debug/dist/NightlyDebug.app/Contents/MacOS/XUL +0x31970FA] 0x5ef50fa mozilla::FrameLayerBuilder::PaintItems(nsTArray<mozilla::FrameLayerBuilder::ClippedDisplayItem>&, nsIntRect const&, gfxContext*, nsRenderingContext*, nsDisplayListBuilder*, nsPresContext*, nsIntPoint const&, float, float, int)[/Users/jwatt/mozilla/trees/obj/i-debug/dist/NightlyDebug.app/Contents/MacOS/XUL +0x301C6B0] 0x5d7a6b0 mozilla::FrameLayerBuilder::DrawThebesLayer(mozilla::layers::ThebesLayer*, gfxContext*, nsIntRegion const&, mozilla::layers::DrawRegionClip, nsIntRegion const&, void*)[/Users/jwatt/mozilla/trees/obj/i-debug/dist/NightlyDebug.app/Contents/MacOS/XUL +0x301D6DE] 0x5d7b6de mozilla::layers::ClientThebesLayer::PaintThebes()[/Users/jwatt/mozilla/trees/obj/i-debug/dist/NightlyDebug.app/Contents/MacOS/XUL +0x11D7178] 0x3f35178 mozilla::layers::ClientThebesLayer::RenderLayer()[/Users/jwatt/mozilla/trees/obj/i-debug/dist/NightlyDebug.app/Contents/MacOS/XUL +0x11D7593] 0x3f35593 non-virtual thunk to mozilla::layers::ClientThebesLayer::RenderLayer()[/Users/jwatt/mozilla/trees/obj/i-debug/dist/NightlyDebug.app/Contents/MacOS/XUL +0x11D774C] 0x3f3574c mozilla::layers::ClientContainerLayer::RenderLayer()[/Users/jwatt/mozilla/trees/obj/i-debug/dist/NightlyDebug.app/Contents/MacOS/XUL +0x1202C3A] 0x3f60c3a
Depends on: 1008575
(In reply to Jonathan Watt [:jwatt] from comment #0) > We need a memory reporter for VectorImages' SurfaceCache entries. I'm using > DMD to find places in the SVG code that we need to add memory reporters, and > this is the top source of dark matter for my testcase. Can you please provide your test case? I would like to try it in my environment. Thanks.
Flags: needinfo?(jwatt)
Whiteboard: [MemShrink] → [MemShrink:P2]
Flags: needinfo?(jwatt)
Attached file testcase
To try and minimize unreported stacks from non-testcase sources I'm running: NightlyDebug.app/Contents/MacOS/firefox -layoutdebug The -layoutdebug argument keeps the browser chrome light.
Jonathan, isn't this a dupe of bug 923302?
Depends on: 1054079
(In reply to Seth Fowler [:seth] from comment #6) > Jonathan, isn't this a dupe of bug 923302? Yup.
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: