Bug 118554

Summary: Remove 'static' specifier from free inline functions in StringImpl.h
Product: WebKit Reporter: Mikhail Pozdnyakov <mikhail.pozdnyakov>
Component: Web Template FrameworkAssignee: Mikhail Pozdnyakov <mikhail.pozdnyakov>
Status: RESOLVED FIXED    
Severity: Normal CC: andersca, ap, benjamin, buildbot, cmarcelo, commit-queue, kling, rniwa
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
patch
none
Archive of layout-test-results from webkit-ews-15 for mac-mountainlion-wk2 none

Description Mikhail Pozdnyakov 2013-07-11 01:57:41 PDT
SSIA. The rational: at first 'static' does not bring any use here, secondly static free inline functions in headers is a bad practice in general as each instance of function defined as inline is treated as a separate function and each instance has its own copy of static locals and string literals.
Comment 1 Mikhail Pozdnyakov 2013-07-11 02:04:31 PDT
Created attachment 206438 [details]
patch
Comment 2 Anders Carlsson 2013-07-11 09:47:30 PDT
I’m not sure about this patch. Static does ensure that the function won’t be visible in other translation units, and that should speed up linking (I think).

On the other hand, if any of the functions don’t end up being inlined, it’d would mean that there are extra copies of the same functions around.

Did you do any measuring of the size of the WebCore library with/without this change? (With optimizations enabled)
Comment 3 Mikhail Pozdnyakov 2013-07-11 11:54:55 PDT
(In reply to comment #2)
> I’m not sure about this patch. Static does ensure that the function won’t be visible in other translation units, and that should speed up linking (I think).
> 
> On the other hand, if any of the functions don’t end up being inlined, it’d would mean that there are extra copies of the same functions around.
> 
> Did you do any measuring of the size of the WebCore library with/without this change? (With optimizations enabled)

Tried efl release build, 'ls' says that size of libjavascriptcore_efl.so has slightly decreased from 6520696 to 6520688 after the patch is applied.
Comment 4 Build Bot 2013-07-11 12:41:26 PDT
Comment on attachment 206438 [details]
patch

Attachment 206438 [details] did not pass mac-wk2-ews (mac-wk2):
Output: http://webkit-queues.appspot.com/results/954951

New failing tests:
http/tests/security/cross-origin-plugin-private-browsing-toggled.html
Comment 5 Build Bot 2013-07-11 12:41:28 PDT
Created attachment 206484 [details]
Archive of layout-test-results from webkit-ews-15 for mac-mountainlion-wk2

The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews.
Bot: webkit-ews-15  Port: mac-mountainlion-wk2  Platform: Mac OS X 10.8.3
Comment 6 Mikhail Pozdnyakov 2013-07-12 01:10:36 PDT
(In reply to comment #4)
> (From update of attachment 206438 [details])
> Attachment 206438 [details] did not pass mac-wk2-ews (mac-wk2):
> Output: http://webkit-queues.appspot.com/results/954951
> 
> New failing tests:
> http/tests/security/cross-origin-plugin-private-browsing-toggled.html

Looks unrelated.
Comment 7 WebKit Commit Bot 2014-02-15 10:10:08 PST
Comment on attachment 206438 [details]
patch

Clearing flags on attachment: 206438

Committed r164175: <http://trac.webkit.org/changeset/164175>
Comment 8 WebKit Commit Bot 2014-02-15 10:10:11 PST
All reviewed patches have been landed.  Closing bug.