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

72 commits

Author SHA1 Message Date
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
973f5369e1 Rename chain.h to locus.h, for consistency with other modules, where the interface has the same name as the implemention.
Copied from Perforce
 Change: 189682
 ServerID: perforce.ravenbrook.com
2016-03-06 18:56:32 +00:00
Gareth Rees
b41d6be0e4 New function policycondemnchain.
Copied from Perforce
 Change: 188156
 ServerID: perforce.ravenbrook.com
2015-08-21 11:01:00 +01:00
Gareth Rees
169aaf972f Rename locusprefhigh to locusprefhigh and so on, to follow <http://www.ravenbrook.com/project/mps/master/design/guide.impl.c.naming#capital-constant>
Copied from Perforce
 Change: 187283
 ServerID: perforce.ravenbrook.com
2014-10-19 09:19:43 +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
Gareth Rees
7c2e271e60 Rename segpref to locuspref -- this structure describes preferences for the placement of any kind of address, not just segments.
Add LocusPrefDescribe and use it in MVFFDescribe.

Copied from Perforce
 Change: 187061
 ServerID: perforce.ravenbrook.com
2014-09-27 11:27:00 +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
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
bfb0b771dd Rename "arena alignment" to "arena grain size" to avoid confusion with ordinary structure alignment.
Copied from Perforce
 Change: 186503
 ServerID: perforce.ravenbrook.com
2014-06-11 17:13:03 +01:00
Gareth Rees
03f8b41b44 Encapsulate the artifical ageing and reclaiming that's need to ensure that all the memory in a segment is accounted as free. addresses point made by rb in <https://info.ravenbrook.com/mail/2014/06/02/15-43-00/0/>
Copied from Perforce
 Change: 186428
 ServerID: perforce.ravenbrook.com
2014-06-08 13:12:12 +01:00
Gareth Rees
c9aef36d67 More stringent checking in poolgenaccountforseg{split,merge}, as suggested by dl in <https://info.ravenbrook.com/mail/2014/06/02/14-32-56/0/>.
Copied from Perforce
 Change: 186426
 ServerID: perforce.ravenbrook.com
2014-06-08 12:42:17 +01:00
Gareth Rees
f37b0868c0 Rename poolgen functions to make it clear that they only handle accounting.
Copied from Perforce
 Change: 186368
 ServerID: perforce.ravenbrook.com
2014-05-30 12:29:42 +01:00
Gareth Rees
c19b578653 Fix typo.
Copied from Perforce
 Change: 186362
 ServerID: perforce.ravenbrook.com
2014-05-30 10:58:10 +01:00
Gareth Rees
9cf9e3b5de Fix problems noted by rb in review <https://info.ravenbrook.com/mail/2014/05/29/16-29-44/0/>.
Copied from Perforce
 Change: 186361
 ServerID: perforce.ravenbrook.com
2014-05-30 10:56:12 +01:00
Gareth Rees
3a84ade86a Catch-up merge from master sources @186257 to branch/2014-04-23/awl.
Copied from Perforce
 Change: 186354
 ServerID: perforce.ravenbrook.com
2014-05-29 15:38:42 +01:00
Gareth Rees
946a50691d Catch-up merge from master sources @186335 to branch/2014-03-30/addrset.
Copied from Perforce
 Change: 186348
 ServerID: perforce.ravenbrook.com
2014-05-29 14:58:50 +01:00
Gareth Rees
04a44878f3 Catch-up merge from master sources @186174 to branch/2014-04-30/poolgen.
Copied from Perforce
 Change: 186185
 ServerID: perforce.ravenbrook.com
2014-05-19 14:59:19 +01:00
Gareth Rees
4d10bb418b Catch-up merge from master sources @186077 to branch/2014-04-23/awl.
Copied from Perforce
 Change: 186110
 ServerID: perforce.ravenbrook.com
2014-05-15 10:17:41 +01:00
Gareth Rees
34cc9d49e4 Catch-up merge from master sources @186077 to branch/2014-03-30/addrset.
Copied from Perforce
 Change: 186081
 ServerID: perforce.ravenbrook.com
2014-05-13 16:21:39 +01:00
Gareth Rees
93d01e3ca8 It is an error to destroy a chain if there is an active trace using the chain.
Copied from Perforce
 Change: 186013
 ServerID: perforce.ravenbrook.com
2014-05-11 21:47:20 +01:00
Gareth Rees
8a84937edb Improve formatting of poolgendescribe and tracedescribe.
Add ArenaDescribe calls to amcss and finalcv to get coverage of PoolGenDescribe, TraceDescribe, and MRGDescribe.

Copied from Perforce
 Change: 186010
 ServerID: perforce.ravenbrook.com
2014-05-11 21:13:55 +01:00
Gareth Rees
30f37732a9 Catch-up merge from master sources @185999 to branch/2014-04-17/describe.
Copied from Perforce
 Change: 186003
 ServerID: perforce.ravenbrook.com
2014-05-11 18:33:02 +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
d05197dccb Avoid the need for newsizeatcreate by emitting events for the pool generations in tracecreate instead of tracestart.
Get rid of proflow member of GenDescStruct (it was unused).
Use STATISTIC to avoid updating segs, freeSize, oldSize, and oldDeferredSize in non-checking varieties.
Add design for pool generation accounting.

Copied from Perforce
 Change: 185930
 ServerID: perforce.ravenbrook.com
2014-05-01 19:00:08 +01:00
Gareth Rees
7620c6fcd1 Fix rash build on os x by adding the unused attribute to functions declared static that are not called in the rash variety.
Copied from Perforce
 Change: 185915
 ServerID: perforce.ravenbrook.com
2014-05-01 12:18:00 +01:00
Gareth Rees
32416cc272 Better names for poolgen functions.
Accounting for segment splitting and merging.
Accounting for allocation and freeing in segsmss.

Copied from Perforce
 Change: 185894
 ServerID: perforce.ravenbrook.com
2014-04-30 13:49:26 +01:00
Gareth Rees
36d731c149 Use double-entry book-keeping and bank reconciliation to ensure the soundness and completeness of the pool generation size accounting.
Copied from Perforce
 Change: 185888
 ServerID: perforce.ravenbrook.com
2014-04-30 12:14:54 +01:00
Gareth Rees
0eb9ac546f Pool generations now refer directly to their generation (not via a chain and a generation number).
Allocation into a generation now via PoolGenAlloc (not ChainAlloc).
The "top generation" logic is encapsulated in the function ChainGen.

Copied from Perforce
 Change: 185877
 ServerID: perforce.ravenbrook.com
2014-04-30 11:18:44 +01:00
Gareth Rees
204abf130e Fix indentation.
Copied from Perforce
 Change: 185746
 ServerID: perforce.ravenbrook.com
2014-04-22 21:57:16 +01:00
Gareth Rees
6ffd4c7df5 Fix bugs in condemn logic:
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
2014-04-22 17:53:47 +01:00
Gareth Rees
3f46ffffd3 New function chaindescribe describes a chain.
Also GenDescDescribe and PoolGenDescribe.
GlobalsDescribe now describes chains.

Copied from Perforce
 Change: 185727
 ServerID: perforce.ravenbrook.com
2014-04-22 00:53:18 +01:00
Gareth Rees
4b5d396792 Catch-up merge from master sources to branch/2014-03-30/addrset.
Copied from Perforce
 Change: 185288
 ServerID: perforce.ravenbrook.com
2014-04-07 15:02:09 +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
d2cbfda452 First pass at implementation of lands (collections of address ranges). 100% boilerplate!
Copied from Perforce
 Change: 185131
 ServerID: perforce.ravenbrook.com
2014-04-01 19:51:55 +01:00
Gareth Rees
9d5266c0cc Improved support for pelles c:
* 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
2014-03-24 18:23:29 +00:00
Richard Brooksby
c77f1f931f Responding to code review <https://info.ravenbrook.com/mail/2014/03/12/15-42-41/0/>.
Copied from Perforce
 Change: 184754
 ServerID: perforce.ravenbrook.com
2014-03-12 15:45:50 +00:00
Richard Brooksby
6b16beb0c6 Implemented “high” preference allocation for zone stripes.
Copied from Perforce
 Change: 184573
 ServerID: perforce.ravenbrook.com
2014-02-26 18:18:20 +00:00
Richard Brooksby
2151d00c7f Catch-up merge from master, mainly to pick up spare-ring merge.
Copied from Perforce
 Change: 184365
 ServerID: perforce.ravenbrook.com
2014-02-18 13:47:49 +00:00
Richard Brooksby
2b0f94df6c Responding to review comments. see <https://info.ravenbrook.com/mail/2014/02/14/14-38-07/0/>.
Copied from Perforce
 Change: 184340
 ServerID: perforce.ravenbrook.com
2014-02-14 15:05:18 +00:00
Richard Brooksby
7a73e98638 Refactored implementation of preferenced allocation policy from vm arena to general purpose arena.
Eliminating SegPrefExpress in most places, especially where there wasn’t really any preference.
Eliminating special case knowledge about garbage collection from the arena.

Copied from Perforce
 Change: 184279
 ServerID: perforce.ravenbrook.com
2014-01-30 18:08:10 +00:00
Richard Brooksby
e02a69f88b The awl and lo pools were allocating their segments along with other pool’s generation 1, while accounting sizes into generation 0. in fact, this “generation 1” was really a kind of placement “clump” and the segments really lived in generation 0. however, this confused the new chainalloc because there are no longer any “clumps” maintained by the arena, causing awlut to fail. fixed awl and lo to be truthful about the generation they’re allocating in. placement concerns have been removed.
Copied from Perforce
 Change: 184220
 ServerID: perforce.ravenbrook.com
2014-01-29 17:15:31 +00:00
Richard Brooksby
8e4e0f066e Eliminating dodgy use of *segprefdefault() which could lead to implicit calls to memcpy.
Copied from Perforce
 Change: 184217
 ServerID: perforce.ravenbrook.com
2014-01-29 15:13:22 +00:00
Richard Brooksby
f719851f50 Since the dynamic generation is shared between chains (for some reason) using its unified zone set, rather than keeping a special zone set per chain, which would’ve used up more zones.
Using arena->topGen->mortality for the dynamic generation’s mortality, rather than a global variable.

Copied from Perforce
 Change: 184216
 ServerID: perforce.ravenbrook.com
2014-01-29 13:49:42 +00:00
Richard Brooksby
f1abe0e30f Abolishing the redundant generation to zone map in the vm arena, and replacing it with chainalloc, which allocates segments within a generation.
Generations from different chains will no longer share the same zone sets, and will not be collected together.  To get this behaviour, use the same chain, as documented.

Copied from Perforce
 Change: 184213
 ServerID: perforce.ravenbrook.com
2014-01-29 12:54:05 +00:00
Gareth Rees
1c4ff669ac Remove diag facility.
Copied from Perforce
 Change: 182553
 ServerID: perforce.ravenbrook.com
2013-06-05 18:35:40 +01:00
Richard Brooksby
e00495829f Adding more events corresponding to diagnostics.
Copied from Perforce
 Change: 179141
 ServerID: perforce.ravenbrook.com
2012-08-31 19:33:45 +01:00
David Lovemore
2f11fd7b65 Tidy up code from unused variable warnings.
Copied from Perforce
 Change: 178787
 ServerID: perforce.ravenbrook.com
2012-07-31 14:19:26 +01:00