Closed
Bug 730240
Opened 11 years ago
Closed 11 years ago
While playing CSS3 animation bunch of CPU used by memcpy
Categories
(Core :: CSS Parsing and Computation, defect)
Tracking
()
RESOLVED
FIXED
mozilla13
People
(Reporter: romaxa, Assigned: dbaron)
References
()
Details
(Keywords: perf)
Attachments
(4 files)
3.21 KB,
patch
|
bzbarsky
:
review+
|
Details | Diff | Splinter Review |
3.11 KB,
patch
|
bzbarsky
:
review+
|
Details | Diff | Splinter Review |
5.24 KB,
text/plain
|
Details | |
690 bytes,
patch
|
Details | Diff | Splinter Review |
Not sure hom much valid this bug, but I guess it would be nice to avoid memcpy from profile... not? 50 5.2466 libc-2.13.so b2g memcpy 39 4.0923 libxul.so b2g gfx3DMatrix::Transform3D(gfxPoint3D const&) const 15 1.5740 libm-2.13.so b2g __dubsin 13 1.3641 libxul.so b2g gfx3DMatrix::operator*(gfx3DMatrix const&) const 12 1.2592 libxul.so b2g pixman_composite_src_n_8888_asm_neon 11 1.1542 pvrsrvkm b2g /pvrsrvkm 10 1.0493 libc-2.13.so b2g memset 10 1.0493 libm-2.13.so b2g sinl 10 1.0493 libxul.so b2g SearchTable(PLDHashTable*, void const*, unsigned int, PLDHashOperator) 9 0.9444 libm-2.13.so b2g cosl 8 0.8395 libnspr4.so b2g PR_GetCurrentThread 7 0.7345 libxul.so b2g gfx3DMatrix::Transform(gfxPoint const&) const 7 0.7345 libxul.so b2g gfx3DMatrix::TransformBounds(gfxRect const&) const 7 0.7345 libxul.so b2g gfx3DMatrix::Translate(gfxPoint3D const&) 7 0.7345 libxul.so b2g mozilla::layers::SortLayersBy3DZOrder(nsTArray<mozilla::layers::Layer*, nsTArrayDefaultAllocator>&) 7 0.7345 libxul.so b2g nsRect::ScaleToOutsidePixels(float, float, int) const 7 0.7345 vmlinux b2g __schedule 6 0.6296 libxul.so b2g PL_DHashTableOperate 6 0.6296 libxul.so b2g nsDisplayTransform::GetResultingTransformMatrix(nsIFrame const*, nsPoint const&, float, nsRect const*, nsIFrame**) #0 memcpy () at ../ports/sysdeps/arm/memcpy.S:67 #1 0x40b739ee in nsStyleCoord (aUnit=<optimized out>, aValue=<optimized out>, this=0xbed8af30) at layout/style/nsStyleCoord.h:278 #2 nsStyleSides::Get (this=<optimized out>, aSide=<optimized out>) at layout/style/nsStyleCoord.h:384 #3 0x40b900f0 in nsStyleBorder::GetImageOutset (this=0x4b4865b0) at layout/style/nsStyleStruct.cpp:514 #4 0x40b2e12a in ComputeOutlineAndEffectsRect (aFrame=0x4b486ca0, aAnyOutlineOrEffects=0xbed8b0c7, aOverflowRect=<optimized out>, aNewSize=..., aStoreRectProperties=true) at layout/generic/nsFrame.cpp:4835 #5 0x40b2ea1c in nsIFrame::FinishAndStoreOverflow (this=0x4b486ca0, aOverflowAreas=..., aNewSize=...) at layout/generic/nsFrame.cpp:6736 #6 0x40b2ee3e in RecomputePreserve3DChildrenOverflow (aFrame=0x4b4858a8, aBounds=0xbed8b394) at layout/generic/nsFrame.cpp:6896 #7 0x40b2e650 in nsIFrame::ComputePreserve3DChildrenOverflow (this=0x4b4858a8, aOverflowAreas=..., aBounds=...) at layout/generic/nsFrame.cpp:6932 #8 0x40b2eb18 in nsIFrame::FinishAndStoreOverflow (this=0x4b4858a8, aOverflowAreas=..., aNewSize=...) at layout/generic/nsFrame.cpp:6771 #9 0x40ae4246 in nsCSSFrameConstructor::ProcessRestyledFrames (this=0x49dfee00, aChangeList=...) at layout/base/nsCSSFrameConstructor.cpp:7890 #10 0x40ae4496 in nsCSSFrameConstructor::RestyleElement (this=0x49dfee00, aElement=<optimized out>, aPrimaryFrame=0x4b4858a8, aMinHint=0, aRestyleTracker=..., aRestyleDescendants=false) at layout/base/nsCSSFrameConstructor.cpp:7980 #11 0x40ada9b0 in mozilla::css::RestyleTracker::ProcessOneRestyle (this=0x49dfef40, aElement=0x4d093100, aRestyleHint=<optimized out>, aChangeHint=0) at layout/base/RestyleTracker.cpp:157 #12 0x40adadde in mozilla::css::RestyleTracker::DoProcessRestyles (this=0x49dfef40) at layout/base/RestyleTracker.cpp:242 #13 0x40ae4420 in ProcessRestyles (this=0x49dfef40) at layout/base/RestyleTracker.h:101 #14 nsCSSFrameConstructor::ProcessPendingRestyles (this=0x49dfee00) at layout/base/nsCSSFrameConstructor.cpp:11558
Assignee | ||
Comment 1•11 years ago
|
||
C++2011 seems to allow assignment of unions, though C++1998 didn't (as far as I can tell). I wonder if we use it elsewhere in our tree.
Assignee | ||
Comment 2•11 years ago
|
||
Try seems happy with this (so far, not quite done): https://tbpl.mozilla.org/?tree=Try&rev=956a9a1293aa so I think it's portable now.
Assignee: nobody → dbaron
Attachment #600582 -
Flags: review?(bzbarsky)
Assignee | ||
Comment 3•11 years ago
|
||
It said "FIXME", so I did, while I was nearby.
Attachment #600583 -
Flags: review?(bzbarsky)
![]() |
||
Comment 4•11 years ago
|
||
Comment on attachment 600582 [details] [diff] [review] patch 1: use assignment and copy construction of unions r=me
Attachment #600582 -
Flags: review?(bzbarsky) → review+
![]() |
||
Comment 5•11 years ago
|
||
Comment on attachment 600583 [details] [diff] [review] patch 2: make nsStyleCoord members private r=me
Attachment #600583 -
Flags: review?(bzbarsky) → review+
Reporter | ||
Comment 6•11 years ago
|
||
Great, it helps! Thanks
Reporter | ||
Comment 7•11 years ago
|
||
I see couple of other places involved into CSS3 rendering.. not sure that all can be optimized, but OverflowClip at least could be.
Assignee | ||
Comment 8•11 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/350d812f93b9 https://hg.mozilla.org/integration/mozilla-inbound/rev/b958923e04ba
Keywords: perf
Target Milestone: --- → mozilla13
Reporter | ||
Comment 9•11 years ago
|
||
Attachment #600641 -
Flags: review?(bzbarsky)
Comment 10•11 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/350d812f93b9 https://hg.mozilla.org/mozilla-central/rev/b958923e04ba
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Reporter | ||
Comment 11•11 years ago
|
||
Comment on attachment 600641 [details] [diff] [review] simple "for", with optimization enrolled into 8 k1[i]=k2[i] Ok, after removing Invalidation problems for css3, I don't see much memcpy anymore... so it is probably not super important issue for now.
Attachment #600641 -
Flags: review?(bzbarsky)
You need to log in
before you can comment on or make changes to this bug.
Description
•