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
function; MPS calls it synchronously on collection start/stop
(immediately after posting start/stop message). The callback
receives two ints: alertcode (start|stop; see mps.h), and whycode
(trace->why). Note: callback is also called for heap walk
start/stop.
amcss.c: show start/stop alerts.
Copied from Perforce
Change: 166703
ServerID: perforce.ravenbrook.com
the whole of a given diag, so memoize it (instead of repeating the
match for every line of the diag).
locus.c: new diag from ChainCondemnAuto.
trace.c: tidy up TraceStart diag, give traceFindGrey diag a tag.
Copied from Perforce
Change: 163077
ServerID: perforce.ravenbrook.com
report helpfully if poor programmer forgot to end a tag.
FilterOutput: really filters now, but only on Tag.
Copied from Perforce
Change: 163070
ServerID: perforce.ravenbrook.com
diag.c: support tagging of diagnostics, and avoid having to
say DIAG_STREAM every time, with new macros:
DIAG_SINGLEF, DIAG_FIRSTF, DIAG_MOREF, DIAG_END.
mpm.c: new WriteF_firstformat_v required by DIAG_MOREF.
Copied from Perforce
Change: 163059
ServerID: perforce.ravenbrook.com
and ToTextBuffer), and fix DIAG in TraceStart to use ToString.
(Previous hack of using the start-message's buffer only works if
the client has enabled start messages).
Copied from Perforce
Change: 162964
ServerID: perforce.ravenbrook.com
PoolTrivGrey knows that a white seg is an all-white seg, and
therefore needs no greying.
Copied from Perforce
Change: 162946
ServerID: perforce.ravenbrook.com
trace.c: traceFindGrey_diag: wrap calls in DIAG(), prevent report
overflow, reduce report array to 20 chars, and use WriteF.
Copied from Perforce
Change: 162937
ServerID: perforce.ravenbrook.com