Avoid read and write barrier in non-incremental mode.
Add --non-incremental option to gcbench
Copied from Perforce
Change: 186969
ServerID: perforce.ravenbrook.com
Change the arena's chunk tree from a splay tree to an ordinary tree (so that it's not possible to accidentally splay it and leave it unbalanced).
New function TreeFindNext allows us to implement TractFirst and TractNext without having to splay the tree.
Make sure all operations on the chunk tree leave it balanced. But don't balance the tree directly in ChunkFinish() because this is only ever called in a loop where multiple chunks are being deleted from the tre. Instead use the sequence TreeToVine -- iterate and delete -- TreeBalance. The new macro TREE_DESTROY assists with this.
No need any more for ArenaIsReservedAddr, CHUNK_OF_ADDR, TRACT_OF_ADDR.
Update design documentation.
Copied from Perforce
Change: 186212
ServerID: perforce.ravenbrook.com
Add ArenaDescribe calls to amcss and finalcv to get coverage of PoolGenDescribe, TraceDescribe, and MRGDescribe.
Copied from Perforce
Change: 186010
ServerID: perforce.ravenbrook.com
Get rid of proflow member of GenDescStruct (it was unused).
Use STATISTIC to avoid updating segs, freeSize, oldSize, and oldDeferredSize in non-checking varieties.
Add design for pool generation accounting.
Copied from Perforce
Change: 185930
ServerID: perforce.ravenbrook.com
Allocation into a generation now via PoolGenAlloc (not ChainAlloc).
The "top generation" logic is encapsulated in the function ChainGen.
Copied from Perforce
Change: 185877
ServerID: perforce.ravenbrook.com
1. TraceStartCollectAll now condemns all segments in pools with AttrGC (not just pools attached to generation zero of some chain, as before).
2. ChainDeferral now looks at all generations in the chain, so that the chain is condemned if any generation's new size is greater than its capacity (not just generation zero, as before).
3. ChainCondemnAuto now condemns all generations up to and including the highest generation whose new size is greater than its capacity (rather than, as before, up to and excluding the lowest generation whose new size is lower than its capacity).
Update finaltest.c so that it has a mode in which it allocates in generation 1 of a chain and with the arena released so that the above fixes are tested. Remove the MPS_KEY_GEN workarounds from awlut and awluthe as these are no longer needed.
Copied from Perforce
Change: 185741
ServerID: perforce.ravenbrook.com
1. Where Type is a pointer type with a signature, replace CHECKL(TypeCheck(val)) with CHECKD(Type, val).
2. Where Type is a pointer type with no signature, replace CHECKL(TypeCheck(val)) with CHECKD_NOSIG(Type, val).
3. Where Type is a pointer type with a signature, but the structure is not visible at point of checking, replace CHECKL(TypeCheck(val)) with CHECKD_NOSIG(Type, val). Reference <design/check/#.hidden-type>
4. Make BTCheck extern and use it where possible.
5. Replace AVER(TypeCheck(val)) with AVERT(Type, val).
Copied from Perforce
Change: 185263
ServerID: perforce.ravenbrook.com
* Bring design up to date.
* New function PoolHasAttr encapsulates attribute checking.
* Abstract classes are abstract and mustn't be checked.
* The dummy pool class in fotest needs a size.
* Abstract pool classes null out methods that they can't provide a generic implementation for, to force subclasses to provide one.
* New function PoolTrivFramePopPending provides a generic implementation of that method.
* Rename PoolNoFreeWalk to PoolTrivFreeWalk since it has NOOP rather than NOTREACHED.
* Check that AttrMOVINGGC implies AttrGC.
* Remove unimplemented attributes (BUF_RESERVE, BUF_ALLOC, INCR_RB, INCR_WB, PM)
* AMC now inherits from AMCZ instead of the other way round. This is simpler: AMC adds features to AMCZ rather than AMCZ taking features away (and not quite getting it right).
* Similarly, LO inherits from AbstractSegBufPoolClass + PoolClassMixInCollect so that it doesn't have to clear AttrSCAN and the scan methods.
* Fix bug in MFSCheck -- mustn't check unroundedUnitSize >= UNIT_MIN since small unit sizes are rounded up to UNIT_MIN.
* Don't see AttrFREE in MRG (since no free method is supplied).
* Check AttrSCAN systematically (in PoolScan and SegCheck) rather than opportunistically in TraceStart and TraceQuantum.
Copied from Perforce
Change: 185231
ServerID: perforce.ravenbrook.com
Remove unreachable code:
* No need to have different debug options or structured allocation classes for different platforms.
* Don't use STATISTIC_BEGIN, use STATISTIC_STAT.
* #ifdef away the unused code in zmess.c for testing ControlAlloc failure.
* Remove unused code from the example Scheme interpreter.
Copied from Perforce
Change: 185089
ServerID: perforce.ravenbrook.com
Using arena->topGen->mortality for the dynamic generation’s mortality, rather than a global variable.
Copied from Perforce
Change: 184216
ServerID: perforce.ravenbrook.com
Includes installable assertion handler, events in circular memory buffers, LARGEADDRESSAWARE, etc.
Copied from Perforce
Change: 182176
ServerID: perforce.ravenbrook.com
This was the result of noticing a large number of SetSetGrey events that set the segment to the same greyness when scanning ambiguous references.
Copied from Perforce
Change: 179567
ServerID: perforce.ravenbrook.com
Adding a pseudo-target "find-puns" which, on FreeBSD mostly, prints useful warnings about strict aliasing rule violations.
Fixing more strict aliasing rule violations found by the above.
Copied from Perforce
Change: 179358
ServerID: perforce.ravenbrook.com
Fixing cast from external scan state structure to a PARENT, now that we're not punning the pointer any more.
Copied from Perforce
Change: 179347
ServerID: perforce.ravenbrook.com