1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-05 19:31:02 -08:00
Commit graph

198 commits

Author SHA1 Message Date
Gareth Rees
01c13bf1b5 New functions mps_arena_busy and mps_arena_postmortem, plus test coverage.
Copied from Perforce
 Change: 192247
 ServerID: perforce.ravenbrook.com
2016-09-08 13:55:43 +01:00
Richard Brooksby
bda168dfb8 Renaming class fields called "protocol" to "instclassstruct" in line with usual mps convention.
Copied from Perforce
 Change: 191685
 ServerID: perforce.ravenbrook.com
2016-04-27 14:25:54 +01:00
Richard Brooksby
771f6defda Converting arena finish and describe methods to specialize instfinish and instdescribe.
Copied from Perforce
 Change: 191614
 ServerID: perforce.ravenbrook.com
2016-04-23 16:31:26 +01:00
Gareth Rees
abcea0b2a5 The computed chunk size is the smallest size with a given number of usable bytes -- the actual chunk may be one grain larger.
Copied from Perforce
 Change: 191574
 ServerID: perforce.ravenbrook.com
2016-04-22 17:04:50 +01:00
Richard Brooksby
2f4348a253 Minor comment fix.
Copied from Perforce
 Change: 191481
 ServerID: perforce.ravenbrook.com
2016-04-21 15:27:42 +01:00
Richard Brooksby
546e082125 Removing bogus arenatrivdescribe and turning arenadescribe the right way in.
Copied from Perforce
 Change: 191480
 ServerID: perforce.ravenbrook.com
2016-04-21 15:27:41 +01:00
Richard Brooksby
4be15a5b0b Catch-up merge from master sources to branch/2016-04-08/protidying.
Copied from Perforce
 Change: 191471
 ServerID: perforce.ravenbrook.com
2016-04-21 14:46:10 +01:00
Gareth Rees
ffcd3f0b7b Merge branch/2016-04-11/job003998.
Copied from Perforce
 Change: 191388
 ServerID: perforce.ravenbrook.com
2016-04-20 17:56:59 +01:00
Richard Brooksby
dd14518ade Eliminating vmarena2arena and arena2vmarena in favour of mustbea.
Copied from Perforce
 Change: 191306
 ServerID: perforce.ravenbrook.com
2016-04-19 23:00:02 +01:00
Richard Brooksby
cb620cf755 Removing a note about initialization order that no longer applies.
Copied from Perforce
 Change: 191305
 ServerID: perforce.ravenbrook.com
2016-04-19 23:00:02 +01:00
Richard Brooksby
65a770e91f Avoid using "class" as an identifier, since tools like lldb parse expressions as c++, and it can't be named.
Copied from Perforce
 Change: 191304
 ServerID: perforce.ravenbrook.com
2016-04-19 23:00:02 +01:00
Gareth Rees
2df530bb62 Make it clear where tags are defined and where they are referenced, as suggested by rb in review.
Copied from Perforce
 Change: 191288
 ServerID: perforce.ravenbrook.com
2016-04-19 19:24:46 +01:00
Richard Brooksby
6e21f091a4 Eliminating classdef.h by defining the class level when declaring a class.
Copied from Perforce
 Change: 191235
 ServerID: perforce.ravenbrook.com
2016-04-19 14:59:30 +01:00
Gareth Rees
94234f7ce9 No need to declare or set vmem1 if we are not going to use it. this avoids "variable ‘vmem1’ set but not used" warning from gcc.
Copied from Perforce
 Change: 191199
 ServerID: perforce.ravenbrook.com
2016-04-16 14:14:31 +01:00
Gareth Rees
aabe4992eb Compile out statistic declarations in non-statistical varieties (at the cost of some syntax checking).
Add some missing STATISTIC guards where statistics are used.
Add design documentation.
Avoid unnecessary distinction between STATISTIC and STATISTIC_STAT (both result in statements).

Copied from Perforce
 Change: 191178
 ServerID: perforce.ravenbrook.com
2016-04-16 12:07:10 +01:00
Gareth Rees
13ec8a0e2c When growing an arena: (i) don't create a chunk that's too small for the allocation that's going to follow; (ii) don't create a chunk that's larger than necessary.
Copied from Perforce
 Change: 190952
 ServerID: perforce.ravenbrook.com
2016-04-11 20:33:38 +01:00
Richard Brooksby
ef6e2970ca Eliminating generated classof* and setclassof* functions in favour of checked poly macros.
Copied from Perforce
 Change: 190938
 ServerID: perforce.ravenbrook.com
2016-04-11 18:06:47 +01:00
Richard Brooksby
309fb8ec64 Implementing nextmethod and replacing all uses of superclass with it.
Copied from Perforce
 Change: 190935
 ServerID: perforce.ravenbrook.com
2016-04-11 16:54:39 +01:00
Richard Brooksby
bfa333b5c0 Making all static next-method calls look similar.
Copied from Perforce
 Change: 190934
 ServerID: perforce.ravenbrook.com
2016-04-11 16:35:43 +01:00
Richard Brooksby
538b18430f Using superclass init and finish in the arena bootstrap and teardown.
Copied from Perforce
 Change: 190895
 ServerID: perforce.ravenbrook.com
2016-04-11 13:35:16 +01:00
Richard Brooksby
c4bcc24759 Generating a static superclass mapping and eliminating other superclass macros.
Copied from Perforce
 Change: 190827
 ServerID: perforce.ravenbrook.com
2016-04-08 17:51:20 +01:00
Richard Brooksby
4207b9ebf8 Eliminating the concept of "alias classes" in favour of "kinds".
Copied from Perforce
 Change: 190825
 ServerID: perforce.ravenbrook.com
2016-04-08 17:51:20 +01:00
Richard Brooksby
e5efe2849f Referring to classes by their base identifiers.
Copied from Perforce
 Change: 190823
 ServerID: perforce.ravenbrook.com
2016-04-08 17:51:20 +01:00
Richard Brooksby
313fd5d5da Removing unused offset field in arena classes.
Copied from Perforce
 Change: 190818
 ServerID: perforce.ravenbrook.com
2016-04-08 17:51:19 +01:00
Richard Brooksby
590c23a935 Moving common fields into the base class, starting with the class name.
Copied from Perforce
 Change: 190816
 ServerID: perforce.ravenbrook.com
2016-04-08 17:51:19 +01:00
Richard Brooksby
3e978abde6 Abstracting class declarations and references to classes.
Copied from Perforce
 Change: 190812
 ServerID: perforce.ravenbrook.com
2016-04-08 17:51:19 +01:00
Richard Brooksby
e168936d79 Catch-up merge from master sources to branch/2016-03-01/closure-size.
Copied from Perforce
 Change: 189728
 ServerID: perforce.ravenbrook.com
2016-03-08 09:13:35 +00:00
Richard Brooksby
aa0412e071 Removing the mostly unused size component of the closure convention.
Copied from Perforce
 Change: 189503
 ServerID: perforce.ravenbrook.com
2016-03-01 17:20:50 +00:00
Richard Brooksby
0f8bee3762 Detabifying code and restructuredtext files.
Copied from Perforce
 Change: 189309
 ServerID: perforce.ravenbrook.com
2016-02-18 19:58:13 +00:00
Richard Brooksby
673d651aba Fixing uninitialised variable warning from gcc 5.2.1.
Copied from Perforce
 Change: 189069
 ServerID: perforce.ravenbrook.com
2016-01-30 19:58:10 +00:00
Gareth Rees
6359b0ed98 Merge branch/2014-09-29/reserved into the master sources.
Copied from Perforce
 Change: 188090
 ServerID: perforce.ravenbrook.com
2015-08-07 16:33:43 +01:00
Gareth Rees
9b452d00cc Vmarenagrow now passes on the result code from vmchunkcreate, instead of substituting resresource under the circumstances described in job003899.
Copied from Perforce
 Change: 187489
 ServerID: perforce.ravenbrook.com
2014-11-07 14:04:35 +00:00
Gareth Rees
506aa1f362 Check that sparsearraymap makes some (or no) progress.
Copied from Perforce
 Change: 187465
 ServerID: perforce.ravenbrook.com
2014-11-06 10:56:45 +00:00
Gareth Rees
5429892633 Assert that sparsearrayunmap made some (or no) progress.
Copied from Perforce
 Change: 187464
 ServerID: perforce.ravenbrook.com
2014-11-06 10:51:18 +00:00
Gareth Rees
c314edabfd Call the "contracted" callback before destroying the chunk, as the arena is (briefly) invalid afterwards.
Copied from Perforce
 Change: 187294
 ServerID: perforce.ravenbrook.com
2014-10-20 16:40:32 +01:00
Gareth Rees
05ac242c57 If you try to create a client arena that's too small for the full complement of zones, return mps_res_memory instead of asserting.
If you try to create a virtual memory arena that's too small for the full complement of zones, round up the size to the minimum instead of asserting.

Copied from Perforce
 Change: 187164
 ServerID: perforce.ravenbrook.com
2014-10-08 22:16:56 +01:00
Gareth Rees
72209444c0 Store reserved address space associated with chunk in a field in the chunkstruct, as suggested by rb in <https://info.ravenbrook.com/mail/2014/10/01/13-55-44/0/>.
Copied from Perforce
 Change: 187104
 ServerID: perforce.ravenbrook.com
2014-10-01 21:40:50 +01:00
Gareth Rees
63aa6b52f2 Account for the reserved memory in the arena's own vm. (this was previously not included in arenareserved.)
Make the computation in pageDescUnmap clearer (and not relying on arithmetic overflow).

Copied from Perforce
 Change: 187091
 ServerID: perforce.ravenbrook.com
2014-09-30 11:02:11 +01:00
Gareth Rees
53c5301a9e Instead of iterating over the chunks to compute the total reserved address space, maintain a running total in arenachunkinsert and (new function) arenachunkremoved.
New arena class method chunkReserved handles the class-specific computation of the reserved size of a chunk.

Copied from Perforce
 Change: 187089
 ServerID: perforce.ravenbrook.com
2014-09-29 22:50:46 +01:00
Gareth Rees
83a93881a2 Design.mps.ring.naming: "when one structure parent contains one ring of child structures, the field in parent is usually known as childring, and the field in child is known as parentring". so the field in chunkstruct should be named arenaring.
Copied from Perforce
 Change: 187084
 ServerID: perforce.ravenbrook.com
2014-09-29 20:54:00 +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
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
64625eee6e Don't return resparam from mps_arena_vm_growth if desired < minimum: this is a static programming error (not a dynamic condition) so aver instead.
Copied from Perforce
 Change: 187057
 ServerID: perforce.ravenbrook.com
2014-09-26 21:55:05 +01:00
Gareth Rees
71c820ca54 Fix problems noted by rb in review <https://info.ravenbrook.com/mail/2014/06/18/14-06-43/0/>
Copied from Perforce
 Change: 186667
 ServerID: perforce.ravenbrook.com
2014-06-18 15:36:35 +01:00
Gareth Rees
96a62c5d4f Catch-up merge from branch/2014-05-28/align to branch/2014-06-14/vm.
Copied from Perforce
 Change: 186664
 ServerID: perforce.ravenbrook.com
2014-06-17 15:52:16 +01:00
Gareth Rees
07912c0833 Fix problems noted by dl in review <https://info.ravenbrook.com/mail/2014/06/17/13-35-38/0/>.
Copied from Perforce
 Change: 186662
 ServerID: perforce.ravenbrook.com
2014-06-17 15:15:32 +01:00
Gareth Rees
b1b8c84c0a Store the vm descriptor in the vmarena and vmchunk structures.
Copied from Perforce
 Change: 186624
 ServerID: perforce.ravenbrook.com
2014-06-14 15:12:26 +01:00
Gareth Rees
c975f64296 Improve the diff and make the vm implementations more closely parallel.
Copied from Perforce
 Change: 186591
 ServerID: perforce.ravenbrook.com
2014-06-13 17:59:37 +01:00
Gareth Rees
831f551eec Now that we can call vmpagesize without having a vm to hand, the implementation of vmcreate can be simpler: in particular, the grain size can already be correctly rounded up.
Copied from Perforce
 Change: 186590
 ServerID: perforce.ravenbrook.com
2014-06-13 17:39:58 +01:00
Gareth Rees
88c85abc0e Vmpagesize now takes no arguments -- this avoids suggesting (incorrectly) that it might return a different value for each vm.
New function ProtGranularity returns the protection granularity of the operating system. (On all currently supported operating systems this is the same as the granularity of memory mapping returned by VMPageSuze, but it's important to separate these concepts.) MPMCheck asserts that the granularity of memory mapping is a multiple of the granularity of protection.
Client arena supports MPS_KEY_ARENA_GRAIN_SIZE.
Some of the test cases set the arena grain size.

Copied from Perforce
 Change: 186588
 ServerID: perforce.ravenbrook.com
2014-06-13 17:19:23 +01:00