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
Now that we're recommending inlining with client code and optimising with -O2 or -O3, we can't afford any bug introduced by the strict aliasing rule.
Copied from Perforce
Change: 179322
ServerID: perforce.ravenbrook.com
Abolishing event formats. Each event now has its own structure.
Event parameters are now written directly into the event buffer, rather than being copied twice.
Copied from Perforce
Change: 179010
ServerID: perforce.ravenbrook.com
arenavm.c, trace.c, mpmst.h -- trace->preTraceArenaReserved, to show pre- and peak-vmem during collection
Copied from Perforce
Change: 170098
ServerID: perforce.ravenbrook.com
arenavm.c -- move chunk-return into new function "VMCompact".
(also, in VMArenaFinish, null out arena->primary in VMArenaFinish, so it is not left dangling).
arena.c, arenavm.c, mpm.h, mpmst.h, mpmtypes.h:
arena->class->compact: ArenaCompact, ArenaTrivCompact, VMCompact
trace.c -- traceReclaim calls ArenaCompact!
Copied from Perforce
Change: 170095
ServerID: perforce.ravenbrook.com
zcoll.c:
How to get rid of all the objects, so full collect really collects all automatic objects:
- Rootdrop() helps, but we can still retain a 1.2MB object;
- stackwipe() does not help much -- these unwanted ambig refs are being left on the stack by MPS code that runs between mps_arena_collect and the flip!
- therefore StackScan(0/1) to destroy stack+reg root before full collect: it's the only way to be sure.
Reproducibility:
- give Make() a random? switch, acted on by df() = diversity function, to allow bypass of rnd();
- ZRndStateSet, to set the seed for rnd()
Output:
- print_M: switchable Mebibytes or Megabytes (more useful, to be honest);
- get(): don't report message times, it messes up diffs.
testlib.c/h:
Reproducibility:
- fix rnd_state so a rnd_state getter is possible;
- testlib.h += rnd_state_t, rnd_state(), rnd_state_set(), rnd_state_set_v2()
trace.c: traceFindGrey diag: no newline please
Copied from Perforce
Change: 170093
ServerID: perforce.ravenbrook.com
Tracer calls PoolTraceEnd() when the trace is TraceFINISHED.
AbstractPoolClass uses PoolTrivTraceEnd -- a NOOP. [mpm.h, mpmst.h, mpmtypes.h, pool.c, poolabs.c]
AMC overrides with AMCTraceEnd, to emit diagnostic on how well the trace went! [poolamc.c]
Copied from Perforce
Change: 168478
ServerID: perforce.ravenbrook.com
More diag:
- new traceSetSignalEmergency;
- new AMCFix_amcSegCreateNailboard and AMCHeaderFix_amcSegCreateNailboard
(note: the other, unreported, route to becoming boarded is because of a (mutator) buffer);
- in traces: show SegBase and zone;
- in TraceStart: show genZoneSets;
- in amcReclaimNailed: show cbpip and cbpad.
zcoll.c:
- sizemethod 1 to Make command: occasionally makes >1MiB objects;
- declare root_table all MPS_RANK_AMBIG.
Copied from Perforce
Change: 167726
ServerID: perforce.ravenbrook.com
pre-allocate GC messages after the first trace, and verify that
everything still works, droppedMessages is incremented, and reported
as non-zero (in diagnostic varieties only) by global.c on
ArenaDestroy. Test passes.
Copied from Perforce
Change: 166956
ServerID: perforce.ravenbrook.com
re-create them immediately after a trace sends its last message.
Store them, one per TraceId, in ArenaStruct. Cope correctly if they
cannot be created (ControlAlloc fails). Destroy them correctly on
mps_arena_destroy. See job001989 and design/message-gc#lifecycle
(not yet written).
Copied from Perforce
Change: 166918
ServerID: perforce.ravenbrook.com