Commit Graph

6989 Commits

Author SHA1 Message Date
Benjamin Smedberg
eb266fd5f1 Bug 1187270 - Add Telemetry session ID to crash annotations, r=gfritzsche a=ritu
MozReview-Commit-ID: GwVI0dfsT4H
2016-03-14 09:31:19 -04:00
Felipe Gomes
42f4042d38 Bug 1257242 - Split the ::BrowserTabsRemoteAutostart() function into two parts, to allow for the blocking policies to be checked independently from the prefs checks. r=jimm a=lizzard IGNORE IDL
MozReview-Commit-ID: qlfYBvHfLI
2016-03-16 17:31:14 -03:00
Peter Van der Beken
94fe31b1ee Bug 1255223 - Null crash when logging weak maps. r=mccr8, a=ritu 2016-03-04 23:11:37 +01:00
Ryan VanderMeulen
8ef0386053 Backed out changesets d59774690fc8, 26e323cbbfc0, and 1864afbb3bd4 (bug 1236108) for test_content_exception_time_annotation.js failures. 2016-03-13 21:02:58 -04:00
Aaron Klotz
eac1a82f39 Bug 1236108 - Add temp directory for sandboxed content processes to directory service. r=bsmedberg, a=lizzard
This is needed so that chrome processes know where sandboxed content
processes will be writing their temp files, and so that content processes know
where to write.

MozReview-Commit-ID: BK9bTxFGvZO
2016-03-07 11:26:35 -08:00
Nicholas Nethercote
0e70a49cc2 Bug 1253142 - Remove the long-deprecated nsIMemory.isLowMemory function. r=froydnj. 2016-03-06 21:07:51 +11:00
Doug Turner
ddc6d8619b Bug 1253159 - Remove locationUpdatePending and restore request timeout. r=jdm 2016-03-02 21:48:00 -05:00
Nicholas Nethercote
2531368087 Bug 1252375 - Fix up jemalloc stats reporting. r=erahm.
We have some oddities in our jemalloc stats reporting.

- "heap-overhead-ratio" is a strange measurement: overhead / non-overhead,
  expressed as a percentage. And it omits "bin_unused", which appears to be an
  oversight.

- "heap-committed" also omits "bin_unused".

- There are some minor errors in memory report descriptions.

This patch fixes these and improves the heap reporting. It makes the following
reporting changes:

- "heap-allocated": Duplicated as "heap-committed/allocated". (We keep
  "heap-allocated" because that's a special value used in the computation of
  "heap-unclassified".)

- "heap-committed/overhead": Added; it's the same as the sum of the
  "explicit/heap-overhead/*" values. Together with "heap-committed/allocated"
  it shows clearly what fraction of the heap is overhead and what fraction is
  useful.

- "heap-committed": Removed; now implicit as the "heap-committed/" node.

- "heap-overhead-ratio":
  - Removed from memory reports; now shown as the percentage of the new
    "heap-committed/overhead" node.
  - Still available as a distinguished amount (because it's useful in
    isolation) but renamed to heapOverheadFraction, and the telemetry ID is
    renamed as MEMORY_HEAP_OVERHEAD_FRACTION.

- "heap-chunks": Removed; it's not that interesting, and can be manually
  computed as "heap-mapped" / "heap-chunksize" if necessary.
2016-03-03 12:49:27 +11:00
Gerald Squelart
56389e6e79 Bug 1242343 - p1. ConstructSystem32Path from LoadLibrarySystem32 - r=jimm
Part 1: Refactored LoadLibrarySystem32 to expose the system32-path
construction code, so it can be re-used in the following patch.

MozReview-Commit-ID: J5BcI34VPnN
2016-03-03 08:40:23 +11:00
Boris Zbarsky
1c341f9698 Bug 1252565 part 2. Make dom::WarningOnlyErrorReporter handle workers. r=bholley 2016-03-01 16:53:22 -05:00
Boris Zbarsky
7a785de497 Bug 1252565 part 1. Push the script environment preparer bits up from XPCJSRuntime to CycleCollectedJSRuntime, because we need them on workers to do ctypes on workers properly. r=bholley 2016-03-02 12:38:24 -05:00
Wes Kocher
b5c77463c0 Backed out 2 changesets (bug 1252565) for windows build bustage CLOSED TREE
Backed out changeset 9de2c10a1cc3 (bug 1252565)
Backed out changeset fc5c4cb02d24 (bug 1252565)

MozReview-Commit-ID: GCQedQwqslg
2016-03-02 10:44:11 -08:00
Boris Zbarsky
318a7c5f2e Bug 1252565 part 2. Make dom::WarningOnlyErrorReporter handle workers. r=bholley 2016-03-01 16:53:22 -05:00
Boris Zbarsky
34f0b30440 Bug 1252565 part 1. Push the script environment preparer bits up from XPCJSRuntime to CycleCollectedJSRuntime, because we need them on workers to do ctypes on workers properly. r=bholley 2016-03-02 12:38:24 -05:00
Ms2ger
f496ec721c Bug 1248950 - Move xpidl unit tests to moz.build; r=ted 2016-03-02 11:21:26 +01:00
Wes Kocher
cfefea5c8d Backed out changeset 96580db9b356 (bug 1252565) for test_recursion.html failures
MozReview-Commit-ID: 1ycmM8vfG3d
2016-03-01 15:40:46 -08:00
Boris Zbarsky
a930b43637 Bug 1252565. Make dom::WarningOnlyErrorReporter handle workers. r=bholley 2016-03-01 16:53:22 -05:00
Jim Mathies
a842ef8491 Bug 1232181 - Add a few win resource helpers. r=aklotz 2016-03-01 12:48:26 -06:00
Nathan Froyd
410b72e6ca Bug 1252195 - part 2 - use UniqueFreePtr instead of ScopedFreePtr in nsMemoryReporterManager; r=njn 2016-02-29 10:29:42 -05:00
Ms2ger
8ff37bd459 Bug 1252095 - Export xpcom-config.h from moz.build; r=ted 2016-03-01 09:17:29 +01:00
Christian Holler
f8f98de4f9 Bug 1252072 - Prevent ASan instrumentation for unsafe xpcom functions. r=froydnj
MozReview-Commit-ID: 5k2RAVPlcAI
2016-02-29 21:39:03 +01:00
Nathan Froyd
e400f9e100 Bug 1251895 - don't race on nsTraceRefcnt's object serial number tables; r=mccr8
GetSerialNumber accesses global state through gSerialNumbers.  We call
GetSerialNumber under a lock when doing normal object refcount logging.
However, we call GetSerialNumber outside of a lock when we're tracing
individual classes for nsCOMPtr refcount logging, even if we don't
actually care about nsCOMPtr refcount logging.  We should call it under
a lock always.
2016-02-29 15:04:36 -05:00
Nathan Froyd
6c48bc0379 Bug 1252191 - use UniquePtr instead of ScopedFreePtr in PoisonIOInterposerMac.cpp; r=aklotz
UniquePtr is more standard than ScopedFreePtr; using standard constructs
whenever possible is preferable.  In this particular case, since we
really just need a chunk of memory, we can allocate a char[] via
MakeUnique.
2016-02-29 10:06:53 -05:00
Trevor Saunders
3b854bcd5f bug 1252104 - make NS_ERROR_GET_CODE() and NS_ERROR_GET_MODULE() constexpr r=froydnj 2016-02-29 14:49:45 -05:00
Nicholas Nethercote
757b6fbbe5 Bug 1249174 (part 8) - Shrink XPTInterfaceDescriptor. r=khuey.
XPTInterfaceDescriptor::num_additional_types can easily fit in 8 bits -- in
practice it doesn't exceed 20, and there's already a check in DoTypeDescriptor
that it doesn't exceed 255. This patch shrinks it and moves that check into
XPT_InterfaceDescriptorAddTypes() so that any overflow would be detected more
reliably.

On 64-bit platforms this reduces sizeof(XPTInterfaceDescriptor) from 40 to 32
and correspondingly reduces "xpti-working-set" by 16 KiB.

The patch also changes XPT_InterfaceDescriptorAddTypes() into a local function,
because it's defined and only used in xpt_struct.cpp.
2016-02-23 16:17:59 +11:00
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