Gareth Rees
c3fd9d5ba7
Represent the set of generations condemned for a trace.
...
Eliminate duplication between policyCondemnChain and traceCondemnAll.
Compute better mortality estimate for collection of the world.
Copied from Perforce
Change: 194611
2018-07-11 21:14:43 +01:00
Gareth Rees
3366ef1bc2
Catch-up merge from master sources at changelevel 194449 to branch/2018-06-18/mrgseg.
...
Copied from Perforce
Change: 194452
2018-07-05 16:22:24 +01:00
Gareth Rees
2b469ef694
Merge branch/2018-07-04/mvff-perf into the master sources.
...
Copied from Perforce
Change: 194439
2018-07-05 12:54:16 +01:00
Gareth Rees
01ee85b290
No need for rvalue(&(...)) -- the result of the & operator is not an lvalue.
...
Copied from Perforce
Change: 194424
2018-07-05 10:24:22 +01:00
Gareth Rees
5887f80601
Function implementations call the macro implementations, to reduce the burden of keeping the functions and macros consistent.
...
Copied from Perforce
Change: 194418
2018-07-05 09:28:01 +01:00
Gareth Rees
683c79008c
Improve performance of mvff in hot builds by:
...
1. Using macros to bypass PoolFree and Land* generic functions.
2. Compiling out assertions on functions on the critical paths for manual allocation and freeing.
3. Taking advantage of the fact that splay->updateNode does not change during a splay operation.
Copied from Perforce
Change: 194397
2018-07-04 14:30:22 +01:00
Gareth Rees
a5ddfca39b
New generic function segflip allows the segment to decide how to handle a trace that’s about to flip.
...
Copied from Perforce
Change: 194000
2018-06-20 10:23:16 +01:00
Gareth Rees
e93949aeef
Refactor arenapeekseg so that it maintains the mps invariants by scanning the segment if necessary. arenaread is now a thin wrapper around arenapeekseg. new function arenawrite is now the corresponding wrapper around arenapokeseg.
...
MRG reference segments inherit from GCSeg (not MutatorSeg) and so don't have hardware barriers. Instead, the code implements software barriers by always using ArenaRead and ArenaWrite.
Copied from Perforce
Change: 193990
2018-06-19 16:25:52 +01:00
Gareth Rees
7f7822d4ab
Segment class gcseg no longer implements hardware barriers; these are implemented by new subclass mutatorseg, which is now used everywhere that gcseg was used formerly. the idea is that in a future change mrgrefseg will inherit from gcseg instead of mutatorseg.
...
Copied from Perforce
Change: 193981
2018-06-19 14:45:42 +01:00
Gareth Rees
5324b1a2dd
Catch-up merge from master sources at change 193831 to branch/2017-03-04/seg-methods.
...
Copied from Perforce
Change: 193836
2018-06-15 13:46:23 +01:00
Gareth Rees
61e24c399a
Take locks before fork(), release them in the parent and reinitialize them in the child.
...
Add forktest target to the Xcode project.
Write design for fork safety and cross-reference from the code.
Update release notes.
Copied from Perforce
Change: 193760
2018-06-14 16:25:08 +01:00
Gareth Rees
2ccdd80953
Extend forktest so that it does allocation before the fork and collection afterwards; this ensures that we hit the read barrier and thus exercise the exception handling.
...
After forking in the child, re-create exception port and exception thread, and re-register the (only) thread with that port.
Copied from Perforce
Change: 193755
2018-06-14 12:54:35 +01:00
Gareth Rees
47fc093662
Add fork test case (fails on os x if pthread_atfork is not called).
...
pthread_atfork handlers on OS X: in the child, update the mach port for the forking thread and move all other threads to the dead ring.
Copied from Perforce
Change: 193746
2018-06-13 17:09:07 +01:00
Gareth Rees
2b3fbbb8d3
New pool method poolsegpoolgen gets the pool generation for a segment. (this allows the segment whiten and reclaim methods not to need to know the pool class.)
...
Copied from Perforce
Change: 193084
ServerID: perforce.ravenbrook.com
2017-03-31 13:28:25 +01:00
Gareth Rees
d8a5c865ba
Since we know that a segment belongs to a pool with a format at the point where we call segwalk, it makes sense to pass the format.
...
Copied from Perforce
Change: 193079
ServerID: perforce.ravenbrook.com
2017-03-31 09:15:41 +01:00
Gareth Rees
178c269987
Move alignshift to pool structure allows us to eliminate duplicate code between awl and lo.
...
Copied from Perforce
Change: 193071
ServerID: perforce.ravenbrook.com
2017-03-31 08:41:14 +01:00
Gareth Rees
dd1b5b2f27
No need for poolclassmixinscan and abstractscanpool.
...
Copied from Perforce
Change: 193045
ServerID: perforce.ravenbrook.com
2017-03-30 10:23:15 +01:00
Gareth Rees
b295670a76
Changing segnowalk to segtrivwalk avoids the need for attrfmt (now we can walk all segments).
...
Copied from Perforce
Change: 193044
ServerID: perforce.ravenbrook.com
2017-03-30 10:18:22 +01:00
Gareth Rees
4c9f14729f
Move access method from pool class to segment class.
...
Copied from Perforce
Change: 193039
ServerID: perforce.ravenbrook.com
2017-03-30 09:55:37 +01:00
Gareth Rees
109dabad27
Move walk method from pool class to segment class.
...
Copied from Perforce
Change: 193028
ServerID: perforce.ravenbrook.com
2017-03-30 08:54:35 +01:00
Gareth Rees
45e05c62cd
Move fix and fixemergency methods from pool class to segment class.
...
Copied from Perforce
Change: 193023
ServerID: perforce.ravenbrook.com
2017-03-30 08:09:14 +01:00
Gareth Rees
1cb3265e80
Move scan method from pool class to segment class.
...
Copied from Perforce
Change: 193012
ServerID: perforce.ravenbrook.com
2017-03-29 19:17:17 +01:00
Gareth Rees
de269de563
Move reclaim method from pool class to segment class.
...
Copied from Perforce
Change: 193007
ServerID: perforce.ravenbrook.com
2017-03-29 17:13:45 +01:00
Gareth Rees
bfe43c367e
Move whiten method from pool class to segment class.
...
Copied from Perforce
Change: 193002
ServerID: perforce.ravenbrook.com
2017-03-29 16:22:14 +01:00
Gareth Rees
826b74a030
Move greyen method from pool class to segment class.
...
Copied from Perforce
Change: 192997
ServerID: perforce.ravenbrook.com
2017-03-29 15:58:32 +01:00
Gareth Rees
6dabd6de2b
Move the blacken method from the pool class to the segment class.
...
Copied from Perforce
Change: 192994
ServerID: perforce.ravenbrook.com
2017-03-29 15:32:17 +01:00
Gareth Rees
577b32d481
Cherry-pick change 192595 from custom/cet/main, removing mps_addr_object. this function failed to solve the problem of decoding the stack on 64-bit windows, because the stack may need to be decoded after an mps assertion failure, in which case the arena lock is held and mps_addr_object cannot be called. we eventually solved the problem in a different way (using mps_arena_postmortem) and mps_addr_object is no longer used.
...
Copied from Perforce
Change: 192637
ServerID: perforce.ravenbrook.com
2016-10-19 14:13:38 +01:00
Gareth Rees
9f505c501d
Remove unused pool class methods tracebegin and traceend.
...
Remove unused event AMCTraceEnd.
The fixEmergency method must have the same type as the fix method because of how they are used.
Copied from Perforce
Change: 192636
ServerID: perforce.ravenbrook.com
2016-10-19 14:07:20 +01:00
Gareth Rees
52d40d2fed
Remove unused functions landcreate and landdestroy.
...
Copied from Perforce
Change: 192603
ServerID: perforce.ravenbrook.com
2016-10-14 22:30:11 +01:00
Gareth Rees
b4a3d0824b
Rename the "protection mutator context" module to "mutator context" (this module handles mutator context decoding for both the protection module and the thread module).
...
Rename functions Prot{Can,}StepInstruction to MutatorContext{Can,}StepInstruction so that they follow the naming convention in guide.implc.naming.prefix.program.
Move mutator context declarations out of prot.h into new header prmc.h.
Correct .assume.null in a couple of places -- it's not safe for MutatorContextStepInstruction to return ResUNIMPL, instead MutatorContextCanStepInstruction should return FALSE.
Copied from Perforce
Change: 192528
ServerID: perforce.ravenbrook.com
2016-10-13 15:06:14 +01:00
Gareth Rees
437bf9c6a4
Rename mutatorfaultcontext to mutatorcontext because this data structure is not only used to store the context of a fault, but also to store the context of a thread that has been suspended.
...
Copied from Perforce
Change: 192523
ServerID: perforce.ravenbrook.com
2016-10-13 14:23:39 +01:00
Gareth Rees
cb0c6eabef
Catch-up merge from custom/cet/branch/2016-09-13/job004006 to branch/2016-09-06/job004006.
...
Copied from Perforce
Change: 192351
ServerID: perforce.ravenbrook.com
2016-09-13 15:33:31 +01:00
Gareth Rees
d56741e1ea
In order to be able to test mps_arena_busy in all build configurations, we must always take and release the arena lock, even in the single-threaded case. we gain some additional checking by doing this, at low cost (since in this build configuration the locks are generic and so just increment/decrement a count of claims).
...
In the CONFIG_POLL_NONE we configuration, we would still like to check that no traces are busy when leaving the arena, but since we now call ArenaLeave in this configurations, move the assertion to ShieldLeave.
In ArenaDestroy, call ArenaLeave, don't just release the lock.
Copied from Perforce
Change: 192267
ServerID: perforce.ravenbrook.com
2016-09-09 13:01:25 +01:00
Gareth Rees
01c13bf1b5
New functions mps_arena_busy and mps_arena_postmortem, plus test coverage.
...
Copied from Perforce
Change: 192247
ServerID: perforce.ravenbrook.com
2016-09-08 13:55:43 +01:00
Gareth Rees
a42ef06b8d
Catch-up merge from master sources to branch/2016-04-12/job004000.
...
Copied from Perforce
Change: 192187
ServerID: perforce.ravenbrook.com
2016-09-05 16:01:17 +01:00
Gareth Rees
c898410a63
Catch-up merge from the master sources to branch/2016-04-23/inst-methods.
...
Copied from Perforce
Change: 192176
ServerID: perforce.ravenbrook.com
2016-09-05 15:31:34 +01:00
Gareth Rees
8c219cdd92
Catch-up merge from the master sources.
...
Copied from Perforce
Change: 192170
ServerID: perforce.ravenbrook.com
2016-09-05 15:21:33 +01:00
Richard Brooksby
2020da56a6
Replacing segbuffer with version that returns bool and the buffer, and disallowing null to segsetbuffer, adding setunsetbuffer for that case instead.
...
Copied from Perforce
Change: 191695
ServerID: perforce.ravenbrook.com
2016-04-27 15:47:26 +01:00
Richard Brooksby
726ba1d25a
Temporarily introducing seggetbuffer to eliminate use of "null" to mean "no buffer".
...
Copied from Perforce
Change: 191694
ServerID: perforce.ravenbrook.com
2016-04-27 15:27:47 +01:00
Richard Brooksby
de1f3907cc
Converting pool finish methods to specialize instfinish, and fixing up quite a few calls to use nextmethod.
...
Copied from Perforce
Change: 191605
ServerID: perforce.ravenbrook.com
2016-04-23 15:37:12 +01:00
Richard Brooksby
6217b5b3a5
Converting pool describe methods to specialise instdescribe.
...
Copied from Perforce
Change: 191604
ServerID: perforce.ravenbrook.com
2016-04-23 15:37:12 +01:00
Richard Brooksby
b9e791798b
Making describe a method on inst and implementing generic describe for segments.
...
Copied from Perforce
Change: 191601
ServerID: perforce.ravenbrook.com
2016-04-23 15:37:11 +01:00
Richard Brooksby
0ea36ccf02
Turning segment describe methods the right way in, so that they call next-method. deleting duplicate implementation of basic segment describe!
...
Copied from Perforce
Change: 191588
ServerID: perforce.ravenbrook.com
2016-04-23 00:48:48 +01:00
Richard Brooksby
b765128003
Turning pool describe methods the right way in, so that they call next-method.
...
Copied from Perforce
Change: 191587
ServerID: perforce.ravenbrook.com
2016-04-23 00:22:46 +01:00
Gareth Rees
c5da1949c2
Catch-up merge from master sources to branch/2016-04-20/seghasbuffer.
...
Copied from Perforce
Change: 191548
ServerID: perforce.ravenbrook.com
2016-04-22 11:38:55 +01:00
Gareth Rees
8e518349f4
New function seghasbuffer.
...
Copied from Perforce
Change: 191537
ServerID: perforce.ravenbrook.com
2016-04-22 10:08:29 +01:00
Gareth Rees
82690aa532
Untabify.
...
Copied from Perforce
Change: 191528
ServerID: perforce.ravenbrook.com
2016-04-21 20:50:45 +01:00
Gareth Rees
613f001ec5
Catch-up merge from master sources to branch/2016-04-12/job004000.
...
Copied from Perforce
Change: 191512
ServerID: perforce.ravenbrook.com
2016-04-21 18:03:23 +01:00
Richard Brooksby
4be15a5b0b
Catch-up merge from master sources to branch/2016-04-08/protidying.
...
Copied from Perforce
Change: 191471
ServerID: perforce.ravenbrook.com
2016-04-21 14:46:10 +01:00
Gareth Rees
8868a011a7
Catch-up merge from master sources to branch/2016-04-12/job004000.
...
Copied from Perforce
Change: 191429
ServerID: perforce.ravenbrook.com
2016-04-21 10:52:18 +01:00