Bug 1456192 - make {Read,Write}IPDLParam MOZ_NEVER_INLINE; r=froydnj
authorDavid Major <dmajor@mozilla.com>
Mon, 23 Apr 2018 14:13:37 -0400
changeset 415145 5f5f5d37a32ebc395b4e65c442763a18089b95f0
parent 415144 e893040e197fc005256d3f07ac3ba53ad5da3d28
child 415146 5b5ce8fcfdffe3631186be9e1d293f86fa68e51c
push id33889
push useraciure@mozilla.com
push dateTue, 24 Apr 2018 01:14:50 +0000
treeherdermozilla-central@b35a1f66c452 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersfroydnj
bugs1456192
milestone61.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1456192 - make {Read,Write}IPDLParam MOZ_NEVER_INLINE; r=froydnj MSVC's PGO inliner thinks these functions are hot enough to be inlined, but they're really not, and inlining them bloats xul.dll quite a bit.
ipc/glue/IPDLParamTraits.h
--- a/ipc/glue/IPDLParamTraits.h
+++ b/ipc/glue/IPDLParamTraits.h
@@ -50,27 +50,27 @@ struct IPDLParamTraits
 // rather than ParamTraits.
 //
 // NOTE: WriteIPDLParam takes a universal reference, so that it can support
 // whatever reference type is supported by the underlying IPDLParamTraits::Write
 // implementation. See the comment on IPDLParamTraits<nsTArray<T>>::Write for
 // more information.
 //
 template<typename P>
-static inline void
+static MOZ_NEVER_INLINE void
 WriteIPDLParam(IPC::Message* aMsg,
                IProtocol* aActor,
                P&& aParam)
 {
   IPDLParamTraits<typename IPC::ParamTraitsSelector<P>::Type>
     ::Write(aMsg, aActor, Forward<P>(aParam));
 }
 
 template<typename P>
-static inline bool
+static MOZ_NEVER_INLINE bool
 ReadIPDLParam(const IPC::Message* aMsg,
               PickleIterator* aIter,
               IProtocol* aActor,
               P* aResult)
 {
   return IPDLParamTraits<typename IPC::ParamTraitsSelector<P>::Type>
     ::Read(aMsg, aIter, aActor, aResult);
 }