WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
94639
Speed up compilation of tests involving WebTransformationMatrix
https://bugs.webkit.org/show_bug.cgi?id=94639
Summary
Speed up compilation of tests involving WebTransformationMatrix
nbhargava
Reported
2012-08-21 15:53:40 PDT
Speed up compilation of tests involving WebTransformationMatrix
Attachments
Patch
(59.24 KB, patch)
2012-08-21 15:57 PDT
,
nbhargava
no flags
Details
Formatted Diff
Diff
Patch
(59.58 KB, patch)
2012-08-21 16:15 PDT
,
nbhargava
no flags
Details
Formatted Diff
Diff
Patch
(67.77 KB, patch)
2012-08-21 17:39 PDT
,
nbhargava
no flags
Details
Formatted Diff
Diff
Patch
(5.85 KB, patch)
2012-08-22 13:07 PDT
,
nbhargava
no flags
Details
Formatted Diff
Diff
Show Obsolete
(3)
View All
Add attachment
proposed patch, testcase, etc.
nbhargava
Comment 1
2012-08-21 15:57:55 PDT
Created
attachment 159786
[details]
Patch
nbhargava
Comment 2
2012-08-21 16:01:16 PDT
EXPECT_TRANSFORMATION_MATRIX_EQ was changed from a macro to a function. As a macro that expanded into 16 other macros, it caused an unneeded slow down of close to 45s in the compile time of CCLayerTreeHostCommonTest.cpp. The one thing that is lost in this change is a more precise reporting of line numbers when the tests fail. However, given that tests don't fail often, but people may recompile files fairly often, it makes more sense to cut down on a somewhat large overhead. Bugs have been filed to clang and gcc noting the errant compiler behavior:
http://llvm.org/bugs/show_bug.cgi?id=13651
and
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54337
nbhargava
Comment 3
2012-08-21 16:15:28 PDT
Created
attachment 159790
[details]
Patch
Eric Seidel (no email)
Comment 4
2012-08-21 16:43:55 PDT
I'm OK with this as long as James or other compositor folks are. Theyr'e the ones who use these tests I think.
James Robinson
Comment 5
2012-08-21 16:46:02 PDT
This makes the test failures messages pretty much completely useless. How far out would a clang fix be?
James Robinson
Comment 6
2012-08-21 16:46:34 PDT
Alternately, could you play around with the gtest failure macros to try to make the failure message still useful but still use a function? It has some functionality for reporting errors at specific places.
James Robinson
Comment 7
2012-08-21 16:49:03 PDT
Comment on
attachment 159790
[details]
Patch Perhaps EXPECT_PRED2() could solve this, or perhaps SCOPED_TRACE()? r- until you can make failures point to the real location. it doesn't appear to be too hard.
nbhargava
Comment 8
2012-08-21 16:49:20 PDT
I'm not sure how far out a clang fix is. Given that it makes line number stuff difficult, I was looking at this
http://code.google.com/p/googletest/wiki/AdvancedGuide#Using_Assertions_in_Sub-routines
. Is it worth potentially adding this?
James Robinson
Comment 9
2012-08-21 16:57:44 PDT
Yes, that's what I'm suggesting.
nbhargava
Comment 10
2012-08-21 17:39:01 PDT
Created
attachment 159815
[details]
Patch
James Robinson
Comment 11
2012-08-21 17:45:11 PDT
Comment on
attachment 159815
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=159815&action=review
> Source/WebKit/chromium/tests/CCLayerTreeHostCommonTest.cpp:188 > + { > + SCOPED_TRACE(""); > + ExpectTransformationMatrixEq(identityMatrix, child->drawTransform()); > + }
instead of having to change all of these lines, could you have EXPECT_TRANS...() expand to a macro that creates a new scope, SCOPED_TRACE(), and calls the matcher function?
nbhargava
Comment 12
2012-08-22 13:07:12 PDT
Created
attachment 159995
[details]
Patch
James Robinson
Comment 13
2012-08-22 13:08:13 PDT
Comment on
attachment 159995
[details]
Patch Yay!
James Robinson
Comment 14
2012-08-22 13:08:44 PDT
I'm not sure if you are a webkit committer or not - if not, you can set the "commit-queue" flag to ? and a committer will put it into the commit queue for you.
WebKit Review Bot
Comment 15
2012-08-22 14:28:41 PDT
Comment on
attachment 159995
[details]
Patch Clearing flags on attachment: 159995 Committed
r126352
: <
http://trac.webkit.org/changeset/126352
>
WebKit Review Bot
Comment 16
2012-08-22 14:28:45 PDT
All reviewed patches have been landed. Closing bug.
Shawn Singh
Comment 17
2012-08-22 21:50:41 PDT
Just a post-landing follow up. I just now saw this code. I think we should still encourage the use of EXPECT_TRANSFORMATION_MATRIX_EQ macro, so that this can be changed later if we want? If you guys agree, I'll add a comment on this function as a drive by to one of my upcoming patches -
https://bugs.webkit.org/show_bug.cgi?id=94542
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug