Commit Graph

338 Commits

Author SHA1 Message Date
Andrew McCreight
77e29a7283 Bug 913666, part 1 - Move cycle collector root logging into ScanRoots. r=smaug 2013-09-10 16:33:39 -07:00
Andrew McCreight
4864cf7795 Bug 913881, part 6 - Measure weak map representations in the cycle collector graph. r=njn
Contrary to the comment here, I'm pretty sure this needs to be measured. mWeakMaps
is an array of little structs. Of course, in practice I doubt this amounts to anything.
2013-09-10 08:56:36 -07:00
Andrew McCreight
78ec0916e5 Bug 913881, part 5 - Assert for freeing snow white during cycle collector scanning. r=smaug
If you call FreeSnowWhite when scanning is true, then objects that get released won't be added to the purple buffer, and you can get leaks.
2013-09-10 08:56:36 -07:00
Andrew McCreight
bbb89961cd Bug 913881, part 4 - Change nsCycleCollector::ClearGraph to GCGraph::Clear. r=smaug
There's no reason I can see to have this in nsCC instead of GCGraph.
2013-09-10 08:56:36 -07:00
Andrew McCreight
7bfbfc66c2 Bug 913881, part 3 - Fix argument name for GCGraphBuilder::AddNode. r=smaug 2013-09-10 08:56:35 -07:00
Andrew McCreight
bdf5847bcf Bug 913881, part 2 - Make a bunch of nsCycleCollector methods private. r=smaug 2013-09-10 08:56:35 -07:00
Andrew McCreight
01ac3fd277 Bug 913881, part 1 - Remove unused method nsCycleCollector::Runtime. r=smaug 2013-09-10 08:56:35 -07:00
Andrew McCreight
c4d62e9716 Bug 913527, part 3 - Check for collection in progress in Collect. r=smaug
Moving this to the top level simplifies dealing with PrepareForCollection a bit.
2013-09-10 08:56:34 -07:00
Andrew McCreight
fd080f6291 Bug 913527, part 2 - Remove empty CC graph optimization. r=smaug
This looks like a dubious optimization to skip most of a CC when the graph
is empty, dating from the dawn of the CC, but I doubt it is ever triggered
nowadays.
2013-09-10 08:56:34 -07:00
Andrew McCreight
bd3a15bbd8 Bug 913527, part 1 - Get rid of FinishCollection. r=smaug
This can just be inlined now, with the cleanup parts moved into CleanupAfterCollection.
2013-09-10 08:56:34 -07:00
Andrew McCreight
505b1bb607 Bug 911829 - Separate main thread and worker cycle collector telemetry. r=smaug 2013-09-10 08:29:45 -07:00
Kyle Huey
6a6c67829f Bug 911258: Part 4 - Refactor exception implementations. r=bz 2013-09-08 20:28:50 -07:00
Andrew McCreight
8540b73640 Bug 913130, part 4 - Replace body of ShutdownCollect loop with Collect. r=smaug 2013-09-06 16:17:53 -07:00
Andrew McCreight
02324cc201 Bug 913130, part 3 - Run {PrepareFor,CleanupAfter} every iteration of ShutdownCollect. r=smaug 2013-09-06 16:17:03 -07:00
Andrew McCreight
7f4070d8f7 Bug 913130, part 2 - Give Collect and ShutdownCollect more consistent ordering. r=smaug 2013-09-06 16:16:45 -07:00
Andrew McCreight
e744a3daaf Bug 913130, part 1 - Modify nsCycleCollector::Collect to allow it to be used at shutdown. r=smaug 2013-09-06 16:15:10 -07:00
Andrew McCreight
00502fc5df Bug 913080 - Make GCGraphBuilder's hash table initialization infallible. r=smaug 2013-09-06 13:42:27 -07:00
Andrew McCreight
6270d16652 Bug 911233, part 3 - Add more CheckThreadSafety calls to the cycle collector. r=khuey 2013-09-06 13:41:42 -07:00
Andrew McCreight
e5949c39b3 Bug 911233, part 2 - Inline SelectPurple. r=smaug 2013-09-06 13:41:11 -07:00
Andrew McCreight
4b10c300b9 Bug 911233, part 1 - Minor cycle collector cleanups. r=smaug 2013-09-06 13:40:34 -07:00
Andrew McCreight
3228f67147 Bug 883920 - use templates for {Hold,Drop}JSObjects. r=peterv 2013-08-16 13:10:17 -07:00
Olli Pettay
83abfe1558 Bug 910797, make Event.isTrusted to work in workers, r=khuey 2013-08-30 12:47:19 +03:00
Landry Breuil
33dc057d00 Bug 905920 - Fix build on platforms without SPS profiler r=khuey 2013-08-20 13:48:22 +02:00
Andrew McCreight
20aa3460cc Bug 903524 - Rename TestJSHolder to IsJSHolder. r=smaug 2013-08-15 10:29:02 -07:00
Kyle Huey
8ef412bec4 Bug 901630: Remove support for the cc thread. r=mccr8 2013-08-13 10:45:32 -07:00
Andrew McCreight
6964c7f625 Bug 901756 - Fix a few nits in nsCycleCollector.cpp r=khuey
Remove an unused forward declaration, and an unused field
2013-08-05 17:04:47 -07:00
Kyle Huey
c9d1557bdb Bug 845545: Part 4 - Create a worker implementation of CycleCollectedJSRuntime. r=mccr8,bent 2013-08-03 16:55:40 -07:00
Kyle Huey
46d249128b Bug 845545: Part 3 - Give the CycleCollectedJSRuntime more control over
SnowWhite. r=smaug
2013-08-03 16:55:39 -07:00
Kyle Huey
b09945aa3b Bug 845545: Part 1 - Fix heap dumping to work off the main thread. r=mccr8 2013-08-03 16:55:39 -07:00
Andrew McCreight
5e1d19701e Bug 887903 - Non-fatally assert when nsDeque fails due to OOM during scanning in CC. r=smaug 2013-05-28 17:42:13 -07:00
Ehsan Akhgari
085494b95d Bug 895322 - Part 1: Replace the usages of MOZ_STATIC_ASSERT with C++11 static_assert; r=Waldo
This patch was mostly generated by running the following scripts on the codebase, with some
manual changes made afterwards:

# static_assert.sh
#!/bin/bash
# Command to convert an NSPR integer type to the equivalent standard integer type

function convert() {
echo "Converting $1 to $2..."
find . ! -wholename "*nsprpub*" \
       ! -wholename "*security/nss*" \
       ! -wholename "*/.hg*" \
       ! -wholename "obj-ff-dbg*" \
       ! -name nsXPCOMCID.h \
       ! -name prtypes.h \
         -type f \
      \( -iname "*.cpp" \
         -o -iname "*.h" \
         -o -iname "*.cc" \
         -o -iname "*.mm" \) | \
    xargs -n 1 `dirname $0`/assert_replacer.py #sed -i -e "s/\b$1\b/$2/g"
}

convert MOZ_STATIC_ASSERT static_assert
hg rev --no-backup mfbt/Assertions.h \
                   media/webrtc/signaling/src/sipcc/core/includes/ccapi.h \
                   modules/libmar/src/mar_private.h \
                   modules/libmar/src/mar.h


# assert_replacer.py
#!/usr/bin/python

import sys
import re

pattern = re.compile(r"\bMOZ_STATIC_ASSERT\b")

def replaceInPlace(fname):
  print fname
  f = open(fname, "rw+")
  lines = f.readlines()
  for i in range(0, len(lines)):
    while True:
      index = re.search(pattern, lines[i])
      if index != None:
        index = index.start()
        lines[i] = lines[i][0:index] + "static_assert" + lines[i][index+len("MOZ_STATIC_ASSERT"):]
        for j in range(i + 1, len(lines)):
          if lines[j].find("                 ", index) == index:
            lines[j] = lines[j][0:index] + lines[j][index+4:]
          else:
            break
      else:
        break
  f.seek(0, 0)
  f.truncate()
  f.write("".join(lines))
  f.close()

argc = len(sys.argv)
for i in range(1, argc):
  replaceInPlace(sys.argv[i])

--HG--
extra : rebase_source : 4b4a4047d82f2c205b9fad8d56dfc3f1afc0b045
2013-07-18 13:59:53 -04:00
Ehsan Akhgari
3717325909 Bug 872127 - Part 2: Replace mozilla/StandardInteger.h with stdint.h; r=Waldo,ted 2013-07-30 10:25:31 -04:00
Olli Pettay
26e794eac5 Bug 897433 - Telemetry for SnowWhite and more async SnowWhite freeing (patch v4), r=mccr8 2013-07-27 13:48:45 +03:00
Andrew McCreight
57bd584860 Bug 692226 - Record weak map entries in the cycle collector log. r=smaug 2013-07-26 08:12:51 -07:00
Ryan VanderMeulen
1b688e197e Backed out changeset 300f5b7d72e1 (bug 897433) for intermittent Linux dromaeo crashes. 2013-07-25 21:18:20 -04:00
Olli Pettay
d135cf763c Bug 897433, Telemetry for SnowWhite and more async SnowWhite freeing, r=mccr8
--HG--
extra : rebase_source : 487139a95f50e69d6273c2870ed6623f175544e7
2013-07-25 22:56:20 +03:00
Andrew McCreight
e23c1a0a63 Bug 895933 - Record if a CC log is AllTraces or not. r=khuey 2013-07-19 10:00:53 -07:00
Olli Pettay
7376acc709 Bug 895578 - Make SnowWhiteKiller to use fallible TArray, r=mccr8 2013-07-19 15:53:16 +03:00
Andrew McCreight
c154e56c45 Bug 888461 - Remove unused field nsCycleCollector::mFollowupCollection. r=smaug 2013-07-14 05:10:30 -07:00
Andrew McCreight
86a55fce6e Bug 888999 - Remove mObject null checks in the cycle collector. r=smaug 2013-07-18 09:07:28 -07:00
Andrew McCreight
ec02451077 Bug 889053 - Remove nsCycleCollectorParams::mDoNothing which does nothing. r=khuey 2013-07-18 09:07:28 -07:00
Olli Pettay
6767d0a1a8 bug 789919, (snow-white) make addref/release of CCable objects faster by removing indirect refcnt increase/decrease, r=mccr8, test changes r=ehsan
--HG--
extra : rebase_source : 2a3b22425c14d6daedc91d62a652c34431acd2fb
2013-07-09 13:30:58 -04:00
Kyle Huey
afae5b1108 Bug 885866: Separate deferred finalization from XPConnect so we can use it off the main thread. r=mccr8, peterv, bsmedberg, jorendorff 2013-07-09 07:28:15 -07:00
Catalin Iacob
83b78343dc Bug 798914 (part 5) - Use newly introduced mozilla::MallocSizeOf instead of nsMallocSizeOfFun. r=njn.
--HG--
extra : rebase_source : fc472490dd978d165f02f77ed37f07aed6e5bb61
2013-06-23 14:03:39 +02:00
Kyle Huey
c696ced296 Bug 882893: Move observer notifications out of the cycle collector and into the runtime. r=smaug 2013-06-19 14:06:50 -07:00
Andrew McCreight
8fdb58b8ba Bug 884434 - Assert on extra shutdown CCs. r=smaug 2013-06-18 15:57:41 -07:00
Kyle Huey
d9a6e18724 Bug 877584: Followup to avoid some crashes during shutdown. r=mccr8 2013-06-18 12:02:16 -07:00
Kyle Huey
1b8071cf87 Bug 882162: Part 9 - Kill nsCycleCollectionJSRuntime. r=mccr8 2013-06-18 12:02:16 -07:00
Kyle Huey
d91ec7682b Bug 877584: Route JS holding through the cycle collection runtime so it can do different things on different threads. r=mccr8 2013-06-18 12:01:26 -07:00
Andrew McCreight
d5603adaa3 Bug 880754 - Remove unused PointerSet typedef. r=khuey 2013-06-10 10:12:17 -07:00