Commit Graph

576 Commits

Author SHA1 Message Date
Andrew McCreight
5431260047 Bug 1007722 - Add helper methods for gray and black JS in the CC. r=smaug 2014-05-14 09:45:50 -07:00
Andrew McCreight
b2766fa0a8 Bug 1005396 - Finish a long ICC early after graph building has finished. r=smaug 2014-05-14 09:45:50 -07:00
Nicholas Nethercote
99bdb71ce7 Bug 1005836 - Avoid slop NodePool::Block allocations. r=mccr8. 2014-05-13 20:42:27 -07:00
Jed Davis
8080554f76 Bug 973090 - IPC remoting for child GC/CC logging. r=mccr8, r=bent
This has a few semi-interdependent pieces:

* Factoring out the file opening/closing/renaming from the GC/CC logging.

* Using IPC to have the child log to files that the parent opened.

* Changing nsIMemoryInfoDumper.dumpGCAndCCLogsToFile to report completion
  of child process logging (which was impossible before this, and which is
  needed to have a meaningful test case).

* Changing about:memory to dump logs for child processes, matching the
  behavior of the "Measure" button, because it can tell the user where
  they are now.

* Add a test for multiprocess GC/CC log dumping (only of the XPCOM
  interface, not by clicking buttons and scraping the about:memory page,
  but done as a chrome mochitest to start remote browsers); based on
  test_memoryReporters2.xul in the same directory.
2014-05-13 13:13:00 -04:00
Birunthan Mohanathas
e44da12c54 Bug 995730 - Fix style violations in xpcom/base/. r=froydnj,continuation 2014-05-13 20:41:38 +03:00
Andrew McCreight
a550b0aade Bug 1005500 - Use a separate linear scan pass to mark nodes white in ScanRoots. r=smaug
The existing code for ScanRoots looks at all traversal roots in the graph,
and floods white or black from them. This can take up a large chunk of the
Scan/Unlink slice of ICC, maybe because graph traversal has poor locality.

Outside of a leak, the cycle collector graph is usually only large when
there is a lot of garbage (95% or more of the graph), so we want to
speed up white marking.

To do this, I add a new pass that scans every node and directly sets the
color of any node that should be white, without flooding. This is very
fast. Then a second pass floods black from any remaining grey nodes.

On the page close CC for a real page, I measured a 10x improvement in
ScanRoots() time with this algorithm, from 3ms to 0.3ms.
2014-05-08 11:28:03 -07:00
Andrew McCreight
321341d0fd Bug 1005975 - Define FloodBlackNode as a convenience function. r=smaug 2014-05-06 17:25:27 -07:00
Andrew McCreight
982ca39013 Bug 1006635, part 2 - Add more Checkpoints to the cycle collector. r=smaug 2014-05-06 17:25:27 -07:00
Andrew McCreight
0d15833a8f Bug 1006635, part 1 - Make TimeLog use doubles and reduce the threshold. r=smaug 2014-05-06 17:25:27 -07:00
Andrew McCreight
a8418734ff Bug 1005232 - Log number of incremental cycle collector slices. r=smaug 2014-05-06 17:25:26 -07:00
Andrew McCreight
aad70b5de8 Bug 1004017 - Rename CycleCollectedJSRuntime::NeedCollect() and Collect(). r=smaug 2014-05-06 17:25:26 -07:00
Andrew McCreight
81a65c1794 Bug 958353 - Add finishCC() and ccSlice() methods for testing incremental cycle collection. r=smaug 2014-05-06 17:25:26 -07:00
Birunthan Mohanathas
34a78370e0 Bug 995730 - Change xpcom/base/ to use 2 space indentation
This also removes trailing whitespace in reindented files.
2014-05-05 20:30:39 +03:00
Birunthan Mohanathas
eeb9aaaa94 Bug 900908 - Part 3: Change uses of numbered macros in nsIClassInfoImpl.h/nsISupportsImpl.h to the variadic variants. r=froydnj 2014-04-27 03:06:00 -04:00
Eric Faust
31c4d973f8 Bug 1001126 - Allow AllTraces CC logging other than at shutdown. (r=mccr8) 2014-04-24 14:28:49 -07:00
Terrence Cole
d4df410ec3 Bug 994413 - Make Gecko use the same value marking semantics as SpiderMonkey; r=jonco,mccr8 2014-04-09 12:42:48 -07:00
Ryan VanderMeulen
d7ac4c6c4e Merge inbound to m-c. 2014-03-26 20:58:31 -04:00
Alphan Chen
57ab461ae9 Bug 964636 - Part 1: Move common classes and functions out of nsMemoryInfoDumper. r=dhylands 2014-03-20 15:29:51 +08:00
Eric Faust
cafd8088f2 Bug 987750 - Add CC logging options for process specifiers. (r=mccr8) 2014-03-26 09:57:38 -07:00
Andrew McCreight
49f7b898a5 Bug 984665 - Change the extra shutdown CC assertion into a warning. r=smaug 2014-03-19 06:05:18 -07:00
Andrew McCreight
64b6629327 Bug 984685 - Add cycle collector efficiency to COLLECT_TIME_DEBUG logging. r=smaug 2014-03-19 06:05:17 -07:00
Andrew McCreight
949d036f1a Bug 948755 - Log incremental cycle collector roots. r=smaug 2014-03-14 16:07:07 -07:00
Andrew McCreight
8bdfa70775 Bug 981033 - Clear mActivelyCollecting before restarting CC. r=smaug 2014-03-11 07:34:35 -07:00
Bobby Holley
0e4dbf25c6 Bug 975419 - Add a JS::TenuredHeap<JSObject*> overload to TraceCallbacks. r=mccr8,terrence 2014-03-03 08:53:42 -08:00
Andrew McCreight
131f66e6f4 Bug 977688 - Get rid of CC_AbortIfNull. r=smaug 2014-02-28 09:56:23 -08:00
Andrew McCreight
aded529f53 Bug 962608 - Make PL_DHashTableInit infallible by default. r=briansmith,bsmedberg,ehsan,froydnj,jduell,jfkthame,roc,smaug 2014-02-27 10:04:09 -08:00
Andrew McCreight
cda82486a5 Bug 901597, part 2 - Add environment var to CC log only main or worker threads. r=smaug 2014-02-20 14:27:04 -08:00
Andrew McCreight
4b888f463f Bug 901597, part 1 - Move CC logging logic into nsCCParams. r=smaug 2014-02-20 14:27:03 -08:00
Andrew McCreight
fc214e24fa Bug 972940 - Rename XPCOM_CC_ env vars to MOZ_CC_. r=smaug,njn 2014-02-20 14:27:03 -08:00
Andrew McCreight
7d5e2653b1 Backout bug 972940 for valgrind leaks on this CLOSED TREE 2014-02-19 17:20:48 -08:00
Andrew McCreight
49d0ebe9c3 Backout bug 901597 for valgrind leaks 2014-02-19 17:19:17 -08:00
Andrew McCreight
ea4cf6b45f Backout bug 901597 for valgrind leaks 2014-02-19 17:18:59 -08:00
Andrew McCreight
d72565148a Bug 901597, part 2 - Add environment var to CC log only main or worker threads. r=smaug 2014-02-19 13:27:15 -08:00
Andrew McCreight
a612a62994 Bug 901597, part 1 - Move CC logging logic into nsCCParams. r=smaug 2014-02-19 13:27:14 -08:00
Andrew McCreight
ad5a5722c9 Bug 972940 - Rename XPCOM_CC_ env vars to MOZ_CC_. r=smaug 2014-02-19 13:27:14 -08:00
Andrew McCreight
78e856aea3 Bug 966359 - Prevent FreeSnowWhite reentrance. r=smaug 2014-02-11 14:56:44 -08:00
Ehsan Akhgari
860f2c1f29 Bug 969757 - Remove the dead code in our tree which pretends to support OS/2; r=roc,mcmanus,gps,jorendorf,bsmedberg sr=bsmedberg 2014-02-10 17:57:01 -05:00
Nicholas Nethercote
2fba2310da Bug 903131 - Add save GC/CC logs buttons to about:memory. r=njn,mccr8. 2014-01-31 14:43:08 -08:00
Olli Pettay
80834fd568 Bug 958315 - Suspect JS things released by dying C++ objects in the next CC, r=mccr8 2014-01-14 22:23:59 +02:00
Andrew McCreight
a65df7c510 Bug 956080 - Rename BeginCycleCollection to TraverseRoots. r=smaug 2014-01-07 17:33:47 -08:00
Andrew McCreight
3af27f9483 Bug 950959 - Rename scheduled cycle collector stuff to slice. r=smaug 2014-01-01 11:00:35 -08:00
Andrew McCreight
b3b5eec196 Bug 950949 - Run forgetSkippable per CC not per slice. r=smaug 2014-01-01 11:00:35 -08:00
Andrew McCreight
27829b6a48 Bug 937960, part 3 - Pass in a small time budget with ICC. r=smaug 2013-12-22 09:58:19 -05:00
Ryan VanderMeulen
bc4d191fcb Backed out changesets ccdc3d4f4571, 4dcc91e771e3, 0ae14946314b, and 94d22ab0b17f (bug 937960) for Windows 7 debug xpcshell failures. 2013-12-19 16:57:55 -05:00
Andrew McCreight
95a44e0019 Bug 937960, part 3 - Pass in a small time budget with ICC. r=smaug 2013-12-18 21:22:55 -08:00
Ryan VanderMeulen
8b097825dd Backed out changesets b03bd1170d1c, 419615a1195d, a1b699b80442, and 524c573fd8a6 (bug 937960) for Win7 debug xpcshell orange. 2013-12-18 19:04:11 -05:00
Andrew McCreight
2d095ccd3c Bug 937960, part 3 - Pass in a small time budget with ICC. r=smaug 2013-12-18 11:42:16 -08:00
Andy Wingo
fb095359ce Bug 951483 - Add back nsCycleCollector::ShutdownCollect assertion that was mistakenly removed in bug 945813. r=mccr8 2013-12-18 11:01:32 +01:00
Andrew McCreight
fd1d37583e Bug 937818, part 4 - Exceeded refcount nodes should already be black. r=smaug
Due to graph mutation during an incremental cycle collection, objects in the CC graph
may end up with more things pointing to them than they have a ref count. However, these
objects should never become garbage.
2013-12-17 19:29:57 -08:00
Andrew McCreight
290896ed55 Bug 937818, part 3 - Add ScanIncrementalRoots(). r=smaug
Any object that has been stored away somewhere in the middle of incremental graph
building must be treated as live, because we can't trust that the CC graph has
accurate information about it. If such an object is truly garbage, we'll unlink it
in the next cycle collection instead.
2013-12-17 19:29:57 -08:00