A lot of our thread pools use the default stack size for the platform
they're on, which can be rather large (8MB, usually, on Linux and OS X)
and is probably too much for the typical thread in the thread pool
regardless. SharedThreadPool already has some logic for selecting a
reasonable stack size for worker threads; let's move that logic to
nsIThreadManager so that logic (and constant) can be shared more
broadly. (That we already have a couple of instances of
SharedThreadPool usage solely for this constant suggests that it is a
concept that should be available in a more central location.)
The trick here is that we read in the element type before we expand the array, so that we
can write it to the new array before it becomes constified.
MozReview-Commit-ID: 2pbpNVZ3gPZ
--HG--
extra : rebase_source : 4c07fff32ea6b1d5c60ae3e40fb869b737cab13e
Also, change some reinterpret casts to static casts, because there was
no need for them to be reinterpret.
MozReview-Commit-ID: EtPmwxboaq9
--HG--
extra : rebase_source : 59fe2d74c8567af4d8000cb230e8dc0f8bf728ff
Once the XPT data is statically allocated, all of the pointers in
xpt_struct.h have to be made const, as well as the XPTHeader
itself. The existing consumers mostly assume things are const already,
so the bulk of the work is tweaking the deserialization code in
xpt_struct.cpp so that the final result is const. I've broken up these
changes into a set of patches.
This patch also gets rid of xptiTypelibGuts::GetHeader(), which is
never called.
MozReview-Commit-ID: FJpmNjY87SN
--HG--
extra : rebase_source : b28456625e4c80023bd350c67163085011bc7cee
A lot of time is spent during the final big XPT link determining what
the index is for each interface. Changing this to use a map
eliminates about 2/3 of the running time. This patch reduces the run
time to a little under a second on my local OSX machine.
MozReview-Commit-ID: CH4OYXtT19q
--HG--
extra : rebase_source : 6d6f755c57dcbf20112768583948f851b8bf34bf
Switch the order of the IPC FD argument and the crash FD argument in
e10s calls, because the IPC FD is the primary FD, and the crash FD
should be grouped with the crash annotation FD.
MozReview-Commit-ID: CAVyYAIIBPm
--HG--
extra : rebase_source : 596f590443f727d1a79582202eed122f79ae85cf
The patch also uses GetStringBuffer() in a couple of appropriate places.
MozReview-Commit-ID: JufCUgmO8JL
--HG--
extra : rebase_source : ecd3f17b5560b19622c86759d605fa122d70e48a
The refcount is only used for dynamic atoms.
On 64-bit, this reduces sizeof(nsStaticAtom) from 24 bytes to 16 bytes, and the
on-heap size from 32 bytes to 16 bytes. This saves 42 KiB per process.
On 32-bit, this reduces sizeof(nsStaticAtom) from 16 bytes to 12 bytes, but the
on-heap size stays at 16 bytes, so memory usage is unchanged.
MozReview-Commit-ID: 7d9H7MRHN9a
--HG--
extra : rebase_source : d3eafb3aaf44a592afd6c89cd0519d043056e65a
This was added in bug 1081000 to support linking XPT tests, but those
tests were removed in bug 1248534, part 1, so this shouldn't be needed
any more.
MozReview-Commit-ID: I1V2XVBaMG7
--HG--
extra : rebase_source : 8e772da227782b5304b553c0ba85f96f708bea99
Various atom-related things have improved recently.
- The main atom table is now threadsafe (bug 1275755) and so can be accessed on
any thread. It has also been split into pieces (bug 1440824), which greatly
reduces lock contention.
- A cache has been added to the HTML5 parser (bug 1352874) that removes the
need for most of the full table lookups.
As a result, there is no point having a separate static atom table. This patch
removes it.
MozReview-Commit-ID: 8ou1BrnPAwd
--HG--
extra : rebase_source : 0c6ab073b1a20b703705582d28731a68456741e1
Also, get rid of a gratuitous use of a trinary operator in
nsXPCWrappedJSClass::CallMethod, clean up the style a little, and mark
an unimplemented ctor as deleted.
MozReview-Commit-ID: Kp64sMxyRWc
--HG--
extra : rebase_source : e6082003d3759234cd5f4630b5560b14930c0a88
Also, clean up the style a little and mark an unimplemented ctor as
deleted.
MozReview-Commit-ID: JqmveE6qWFa
--HG--
extra : rebase_source : 62c8249de1f52686b4dd5d2a043261d2618d7433
Also, remove a few unused things.
Removing the include of xpt_arena.h from xpt_struct.h required that I
added it to two other files.
MozReview-Commit-ID: 4bMDRYt0Zxc
--HG--
extra : rebase_source : 91548b62dbf4b92bf918d196067e6fabb9a72302
This makes the file 2-space indented, gets rid of padding between
types and members, moves the * to the left, fixes the mode line,
license and include guards, and fixes up the first line of some of the
multiline comments. I also reordered the XPT_ANN macros to be more
consistent.
I left the padding alone for the enum-like bit flag values, as I think
it makes sense to line those up.
MozReview-Commit-ID: 877aP5eGIFm
--HG--
extra : rebase_source : 6d47ce05b47248c285597454af528ca1ae2cc830