* New nmake file w3i6pc.nmk.
* New stack scanner ssw3i6pc.c supplies missing jump buffer definition.
* Some platform tests change from defined(MPS_PF_W3I6MV) to defined(MPS_OS_w3) && defined(MPS_ARCH_I6).
* Make reasonable changes to the source code to avoid warnings from Pelles C:
** Ensure that printf formats are consistent with arguments by using PRIuLONGEST and casting to ulongest_t.
** Use size_t for loop variables that index into arrays.
** Suppress "Consider changing type to 'size_t' for loop variable" warnings for the MPS core.
Copied from Perforce
Change: 184996
ServerID: perforce.ravenbrook.com
* Refactor nmake files so that a compiler-specific makefile is included; move Microsoft Visual C-specific options to mv.nmk.
* Add nmake files for Pelles (w3i3pc.nmk and pc.nmk).
* Rename spw3i3mv.c to spw3i3.c and spw3i6mv.c to spw3i6.c since these are also used by Pelles C.
* Make reasonable changes to the source code to avoid warnings from Pelles C:
** check results of function calls;
** avoid useless return values;
** undef max before defining it;
** ensure printf formats are checkable;
** move notreached() assertions to the end of blocks;
** suppress warnings in cases where the code shouldn't be changed ("Unreachable code", "Inline assembly code is not portable", "Structured Exception Handling is not portable").
Copied from Perforce
Change: 184977
ServerID: perforce.ravenbrook.com
Includes installable assertion handler, events in circular memory buffers, LARGEADDRESSAWARE, etc.
Copied from Perforce
Change: 182176
ServerID: perforce.ravenbrook.com
1. "make test" now reports the name of the test case before running it, so that when you look back through the test output you can see which test case failed.
2. "make test" now collects the standard output from all the tests to a log file in /tmp, so that this does not clutter the user's terminal, and so that nothing is lost if the output exceeds the terminal's scrollback.
3. Each test case now prints a success message ("Conclusion: Failed to find any defects.") to standard output (not standard error) so that these messages do not clutter up the terminal when running "make test".
4. Each test case now uses its result code (not the printed message) to indicate whether it succeeded or failed.
5. More of the diagnostic messages from the test cases now start by printing argv[0] so that it is easier to tell which test case was running.
Copied from Perforce
Change: 181071
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
arenavm.c:
- M_whole, M_frac: print count of bytes as Megabytes
- diag on VMCompact after all client-requested traces, plus any others where we returned a chunk.
- show vmem change, and also trace cond, live / % / stuck(pip), notCond
mpm.c -- new "$3" format for 0-padding 3-char-wide field, for thousandths of a MB
zcoll.c -- try some new parameters for tests
diag.c -- just VMCompact diag
Copied from Perforce
Change: 170097
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
arenavm.c -- on VMFree(), destroy any empty chunks (except the primary). (VMFree is not the ideal place to do it, but works for proof of concept).
tract.c -- fix ChunkCache defects:
- previously, if cache is empty (chunkCache->chunk == NULL) then other fields are *undefined*; but code looks at them anyway (!) without first checking chunkCache->chunk;
- change it (.chunk.empty.fields) so that, if cache is empty, other fields have defined values: cache-using code may look at them, and they are chosen so that no cache hit will occur.
--> this fixes crashing defect shown by changelist 170072
- AVERT(ChunkCache) in the many places it should be checked;
- use AVERT_CRITICAL in ChunkEncache, because it is called by ChunkOfAddr;
Also:
plan.txt -- notes on use of primary chunk.
config.h -- DIAG also in ci, please [Do not integ to master]
diag.c -- skip ChainCondemnAuto diag thanks
zcoll.c -- move printf announcing Destroying arena etc to just before, not just after, we do it.
Copied from Perforce
Change: 170082
ServerID: perforce.ravenbrook.com
arenavm.c: VMFree is okay for testing chunk-ret; though just sparePagesPurge() for now;
diag.c: show what we want for using zcoll to show chunk-ret:
VM_ix_Create/Destroy
TraceStart, excpet only briefly for dyn-crit (why=2) and not at all for minor
locus.c: no newline on "condemn gens" diag please
tract.c: ChunkDecache is BROKEN; just add AVER to catch this for now
vmix.c: VM_ix_Create_ok/VM_ix_Destroy (vmw3.c needs similar)
zcoll.c:
release after mps_arena_collect!!!
make, collect, make, collect, to show chunk-ret
10MB arena means many chunks
None of this is releaseable quality of course.
Copied from Perforce
Change: 170071
ServerID: perforce.ravenbrook.com
Changes:
- separate ArenaPoll and ArenaStep code paths;
- simplify ArenaPoll;
- loop calling TracePoll to catch-up;
zcoll: 100MB is a more sensible arena size than 0.5 MB
Warning: barely "experimental" code quality, omitting the following necessities:
- consideration of interactions with ArenaStep,
- re-engineering of ArenaPoll and friends.
Copied from Perforce
Change: 169814
ServerID: perforce.ravenbrook.com
poolamc.c tidy up:
neater implementation of obj1pip (amcReclaimNailed)
neater implementation of amcResetTraceIdStats -- no need for a function any more
delete lots of obsolete temporary diagnostic (superseded by AMCTraceEnd_pageret)
a few more avers (especially on buffer empty)
also revert temporary diagnostic changes in arena.c, config.h, diag.c, global.c
diag.c: fix diag-buffer at 100 screenfuls (200000 chars).
zcoll.c: reinstate Make 50000 with occasional big objs.
Copied from Perforce
Change: 168688
ServerID: perforce.ravenbrook.com
(introduced in //info.ravenbrook.com/project/mps/branch/2009-03-31/padding/code/zcoll.chttps://github.com/Ravenbrook/mps/issues/4, changelist 168451)
Now that we have two root tables -- Ambig & Exact -- we had better store them in two separate variables! D'oh.
Bug: single variable "root_table" was used for Ambig, and then re-used for Exact. On clear up, only Exact was mps_root-destroyed, and leaving Ambig still around at mps_arena_destroy. In .variety.ci, after ControlFinish, a CHECKL(RingCheck(&arenaGlobals->rootRing)); tries to access the undestoryed root, even though the ControlPool has been unmapped. This causes seg fault. GDB works fine to show this, with bt.
Fix: two vars; call mps_root_destroy on each.
Copied from Perforce
Change: 168533
ServerID: perforce.ravenbrook.com
zcoll:
- parameterize BigdropSmall for big-obj size and small-obj ref-type, eg "BigdropSmall(big 28000, small A)"
- Park, to avoid all those minor collections. Explanatory comments.
poolamc.c:
- diags: AMCTraceEnd, AMCTraceEnd_perc (new), AMCTraceEnd_pad_med (new),
- AMCTraceEnd: c Segs/Pages Whiten/Reclaim, cPagesRet(ained)
- AMCTraceEnd_perc: percentage of condemned pages retained by ambig refs
- AMCTraceEnd_pad_med: over-detailed calculations of Gain & Loss for Medium segs,
requiring knowledge of size of obj1 in each seg.
diag.c:
- Just show AMCTraceEnd_perc and AMCTraceEnd_pad_med, for zcoll/BigdropSmall's purposes.
Note: poolamc.c now has several episodes of experimental diagnostic in it.
It's time to re-baseline it from an un-hacked version.
Copied from Perforce
Change: 168512
ServerID: perforce.ravenbrook.com
creates a big object and drops the ref to it, followed by a small object and keeps an ambig ref to it (to nail the AMCSeg it is in).
Loops 100 times. This is for testing job001811 changes.
Copied from Perforce
Change: 168451
ServerID: perforce.ravenbrook.com
zcoll.c: BigSmall() command -- creates small, then big, then small object.
poolamc.c: AMCDescribe(): output AMC Seg maps, showing single big object -- a pad -- at end of large-segment.
arena/config/diag: allow output of AMC Seg maps.
Copied from Perforce
Change: 167763
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
unmanaged ambiguous interior pointers (when compiled with
moderate optimization), so comment it out for now.
Copied from Perforce
Change: 167381
ServerID: perforce.ravenbrook.com
1. CatalogCheck(), which verifies the tree.
2. Don't set empty object slots to NULL -- make_dylan_vector() has already set them to a DYLAN_INT(0), which means dylan's fmt_scan ignores them.
3. fflush(stdout) more.
Copied from Perforce
Change: 167321
ServerID: perforce.ravenbrook.com
Also (TEMPORARY) investigate poor seeding of rnd(). Aha --
it's a full-period generator. Therefore the current
randomize is a very poor way to seed it.
Copied from Perforce
Change: 167152
ServerID: perforce.ravenbrook.com