gecko-dev/ipc/ipdl
Nathan Froyd 37cbcb454b Bug 1397823 - part 4 - reduce codesize for IPDL IPC::Message creation; r=kanru
Each protocol in IPDL has a bunch of autogenerated functions that
instantiate IPC::Message with various parameters.  Each of these
functions, then:

1) Pays the cost of calling malloc()
2) Setting up various parameters
3) Calling IPC::Message()

There's no reason that we should be duplicating 1) across all of these
autogenerated functions.  In step 2), several of the parameters we're
setting up are common across all or nearly all calls: the message
segment size is almost always zero, and we're always indicating that
IPDL-generated messages should be recorded in telemetry.

Instead of duplicating that code several thousand times, we can add a
small helper function that takes the only interesting parameters for an
IPDL message.  This helper function can then deal with calling malloc in
a single place and setting up the common parameters.  For messages that
require a custom segment size, we'll have to use the old scheme, but
such messages are uncommon.

The previous changes are not required for this scheme to work, but they
do help significantly, as the helper function (Message::IPDLMessage) can
now take four parameters, which ensures that its arguments are passed
solely in registers on Win64 and ARM.  The wins from this change are
also larger than they would be without the previous parts: ~100K on
x86-64 Linux (!)  and ~80K on ARM Android.
2017-09-15 08:06:11 -04:00
..
ipdl Bug 1397823 - part 4 - reduce codesize for IPDL IPC::Message creation; r=kanru 2017-09-15 08:06:11 -04:00
test Bug 1397506 - IPDL unit test fix (r=kmag) 2017-09-07 22:31:34 -07:00
Makefile.in Bug 1348591 - Support custom default segment buffer list size. r=billm 2017-06-21 17:55:13 +08:00
ipdl.py Bug 1384713 - remove unused *MsgStartChild constants; r=billm 2017-07-27 13:32:15 -04:00
message-metadata.ini Bug 1380974 - Use custom size for small frequent messages. r=billm 2017-07-20 11:37:09 +08:00
moz.build Bug 1309799 - Generate StringFromIPCMessageType and use it in MessageChannel::MaybeHandleError. r=billm 2016-10-13 14:18:45 +08:00
msgtype-components
sync-messages.ini Bug 1245527 - Remove NSS U2F SoftToken. r=ttaubert, r=jed 2017-09-05 12:32:42 -07:00