Gareth Rees
9dc8bd1e70
Because of the requirement to make popped objects dead in a timely fashion, we can only implement lightweight pops to an address in the buffer. in particular we can't support pending pops, which means that there's no need for the fields in the allocation point that support pending pops.
...
Copied from Perforce
Change: 187232
ServerID: perforce.ravenbrook.com
2014-10-13 12:46:28 +01:00
Gareth Rees
00229b0479
Use the method suffix only for methods in classes; use visitor or function for other kinds of functions.
...
New document guide.impl.c.naming sets out the rules for naming.
Copied from Perforce
Change: 187159
ServerID: perforce.ravenbrook.com
2014-10-07 23:48:55 +01:00
Gareth Rees
c968255f1e
Ensure that code of the form if (condition) statement; is split over two lines, so that it is possible to set a breakpoint on the statement in a debugger.
...
This change was agreed in 1997 (see <https://info.ravenbrook.com/project/mps/mail/1997/08/19/13-44/0.txt >), so it's about time it was implemented.
Copied from Perforce
Change: 187071
ServerID: perforce.ravenbrook.com
2014-09-27 22:57:02 +01:00
Gareth Rees
1f517274f3
Cast all arguments to the writef function to make it easy to check that none of the necessary casts have been omitted.
...
New macro WriteFYesNo makes it easy to describe a Boolean.
Describe more structure elements for ABQ, Arena, Buffer, Format, MFS, Root, Seg.
Copied from Perforce
Change: 187063
ServerID: perforce.ravenbrook.com
2014-09-27 12:49:30 +01:00
David Lovemore
392e6a056a
Catch up merge from master/...@186577
...
Copied from Perforce
Change: 186582
ServerID: perforce.ravenbrook.com
2014-06-13 16:38:20 +01:00
Gareth Rees
8b012960dc
Some assertions with && crept back in. split them up so that we get as much information as possible from an assertion failure.
...
Copied from Perforce
Change: 186577
ServerID: perforce.ravenbrook.com
2014-06-13 15:52:50 +01:00
Gareth Rees
a13a1aa1df
Catch-up merge from master sources @186564 to branch/2014-06-11/grain.
...
Copied from Perforce
Change: 186572
ServerID: perforce.ravenbrook.com
2014-06-13 15:30:46 +01:00
Gareth Rees
0f5c639e59
Fix problems identified by rb in review < https://info.ravenbrook.com/mail/2014/06/13/13-52-14/0/ >.
...
Copied from Perforce
Change: 186570
ServerID: perforce.ravenbrook.com
2014-06-13 15:16:02 +01:00
Gareth Rees
08f341fcc9
Catch-up merge from master sources @186540 to branch/2014-05-17/chunk-tree.
...
Copied from Perforce
Change: 186546
ServerID: perforce.ravenbrook.com
2014-06-12 17:55:16 +01:00
Gareth Rees
5e11b7034a
Catch-up merge from master sources @186536 to branch/2014-05-15/size.
...
Copied from Perforce
Change: 186539
ServerID: perforce.ravenbrook.com
2014-06-12 16:46:36 +01:00
Gareth Rees
9268a0adc8
Catch-up merge from master sources @186528 to branch/2014-04-15/mvffnoseg.
...
Copied from Perforce
Change: 186534
ServerID: perforce.ravenbrook.com
2014-06-12 15:59:39 +01:00
Gareth Rees
cb629746ea
Catch-up merge from masters sources @186519 to branch/2014-04-17/describe.
...
Copied from Perforce
Change: 186526
ServerID: perforce.ravenbrook.com
2014-06-12 13:45:22 +01:00
Gareth Rees
de2a30d207
Catch-up merge from master sources @186481 to branch/2014-05-17/chunk-tree.
...
Copied from Perforce
Change: 186491
ServerID: perforce.ravenbrook.com
2014-06-11 13:52:31 +01:00
Gareth Rees
5969ae2114
Catch-up merge from branch/2014-04-15/mvffnoseg @186485 to branch/2014-05-15/size.
...
Copied from Perforce
Change: 186487
ServerID: perforce.ravenbrook.com
2014-06-11 13:17:14 +01:00
Gareth Rees
a08139899f
Catch-up merge from master sources @186481 to branch/2014-04-15/mvffnoseg.
...
Copied from Perforce
Change: 186484
ServerID: perforce.ravenbrook.com
2014-06-11 12:42:58 +01:00
David Lovemore
84ddecde2f
Amc now respects mps_key_extend_by keyword argument.
...
AMC also uses MPS_KEY_LARGE_SIZE keyword argument to specify what size objects need to be to live on their own segment.
Copied from Perforce
Change: 186480
ServerID: perforce.ravenbrook.com
2014-06-11 12:12:44 +01:00
Gareth Rees
3f98a87c2e
Remove unused pool class attributes.
...
Bring method descriptions up to date in pool class design.
Copied from Perforce
Change: 186446
ServerID: perforce.ravenbrook.com
2014-06-08 19:54:24 +01:00
Gareth Rees
dbfe3ca425
Fix compilation on windows.
...
Fix bug in ArenaDescribeTracts (only described the first tract).
Copied from Perforce
Change: 186215
ServerID: perforce.ravenbrook.com
2014-05-20 19:19:14 +01:00
Gareth Rees
47befaa46b
Use treefind instead of splaytreefind to search the chunk tree.
...
Balance the chunk tree after insertion and deletion.
Avoid calling TractFirst and TractNext in ArenaDescribeTracts and PoolOfRange.
Copied from Perforce
Change: 186199
ServerID: perforce.ravenbrook.com
2014-05-19 20:19:50 +01:00
Gareth Rees
981a266642
New public functions mps_pool_total_size and mps_pool_free_size.
...
Old (undocumented) functions mps_{mv,mvff,mvt}_size and mps_{mv,mvff,mvt}_free_size are now macros for the new public functions.
New pool methods PoolTotalSize and PoolFreeSize, with implementations for public pool classes except SNC.
Coverage of the new functions in apss and mpmss for the manual pool classes, and in finaltest for the automatic pool classes.
Copied from Perforce
Change: 186118
ServerID: perforce.ravenbrook.com
2014-05-15 17:01:59 +01:00
Gareth Rees
f4a4f1e250
Merge branch/2014-02-23/mvff-tune into branch/2014-04-15/mvffnoseg.
...
Copied from Perforce
Change: 186079
ServerID: perforce.ravenbrook.com
2014-05-13 16:10:51 +01:00
Gareth Rees
c77c91056d
Consistent order stream, depth.
...
Copied from Perforce
Change: 186001
ServerID: perforce.ravenbrook.com
2014-05-11 18:30:23 +01:00
Gareth Rees
2493f121dc
Correct indentation of describe output by passing depth parameter to describe functions and to writef.
...
Call Describe functions from test cases so that we get coverage.
Copied from Perforce
Change: 186000
ServerID: perforce.ravenbrook.com
2014-05-11 18:20:38 +01:00
Gareth Rees
d1b44a4f05
Back out change 185626 (violates the design.mps.writef.snazzy).
...
Copied from Perforce
Change: 185941
ServerID: perforce.ravenbrook.com
2014-05-02 12:44:31 +01:00
Gareth Rees
6721c2b913
Correct indentation of describe output.
...
Copied from Perforce
Change: 185626
ServerID: perforce.ravenbrook.com
2014-04-17 13:36:42 +01:00
Gareth Rees
4e8b76ac54
Catch-up merge from master sources to branch/2014-01-15/nailboard.
...
Copied from Perforce
Change: 185275
ServerID: perforce.ravenbrook.com
2014-04-07 10:38:08 +01:00
Gareth Rees
d3d2795fce
Improve control over checking:
...
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
2014-04-06 22:51:05 +01:00
Gareth Rees
9bb6b2f8be
Tidy-up of attributes and pool classes:
...
* 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
2014-04-04 17:05:08 +01:00
Gareth Rees
1fc2bbe52b
Fixed dl's review comments < https://info.ravenbrook.com/mail/2014/04/01/13-28-17/0/ >.
...
Copied from Perforce
Change: 185127
ServerID: perforce.ravenbrook.com
2014-04-01 17:02:00 +01:00
Gareth Rees
784bc484ca
Poolfix is on the critical path, so use aver_critical rather than aver.
...
Copied from Perforce
Change: 184693
ServerID: perforce.ravenbrook.com
2014-03-08 10:23:09 +00:00
Richard Brooksby
f31fc5325a
Instead of aggressively returning every page it can, mvff takes a parameter for the proportion of spare space to hold in its free lists before attempting to return space to the arena.
...
Copied from Perforce
Change: 184498
ServerID: perforce.ravenbrook.com
2014-02-24 23:04:31 +00:00
Richard Brooksby
4b50f3688b
Adding mps_key_gen generation keyword to pools that take a chain (except amc), so that you can specify which generation to allocate in by default. this allows some flexibility when the client can predict the lifetimes of objects.
...
The AWL and LO pools allocate into generation 1 of the arena default chain if neither MPS_KEY_CHAIN or MPS_KEY_GEN is specified, simulating the default setup before the chain-zones branch.
Copied from Perforce
Change: 184231
ServerID: perforce.ravenbrook.com
2014-01-30 14:27:09 +00:00
Gareth Rees
ea9df0b2b7
Merge custom cet mainline into the master sources. this includes fixes for job003519 (clock values in text telemetry logs on windows have top 32 bits zero), job003536 (cet office can't replicate 100k snowmen in reasonable time), job003651 (stack overflows are not reliably handled).
...
Copied from Perforce
Change: 183926
ServerID: perforce.ravenbrook.com
2014-01-10 14:16:08 +00:00
Gareth Rees
25bfea8ba8
Move the poolhasrange test to pool.c so that all frees (including internal ones) get the check.
...
Copied from Perforce
Change: 182783
ServerID: perforce.ravenbrook.com
2013-06-17 17:52:25 +01:00
Richard Brooksby
56645cdc0c
Merging branch/2013-05-17/emergency with major rework of mvt, mvff, and cbs.
...
Some parts of this are still ragged, and would not normally pass review, but this is a massive improvement to the existing code.
Copied from Perforce
Change: 182614
ServerID: perforce.ravenbrook.com
2013-06-08 10:57:57 +01:00
Gareth Rees
509ebcb215
Check that all addresses in the freed range belong to the pool, not just the base of the range.
...
Copied from Perforce
Change: 182602
ServerID: perforce.ravenbrook.com
2013-06-07 13:20:20 +01:00
Nick Barnes
6999ce3586
Tiny typo corrections.
...
Copied from Perforce
Change: 182009
ServerID: perforce.ravenbrook.com
2013-05-20 19:15:49 +01:00
Richard Brooksby
688b5bf73d
Converting varags on buffer and ap creation into keyword argument lists.
...
Copied from Perforce
Change: 181680
ServerID: perforce.ravenbrook.com
2013-05-09 18:25:53 +01:00
Richard Brooksby
3189ccfc9b
Consolidating common pool keywords.
...
Copied from Perforce
Change: 181649
ServerID: perforce.ravenbrook.com
2013-05-09 00:06:07 +01:00
Richard Brooksby
03c7de38b6
Macroizing keyword definitions and adding more keyword argument checking methods.
...
Copied from Perforce
Change: 181647
ServerID: perforce.ravenbrook.com
2013-05-08 23:40:40 +01:00
Richard Brooksby
71b7e4f70a
Pushing varargs decoding into a pool class method. much simpler.
...
Copied from Perforce
Change: 181642
ServerID: perforce.ravenbrook.com
2013-05-08 22:43:51 +01:00
Richard Brooksby
c781e594a8
Adding keyword argument checking for format and chain.
...
Copied from Perforce
Change: 181637
ServerID: perforce.ravenbrook.com
2013-05-08 16:29:12 +01:00
Richard Brooksby
07f446a450
Converting pools to use keyword arguments, mostly, and so far inconsistently, but at least it compiles.
...
Copied from Perforce
Change: 181635
ServerID: perforce.ravenbrook.com
2013-05-08 16:21:12 +01:00
Richard Brooksby
41eb36869e
Converting more "@@@@" markers to notes or action-oriented todos.
...
Copied from Perforce
Change: 179692
ServerID: perforce.ravenbrook.com
2012-09-25 23:46:28 +01:00
Richard Brooksby
858e4ac0ac
Partial merge of branch/2012-07-23/cet-transform, excluding cet-specific parts.
...
Copied from Perforce
Change: 179309
ServerID: perforce.ravenbrook.com
2012-09-06 17:17:18 +01:00
Richard Brooksby
27c6706791
Merging branch/2012-08-21/diagnostic-telemetry.
...
Copied from Perforce
Change: 179289
ServerID: perforce.ravenbrook.com
2012-09-05 23:45:31 +01:00
Richard Brooksby
915c01ef3e
Merging branch/2012-08-15/variety-reform.
...
Copied from Perforce
Change: 179279
ServerID: perforce.ravenbrook.com
2012-09-05 18:44:44 +01:00
David Lovemore
886e96ba8e
Fix weak band assert. we now trace weak segments as weak on a fault if we are in the weak band.
...
Copied from Perforce
Change: 179210
ServerID: perforce.ravenbrook.com
2012-09-03 17:05:51 +01:00
Richard Brooksby
89a685f164
Renaming some check* macros with more accurate names, making remaining check* macros similar in function.
...
Copied from Perforce
Change: 179155
ServerID: perforce.ravenbrook.com
2012-09-01 10:18:08 +01:00
David Lovemore
ed8cd9432d
In tracescanareatagged use the alignments of pools in the condemned set to determine mask.
...
Copied from Perforce
Change: 179117
ServerID: perforce.ravenbrook.com
2012-08-30 13:48:41 +01:00