1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-03 18:41:25 -08:00
Commit graph

1060 commits

Author SHA1 Message Date
Gareth Rees
5a508d2178 Run apss test in a client arena as well as vm arenas.
Copied from Perforce
 Change: 182416
 ServerID: perforce.ravenbrook.com
2013-06-03 12:19:55 +01:00
Gareth Rees
d959e65927 Missing prototypes for freelistfindfirst and freelistfindlast.
Copied from Perforce
 Change: 182411
 ServerID: perforce.ravenbrook.com
2013-06-03 11:08:58 +01:00
Gareth Rees
0260380dd3 Rename cbstest.c to fbmtest.c (free block management test) and generalize it so that it tests both the cbs and freelist modules.
Split FreelistFind into FreelistFindFirst and FreelistFindLast so that the interface exactly matches the CBS interface.
Fix errors in freelist.c: missing computation of size in FreelistBlockSetLimit; update linked list correct in coalesceRight case in FreelistInsert.
Avoid compiler warnings in freelist.c.
In cbs.c: use $U for Booleans ($B is for bit tables).

Copied from Perforce
 Change: 182397
 ServerID: perforce.ravenbrook.com
2013-06-02 21:34:23 +01:00
Gareth Rees
db9328da7a Use range objects in the cbs interface instead of base, limit pairs. the idea is that freelist and cbs should offer similar interfaces so that the testing code can be shared.
Copied from Perforce
 Change: 182364
 ServerID: perforce.ravenbrook.com
2013-05-31 16:29:26 +01:00
Gareth Rees
83aff660e2 Use a tag in the bottom bit to distinguish grains and blocks in the free list. this results in much simplification of the code.
Copied from Perforce
 Change: 182362
 ServerID: perforce.ravenbrook.com
2013-05-31 13:41:36 +01:00
Gareth Rees
915a41123c Fix iteration in freelistfindlargest.
Copied from Perforce
 Change: 182359
 ServerID: perforce.ravenbrook.com
2013-05-31 10:44:02 +01:00
Gareth Rees
e26cba758a Mustn't use aver in describe functions.
Copied from Perforce
 Change: 182358
 ServerID: perforce.ravenbrook.com
2013-05-31 10:43:38 +01:00
Gareth Rees
04f2738a18 Improve documentation. fix off-by-one errors in the setprevnext functions.
Copied from Perforce
 Change: 182350
 ServerID: perforce.ravenbrook.com
2013-05-31 00:41:28 +01:00
Gareth Rees
032657464b New "freelist" module implementes a simple address-ordered linked list allocator (based on the "emergency list" allocator that was formerly part of the cbs module).
Copied from Perforce
 Change: 182348
 ServerID: perforce.ravenbrook.com
2013-05-31 00:12:49 +01:00
Gareth Rees
934ae05ca3 Rename the enumeration cbsfinddelete to finddelete in anticipation of it being shared between cbs and new freelist module.
Since ABQDisposition enumeration only has two values, it's better to use Bool.

Copied from Perforce
 Change: 182347
 ServerID: perforce.ravenbrook.com
2013-05-31 00:09:33 +01:00
Gareth Rees
caf1945985 Clarify the logic in cbsinsertintotree to match cbsdeletefromtree.
Copied from Perforce
 Change: 182344
 ServerID: perforce.ravenbrook.com
2013-05-30 20:09:01 +01:00
Gareth Rees
71ab5adf66 Separate block allocation from block insertion, so that cbsdeletefromtree no longer leaves the tree in an inconsistent state if allocation fails.
Simplify the case logic in cbsDeleteFromTree to try to make it clearer.
Explain why cbsDeleteFromTree can't fail when it's called from cbsFindDeleteRange.

Copied from Perforce
 Change: 182342
 ServerID: perforce.ravenbrook.com
2013-05-30 19:22:56 +01:00
Gareth Rees
87019f4ee2 Fix review comments from <https://info.ravenbrook.com/mail/2013/05/28/22-21-11/0/>:
* Rename RangeOverlap to RangesOverlap.
* MVFF shouldn't assume that CBSInsert and CBSDelete can't fail.
* Remove unused function mps_mvff_stat.
* Don't call range methods in RangeCheck.
* RangeInit can't fail, so return void.

Copied from Perforce
 Change: 182297
 ServerID: perforce.ravenbrook.com
2013-05-29 12:19:19 +01:00
Gareth Rees
30d713920b Add mvt to ap stress test.
Copied from Perforce
 Change: 182269
 ServerID: perforce.ravenbrook.com
2013-05-27 21:48:06 +01:00
Gareth Rees
ba1a45d970 Catch-up merge from master sources to mps/branch/2013-05-17/emergency.
Copied from Perforce
 Change: 182170
 ServerID: perforce.ravenbrook.com
2013-05-24 18:44:18 +01:00
Gareth Rees
da75b40c73 Always run all the testcases, noting failures instead of stopping.
Copied from Perforce
 Change: 182153
 ServerID: perforce.ravenbrook.com
2013-05-24 11:25:15 +01:00
Gareth Rees
4c5bca4bd0 Fix review comments from rb in <https://info.ravenbrook.com/mail/2013/05/23/18-17-17/0/>
Copied from Perforce
 Change: 182149
 ServerID: perforce.ravenbrook.com
2013-05-24 00:48:19 +01:00
Gareth Rees
09b845a726 Catch-up merge from the master sources to branch/2013-05-17/emergency.
Copied from Perforce
 Change: 182135
 ServerID: perforce.ravenbrook.com
2013-05-23 20:58:21 +01:00
Gareth Rees
8396204108 Ensure that the random seed is not lost in case of failure.
Copied from Perforce
 Change: 182131
 ServerID: perforce.ravenbrook.com
2013-05-23 20:10:36 +01:00
Gareth Rees
0206d9feb2 Amcssth need to be added "all" as well as testcases.
Copied from Perforce
 Change: 182129
 ServerID: perforce.ravenbrook.com
2013-05-23 20:06:45 +01:00
Gareth Rees
3c48eff730 On platform lii6gc, the mps needs a bunch of symbols which are not defined if the -ansi option is given to gcc. these can be enabled by defining features like _gnu_source, but all headers share a common set of features (via <feature.h>) and so all sources in the same compilation unit must turn on the same set of features. make sure this happens by turning on the features in config.h (not mpstd.h).
Remove <string.h> from mpsi.h (not needed).

Copied from Perforce
 Change: 182124
 ServerID: perforce.ravenbrook.com
2013-05-23 19:35:47 +01:00
Richard Brooksby
5d5e2cac05 Deleting some obsolete comment text about callbacks.
Renaming cbsBlockShrink to cbsBlockShrunk and cbsBlockGrow to cbsBlockGrew, since they don't *do* those things, just record that they were done.
Tidying up Find functions, where deletion of emergency code had left some strange double nestings.

Copied from Perforce
 Change: 182120
 ServerID: perforce.ravenbrook.com
2013-05-23 19:05:25 +01:00
Richard Brooksby
af707b5d97 Clarifying comment about extra queue element
Copied from Perforce
 Change: 182119
 ServerID: perforce.ravenbrook.com
2013-05-23 19:04:42 +01:00
Gareth Rees
ef4c41df55 Ensure the emergency branch compiles and runs on lii6gc:
No need for <string.h> in mpsi.c (this defines a function "index" on Linux).
Need more headers in range.c so that it will compile on its own.
Need UNUSED() declarations for some variables in cbstest.c.

Copied from Perforce
 Change: 182113
 ServerID: perforce.ravenbrook.com
2013-05-23 13:42:08 +01:00
Gareth Rees
ad523a34ef Remove unused variable oldsize.
Copied from Perforce
 Change: 182111
 ServerID: perforce.ravenbrook.com
2013-05-23 12:50:57 +01:00
Gareth Rees
9bd5347700 Catch-up merge from master to branch/2013-05-17/emergency
Copied from Perforce
 Change: 182110
 ServerID: perforce.ravenbrook.com
2013-05-23 12:46:04 +01:00
Gareth Rees
439a5958b2 Avoid undefined behaviour in ring_elt by using parent (and thus offsetof) instead of deferencing a null pointer. add missing typedef for rememberedsummaryblockstruct. update ring design accordingly.
Copied from Perforce
 Change: 182084
 ServerID: perforce.ravenbrook.com
2013-05-22 16:45:45 +01:00
Richard Brooksby
62e3734297 Adding missing check on return value found by xcode analyzer.
Copied from Perforce
 Change: 182071
 ServerID: perforce.ravenbrook.com
2013-05-22 12:29:10 +01:00
Gareth Rees
5af8afd540 New function rangeisaligned; add avert to other range functions.
Copied from Perforce
 Change: 182069
 ServerID: perforce.ravenbrook.com
2013-05-22 09:41:45 +01:00
Gareth Rees
e40f8440dc Follow rules in design/sig.
Copied from Perforce
 Change: 182052
 ServerID: perforce.ravenbrook.com
2013-05-21 18:41:03 +01:00
Gareth Rees
964fe2954e The abq module manages objects internal to the mps (not client objects) so it should use the type void * in its interface, not addr.
Copied from Perforce
 Change: 182051
 ServerID: perforce.ravenbrook.com
2013-05-21 18:39:51 +01:00
Gareth Rees
5ea309b5cc Catch-up merge from master sources to branch/2013-05-17/emergency.
Copied from Perforce
 Change: 182048
 ServerID: perforce.ravenbrook.com
2013-05-21 18:31:50 +01:00
Gareth Rees
6ff6df0813 In mv2test, use the random number generator from testlib. (this reduces duplication and makes test cases repeatable.)
Copied from Perforce
 Change: 182046
 ServerID: perforce.ravenbrook.com
2013-05-21 17:56:36 +01:00
Gareth Rees
f306ba4b47 Show the output of the test case that failed. (on linux.)
Copied from Perforce
 Change: 182044
 ServerID: perforce.ravenbrook.com
2013-05-21 17:34:35 +01:00
Gareth Rees
69ef2cbe09 If a test case fails, show the output of the test case that failed, so that it isn't lost if the test suite is running on a build server such as travis ci. (works on os x.)
Copied from Perforce
 Change: 182040
 ServerID: perforce.ravenbrook.com
2013-05-21 17:25:13 +01:00
Gareth Rees
515241d9e0 Improve description of mvtdeleteoverlapping.
Copied from Perforce
 Change: 182038
 ServerID: perforce.ravenbrook.com
2013-05-21 15:51:51 +01:00
Gareth Rees
2c47024e35 Range design.
Copied from Perforce
 Change: 182035
 ServerID: perforce.ravenbrook.com
2013-05-21 14:52:27 +01:00
Gareth Rees
309a62008a Refactor mvt so that blocks are pushed onto the abq in just one place.
Fix bug in MVTDelete: need to remove the whole of the old range from the ABQ, not just the range we're deleting.

Copied from Perforce
 Change: 182032
 ServerID: perforce.ravenbrook.com
2013-05-21 13:35:41 +01:00
Gareth Rees
b0a0c35869 Don't describe the pool at the end of mv2test.
Copied from Perforce
 Change: 182031
 ServerID: perforce.ravenbrook.com
2013-05-21 13:33:20 +01:00
Gareth Rees
4ff81d94e7 Cbsdescribe provides more information about the cbs.
Copied from Perforce
 Change: 182030
 ServerID: perforce.ravenbrook.com
2013-05-21 13:25:17 +01:00
Gareth Rees
943b0c5fe8 Add function versions of range{base,limit,size} macros: these can be useful when debugging.
Copied from Perforce
 Change: 182029
 ServerID: perforce.ravenbrook.com
2013-05-21 13:20:29 +01:00
Gareth Rees
ecb45f24d2 Include mv2test in the test suite (although it doesn't pass yet).
Copied from Perforce
 Change: 182027
 ServerID: perforce.ravenbrook.com
2013-05-21 00:30:20 +01:00
Gareth Rees
bb47703f30 A little bit more checking.
Copied from Perforce
 Change: 182026
 ServerID: perforce.ravenbrook.com
2013-05-21 00:29:56 +01:00
Gareth Rees
63207e0200 No need for abqdelete: use abqiterate instead.
Copied from Perforce
 Change: 182024
 ServerID: perforce.ravenbrook.com
2013-05-20 23:47:20 +01:00
Gareth Rees
9e25483815 Add abq and range modules to mps core; add poolmv2 to supported pools.
Copied from Perforce
 Change: 182021
 ServerID: perforce.ravenbrook.com
2013-05-20 23:21:24 +01:00
Gareth Rees
48e439d624 Use the new cbs, abq and range interfaces to avoid re-entrancy problems in callbacks.
Copied from Perforce
 Change: 182017
 ServerID: perforce.ravenbrook.com
2013-05-20 20:47:41 +01:00
Gareth Rees
1912c062b5 Use the new cbs interface.
Copied from Perforce
 Change: 182016
 ServerID: perforce.ravenbrook.com
2013-05-20 20:47:10 +01:00
Gareth Rees
082f12d68e New module range handles common operations on address ranges.
Copied from Perforce
 Change: 182015
 ServerID: perforce.ravenbrook.com
2013-05-20 20:45:52 +01:00
Gareth Rees
2849a0bd33 Make the cbs module more abstract by removing cbsblock from the public interface. avoid re-entrancy problems by removing the callback interface. public interfaces like cbsiteratemethod now operate in terms of address ranges rather than cbsblocks.
The functions CBSInsert, CBSDelete and CBSFind* now additionally return an "old" address range which gives the former base and limit of the block that has just been updated. This gives clients enough information to update their caches if need be.
Update CBS test and design accordingly.

Copied from Perforce
 Change: 182014
 ServerID: perforce.ravenbrook.com
2013-05-20 20:45:26 +01:00
Gareth Rees
df1a8a3807 Make the abq module manage elements of arbitrary type (knowing only their address and size) instead of managing cbsblock only. (this is preparatory to removing cbsblock from the cbs public interface.)
Update abqtest to use the new interface.
Add ABQ design.

Copied from Perforce
 Change: 182013
 ServerID: perforce.ravenbrook.com
2013-05-20 20:40:16 +01:00