Commit Graph

6964 Commits

Author SHA1 Message Date
Nicholas Nethercote
b68d05bdab Bug 1249174 (part 7.5) - Avoid wasted space around XPT strings. r=khuey.
This patch:

- Removes XPTArena's ability to support arbitrary alignments.

- Hardwires two sub-arenas into XPTArena, one with alignment of 8 and one with
  alignment of 1.

- Uses the first sub-arena for most allocations and the second sub-arena for C
  string allocations.

These changes reduce "xpti-working-set" by 56 KiB.

The patch also renames all the used of "malloc" in XPT identifiers with
"calloc", to make clearer that the result is always zeroed.
2016-02-23 16:17:58 +11:00
Nicholas Nethercote
e5e86e88ed Bug 1249174 (part 6) - Shrink XPTTypeDescriptor. r=khuey.
With careful layout we can reduce sizeof(XPTTypeDescriptor) from 4 to 3, which
also reduces sizeof(XPTParamDescriptor) from 6 to 4. This reduces
"xpti-working-set" by 16 KiB.

The union-of-structs also improves readability by making it clearer exactly
which fields are used for which types.
2016-02-23 16:17:44 +11:00
Nicholas Nethercote
6f093e5857 Bug 1249174 (part 5) - Remove the useless BLK_HDR::size field. r=khuey. 2016-02-23 05:34:33 +11:00
Nicholas Nethercote
9096f3cb06 Bug 1249174 (part 4) - Don't store unused XPTHeader fields in memory. r=khuey.
This requires merging XPT_DoHeaderPrologue() and XPT_DoHeader(), which is
straightforward.

This reduces "xpti-working-set" by 16 KiB on 64-bit platforms.
2016-02-23 05:33:35 +11:00
Nicholas Nethercote
5e1d02e244 Bug 1249174 (part 3) - Don't store the unused XPTInterfaceDirectoryEntry::name_space field in memory. r=khuey.
Removing it reduces the "xpti-working-set" measurement by 16 KiB (measured on
64-bit).
2016-02-23 05:33:35 +11:00
Nicholas Nethercote
48839673ad Bug 1249174 (part 2) - Shrink xptiInterfaceEntry by reordering its fields. r=khuey.
This reduces "xpti-working-set" by another 16 KiB on 64-bit.
2016-02-17 15:23:46 +11:00
Nicholas Nethercote
120e0f668c Bug 1249174 (part 1) - Don't store the unused XPTTypeDescriptorTags::argnum2 field in memory. r=khuey.
XPTTypeDescriptor::argnum2 is unused. Removing it reduces
sizeof(XPTTypeDescriptor) from 6 bytes to 4 bytes, which reduces the
"xpti-working-set" measurement by 80 KiB (measured on 64-bit).
2016-02-17 15:23:42 +11:00
Eric Rahm
bb68d21273 Bug 1251482 - Remove remaining references to MOZILLA_XPCOMRT_API from xpcom. r=froydnj 2016-02-26 18:10:56 -08:00
Eric Rahm
745eaf4b0c Bug 1251473 - Remove libxpcomrt library. r=froydnj 2016-02-25 16:31:17 -08:00
Wes Kocher
94c4427375 Backed out 8 changesets (bug 1251482, bug 1251494, bug 1251473, bug 1239870) for gtest failures
Backed out changeset f064a5efbb8c (bug 1251494)
Backed out changeset 9e33adec1aa6 (bug 1251482)
Backed out changeset ab0347657e25 (bug 1251473)
Backed out changeset 1d385d4f195d (bug 1239870)
Backed out changeset ceb3e1ee7dda (bug 1239870)
Backed out changeset 8574075bf42f (bug 1239870)
Backed out changeset ba077a3afbc7 (bug 1239870)
Backed out changeset eb99ab06414d (bug 1239870)

MozReview-Commit-ID: 7r9SEk4VGNU
2016-02-26 17:14:57 -08:00
Eric Rahm
e9b94fd605 Bug 1251482 - Remove remaining references to MOZILLA_XPCOMRT_API from xpcom. r=froydnj 2016-02-26 15:31:19 -08:00
Eric Rahm
c274bc8aaa Bug 1251473 - Remove libxpcomrt library. r=froydnj 2016-02-25 16:31:17 -08:00
Nicholas Nethercote
5d4a578aff Bug 1251127 - Gracefully handle multiple calls to nsMemoryReporterManager::Init(). r=erahm. 2016-02-25 14:47:29 +11:00
Nicholas Nethercote
aa28ff0a7e Bug 1251458 - Reinstate annotation handling in .xpt files. r=khuey.
Even though the .xpt files we produce never have annotations, .xpt files in the
wild might have them. This partly undoes part 3 of bug 1248534.
2016-02-26 10:47:36 +11:00
Nathan Froyd
ca4f352f10 Bug 1251495 - remove unnecessary Logging.h include from nsStaticAtom.h; r=erahm 2016-02-25 16:38:26 -05:00
Nicholas Nethercote
cbc92b2dda Bug 1251298 - Null out |*idp| when necessary in DoInterfaceDescriptor. r=khuey. 2016-02-26 10:15:16 +11:00
Nathan Froyd
49a6985c41 Bug 1229985 - remove nsAutoArrayPtr; r=erahm 2015-12-06 10:51:43 -05:00
Ms2ger
e15d1da9ab Bug 1250917 - Remove NS_SUCCESS_I_DID_SOMETHING; r=bholley
It hasn't been used for a while now.
2016-02-25 09:28:06 +01:00
Nicholas Nethercote
382142e468 Bug 1248534 (part 9) - Remove XPT arena logging code. r=khuey.
It's not useful.
2016-02-23 05:33:35 +11:00
Nicholas Nethercote
78c3e94370 Bug 1248534 (part 8) - Remove useless XPT freeing code. r=khuey.
XPT has some functions and macros for freeing memory. However, they (a) are
only used on error paths, and (b) don't actually free memory -- they just
optionally log the "freeing" -- because piecewise freeing doesn't make sense
with arena allocation.

This patch removes all that unnecessary machinery.
2016-02-23 05:33:35 +11:00
Nicholas Nethercote
b28eae0483 Bug 1249174 (part 7) - Only define XPTArena::name if XPT_ARENA_LOGGING is defined. r=khuey. 2016-02-23 05:33:35 +11:00
Nicholas Nethercote
7cd527a48b Bug 1248534 (part 6) - Stack-allocate XPTState. r=khuey.
RegisterBuffer() is the only place that creates an XPTState, and it also
destroys it. So the XPTState can be allocated on the stack, which voids the
need for the creation of an XPTArena.
2016-02-23 05:33:35 +11:00
Nicholas Nethercote
4a3a7d6c8f Bug 1248534 (part 5) - Remove XPTDatapool. r=khuey.
It can just be inlined into XPTState, which simplifies things.
2016-02-23 05:33:35 +11:00
Nicholas Nethercote
2324b7b000 Bug 1248534 (part 4) - Remove unused fields from XPTConstValue. r=khuey. 2016-02-23 05:28:13 +11:00
Nicholas Nethercote
5e2300162c Bug 1248534 (part 3) - Remove almost all support for XPT annotations. r=khuey.
XPT supports annotations but xpt.py doesn't generate them except for a single
empty annotation (to indicate there are no real annotations). So we can remove
almost all support for them. This also allows XPTString to be removed.
2016-02-22 09:52:39 +11:00
Nicholas Nethercote
6d4c49b38f Bug 1248534 (part 2) - Remove unused XPT flags. r=khuey. 2016-02-16 19:04:18 +11:00
Nicholas Nethercote
9352570917 Bug 1248534 (part 1) - Remove XPT encoding support. r=khuey.
Currently XPT can both encode and decode, but encoding has been handled by
Python code since bug 643817, so the encoding support can be removed. This
results in many simplifications. Some notable changes:

- All the XPTHashTable code (including XPTDatapool::offset_map) is no longer
  necessary.

- PrimitiveTest.cpp and SimpleTypeLib.cpp both don't make much sense without
  encoding support, so I removed them.

- A lot of the version code was already unused, e.g. XPT_VERSION_*,
  XPT_TYPELIB_VERSIONS_STRUCT, XPT_TYPELIB_VERSIONS.
  XPT_MAJOR_INCOMPATIBLE_VERSION is the only thing actually used in version
  checks.

- The patch also removes some code that was dead even before encoding removal,
  such as XPT_ParseVersionString().
2016-02-16 19:02:51 +11:00
Nicholas Nethercote
2f88a9a04e Bug 1250396 (part 2) - Remove nsStaticAtomStringType. r=froydnj.
It's only used in one file and obscures more than it enlightens.
2016-02-23 16:55:59 +11:00
Nicholas Nethercote
85d2dc6c54 Bug 1250396 (part 1) - Document a subtle contraint on nsIAtom. r=froydnj. 2016-02-17 11:30:02 +11:00
L. David Baron
d5e0278a54 Back out changeset b5ec7338bddf (bug 1236789) on a CLOSED TREE for causing assertions on most (but not all) debug test runs. 2016-02-24 15:45:40 -08:00
Robert O'Callahan
b83baff009 Bug 1236789. Avoid creating an unnecessary thread pool thread for tail-dispatch in TaskQueue. r=bholley
MozReview-Commit-ID: H1rhQPBU00L
2016-01-05 16:35:17 +13:00
Nicholas Nethercote
687a6f5be1 Bug 1249503 - Make WindowsAddressSpaceReporter bloat memory reports less. r=erahm.
The WindowsAddressSpaceReporter generates one memory report per segment, and
there can be 10,000+ segments.

This patch changes things so that one memory report is generated per segment
*kind* -- at most a couple of dozen -- rather than one per *segment*.
2016-02-23 18:39:24 +11:00
Bogdan Postelnicu
50bbc8e987 Bug 1021151 - avoid memory leak in NS_GENERIC_AGGREGATED_CONSTRUCTOR_INIT, use nsAutoPtr instead of naked ptr. r=Ehsan
MozReview-Commit-ID: 6iU7ikbgjEn
2016-02-23 14:12:22 +02:00
Bogdan Postelnicu
38bbebfbc9 Bug 1250134 - assert mJSRuntime when IsGrayJS() is true. r=mccr8
MozReview-Commit-ID: B5046aj61jx
2016-02-23 09:28:52 +02:00
Andrew McCreight
fed281470b Bug 1247679, part 3 - Replace NS_IMPL_CYCLE_COLLECTION_TRACE_JSVAL_MEMBER_CALLBACK with JS_MEMBER. r=smaug 2016-02-22 10:11:02 -08:00
Andrew McCreight
85860289d9 Bug 1247679, part 2 - Null check inside TraceCallbackFunc::Trace. r=smaug 2016-02-22 10:11:02 -08:00
Andrew McCreight
bf98012594 Bug 1247679, part 1 - Make ClearJSHolder publicly inherit from TraceCallbacks. r=smaug 2016-02-22 10:11:02 -08:00
Jeff Lu
226d0081c1 Bug 864842 - Show error for browsing Windows drive without media, r=michal 2016-02-22 17:00:10 +01:00
Olli Pettay
70a1a77847 Bug 1249451 - nsCycleCollector::ScanRoots may cause some unexpected purple buffer usage, r=mccr8 2016-02-19 20:17:25 +02:00
Carsten "Tomcat" Book
ddeb6f191e Backed out changeset dc704cb50a24 (bug 1249451) for bustage 2016-02-19 14:18:37 +01:00
Olli Pettay
b1dc3defac Bug 1249451 - nsCycleCollector::ScanRoots may cause some unexpected purple buffer usage, r=mccr8 2016-02-19 13:09:20 +02:00
Nicholas Nethercote
2559682882 Bug 1249171 - Simplify nsCOMArray::SizeOfExcludingThis(). r=erahm.
Using explicit iteration at measurement sites is much simpler and nicer than
using callbacks.
2016-02-19 14:54:45 +11:00
Brian Birtles
bc7586045e Bug 1249212 part 2 - Fix infinity handling in StickyTimeDurationValueCalculator::Multiply; r=froydnj
This patch brings the behavior of this method into line with the comment that
describes it and other methods in this class that have a similar test.

I discovered this bug while exercising this code from animation code and was
getting test failures due to returning -Infinity instead of the expected
Infinity.
2016-02-19 08:37:31 +09:00
Andrew McCreight
4098d0b694 Bug 1052793, part 1 - Do per-zone GC for CC_WAITING triggers. r=smaug 2016-02-18 15:21:48 -08:00
Honza Bambas
f170a6058c Bug 961430 - Allow pid be added to the log file name automatically. r=froydnj 2016-02-18 07:56:00 -05:00
Nicholas Nethercote
edae2b07e6 Bug 1247850 - Shrink NameTableKey in nsStaticCaseInsensitiveNameTable. r=froydnj,erahm.
This patch removes NameTableEntry::mString. This requires adding mNameArray to
NameTableKey so that we can index off it in matchNameKeysCaseInsensitive().

This change saves 41.5 KiB per process.
2016-02-12 16:55:51 +11:00
Ben Kelly
1eb56118ec Bug 1247580 P1 Allow old nsIX509Cert serialized objects to be read off disk. r=bz 2016-02-17 07:18:00 -08:00
Julian Seward
43d19bc9e0 Bug 1136762 - TSan: data race xpcom/io/nsPipe3.cpp:1061 CloseWithStatus. r=nfroyd. 2016-02-17 11:22:28 +01:00
Mike Shal
2a588c2eb9 Bug 1241976 - port INSTALL_TARGETS in xpcom/tests to moz.build; r=glandium 2016-01-21 21:06:50 -05:00
ISHIKAWA, Chiaki
72d38a6835 Bug 1248252 - Improper outdated octal constant syntax in M-C tree. Use '0o' prefix. r=dao
Be warned. Do not attemp to change the .js "test" source code in ./js
They are meant to check

 - the outdated 0666 octal constant is still parsed correctly,
 - the outdated 0666 octal constant raises syntax error flag
   in strict mode, etc.

So leave them alone.
2016-02-15 08:57:00 +01:00