1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-24 06:20:43 -08:00
Commit graph

81 commits

Author SHA1 Message Date
Richard Brooksby
d618f77b2e Removing unused (and useless) poolfix macro.
Copied from Perforce
 Change: 191407
 ServerID: perforce.ravenbrook.com
2016-04-21 08:59:52 +01:00
Gareth Rees
77b12d3ee7 Catch-up merge from master sources to branch/2014-10-11/snc.
Copied from Perforce
 Change: 191065
 ServerID: perforce.ravenbrook.com
2016-04-13 13:07:19 +01:00
Richard Brooksby
9583c0f68a Merging branch mps/branch/2016-03-13/without-reservation into master sources.
Copied from Perforce
 Change: 190106
 ServerID: perforce.ravenbrook.com
2016-03-15 13:19:27 +00:00
Richard Brooksby
26da5b46b0 Catch-up merge from master sources to branch/2014-10-13/format.
Copied from Perforce
 Change: 190060
 ServerID: perforce.ravenbrook.com
2016-03-15 10:02:21 +00:00
Richard Brooksby
07987ab579 Eliminating withreservoirpermit and all its variants.
Copied from Perforce
 Change: 190005
 ServerID: perforce.ravenbrook.com
2016-03-13 21:04:01 +00:00
Gareth Rees
6521d927eb Add accesssetcheck and check accessset arguments.
Copied from Perforce
 Change: 188251
 ServerID: perforce.ravenbrook.com
2015-09-04 20:15:36 +01:00
Gareth Rees
4ce030ad13 Use a reference count to discover cases where a format is deleted when a pool is still using it, as suggested by rb <https://info.ravenbrook.com/mail/2014/10/16/13-35-06/0/>.
Copied from Perforce
 Change: 187279
 ServerID: perforce.ravenbrook.com
2014-10-16 22:59:00 +01:00
Gareth Rees
72a38afb68 Remove unused pool {fill,empty}{mutator,internal}size statistics.
Copied from Perforce
 Change: 187270
 ServerID: perforce.ravenbrook.com
2014-10-14 22:37:55 +01:00
Gareth Rees
0c42e3aa23 Improved assertion messages when a required keyword argument is not found. instead of "unreachable code", the assertion message is the name of the missing key.
Copied from Perforce
 Change: 187267
 ServerID: perforce.ravenbrook.com
2014-10-14 22:05:30 +01:00
Gareth Rees
7db46bbb3f Check alignment of address given to poolfree.
Copied from Perforce
 Change: 187265
 ServerID: perforce.ravenbrook.com
2014-10-14 16:54:10 +01:00
Gareth Rees
ae805ce16e Simpler and more robust to add the pool to the formatring in poolinit, after we know that the initialization has succeeded.
Copied from Perforce
 Change: 187261
 ServerID: perforce.ravenbrook.com
2014-10-14 10:07:41 +01:00
Gareth Rees
f65f1db83e Attach the pools using a format to a ring in the format, so that when we destroy the format, we can check that no pools are using it.
Copied from Perforce
 Change: 187253
 ServerID: perforce.ravenbrook.com
2014-10-13 22:44:20 +01:00
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