Gareth Rees
7bf58e3f53
Represent the spare memory as a land.
2022-01-17 20:19:07 +00:00
Gareth Rees
76bff163f5
Ensure that the mps builds with clang 10.
...
Clang 10 turns on -Wimplicit-int-float-conversion, and on 64-bit
platforms this issues a warning that implicit conversions to double
from Size and unsigned long "may lose precision".
This commit adds casts to (double) for all such conversions. The loss
of precision is either impossible in practice (because a double can
represent all integers up to 2**53, which is about 9 petabytes, well
beyond the addressing capabilities for current CPUs), or else
acceptable, because we are accumulating an approximate quantity like
"collection work" or "fill size" (that has to cope with loss of
precision due in any case), or computing a threshold like the spare
commit limit where it is acceptable for it to be somewhat approximate.
2021-01-10 10:42:05 +00:00
Gareth Rees
5559f36540
Fix indentation of second clause of license.
2020-08-30 10:13:06 +01:00
Gareth Rees
5165d75267
Use https: instead of http: when linking to the ravenbrook web site.
2020-08-30 10:13:03 +01:00
Peter Jackson
1d00afac81
Publish licence updates in code directory.
...
Publish minor changes to readme and configure files in main directory.
Main directory and code directory licence texts are now fully updated.
Copied from Perforce
Change: 196994
2020-06-11 17:05:40 +01:00
Gareth Rees
0b324c158b
Use tags with dots; regularize design references from code.
...
Copied from Perforce
Change: 195761
2018-11-29 17:12:29 +00:00
Gareth Rees
60bf7320e2
Document the event parameters.
...
Split event ArenaAccess into ArenaAccessBegin and ArenaAccessEnd to avoid the need for the count field.
New events SegReclaim and SegScan.
Delete some redundant events: AMCFinish (PoolFinish), AMCFix, AMCFixForward, AMCFixInPlace (TraceFix), AMCGenCreate (GenInit), AMCGenDestroy (GenFinish), AMCInit (PoolInitAMC), AMCReclaim (SegReclaim), AMCScanBegin, AMCScanEnd (SegScan), ArenaWriteFaults (ArenaAccessBegin), PoolInitMV, TraceScanSeg (SegScan).
Add result code field to events ArenaAllocFail, CommitLimitSet, SegAllocFail.
Remove arena field from events PoolInitAMS, PoolInitMFS, PoolInitMVFF (already appeared in generic PoolInit event).
Copied from Perforce
Change: 195247
2018-10-14 14:04:40 +01:00
Gareth Rees
06b87869fd
Catch-up merge from master sources at changelevel 194022 to branch/2018-06-20/monitor.
...
Copied from Perforce
Change: 195071
2018-09-15 21:29:28 +01:00
Gareth Rees
2f423d8796
Avoid division by zero.
...
Copied from Perforce
Change: 194983
2018-08-14 09:51:41 +01:00
Gareth Rees
b0d0c9a262
Merge branch/2018-08-01/land-insert-steal into the master sources.
...
Copied from Perforce
Change: 194968
2018-08-13 14:42:25 +01:00
Gareth Rees
2813640e94
Call arenafreelandinsertextend before landinsertsteal, to reduce the amount of fragmentation.
...
Copied from Perforce
Change: 194965
2018-08-13 14:29:19 +01:00
Gareth Rees
10999f8ba8
If mps_key_spare_commit_limit and mps_key_spare are both given, then the latter takes precedence.
...
If MPS_KEY_SPARE_COMMIT_LIMIT has a value greater than the commit limit, clamp the spare commit limit to 1.0.
Add smoke test coverage of MPS_KEY_SPARE, mps_arena_spare, and mps_arena_spare_set.
Document the deprecation of MPS_KEY_SPARE_COMMIT_LIMIT.
Copied from Perforce
Change: 194948
2018-08-13 10:30:18 +01:00
Gareth Rees
b89acd072b
Address points 1-10, 13-14 from < https://info.ravenbrook.com/mail/2018/08/03/10-09-09/0/ >
...
Copied from Perforce
Change: 194942
2018-08-13 08:10:55 +01:00
Gareth Rees
3bfd0a545e
Catch-up merge from master sources at changelevel 194869 to branch/2016-03-04/spare-fraction.
...
Copied from Perforce
Change: 194872
2018-08-02 15:14:23 +01:00
Gareth Rees
9643a1f090
New land functions landinsertsteal and landdeletesteal and unit test.
...
Use LandInsertSteal instead of arenaFreeLandInsertSteal.
Add regression test for job004102.
Copied from Perforce
Change: 194861
2018-08-02 13:16:15 +01:00
Gareth Rees
817f014bd3
Clean up function definitions: no need for "extern"; opening brace goes on new line.
...
Copied from Perforce
Change: 194654
2018-07-15 19:05:39 +01:00
Gareth Rees
a4bbb4ddc2
Merge branch/2016-03-01/mvff-control into the master sources.
...
Copied from Perforce
Change: 194442
2018-07-05 13:37:01 +01:00
Gareth Rees
2b469ef694
Merge branch/2018-07-04/mvff-perf into the master sources.
...
Copied from Perforce
Change: 194439
2018-07-05 12:54:16 +01:00
Gareth Rees
9dadfb7444
Mfsextend now takes (base, limit) instead of (base, size) for consistency with the rest of the mps.
...
Copied from Perforce
Change: 194408
2018-07-04 16:31:45 +01:00
Gareth Rees
04ea9a0ebe
Avoid "dereferencing type-punned pointer might break strict-aliasing rules" warning from gcc.
...
Copied from Perforce
Change: 194403
2018-07-04 15:56:51 +01:00
Gareth Rees
af7669275c
Integrate branch/2016-03-15/sunrise/...@190086,190087 to pick up elimination of tractp from mfs.
...
Copied from Perforce
Change: 194372
2018-07-03 10:34:46 +01:00
Gareth Rees
1c80c8f387
Catch-up merge from master sources at changelevel 194314 to branch/2016-03-01/mvff-control.
...
Copied from Perforce
Change: 194323
2018-06-29 14:28:33 +01:00
Gareth Rees
32a1c7c44f
Label the time series in the monitor.
...
In telemetry output, distinguish between labelling of (client) addresses and (MPS-internal) pointers, to avoid transgressing the distinction.
Add arena grain size, class, and serial number to ArenaCreate* events.
Add pool class and serial number to PoolInit event.
Copied from Perforce
Change: 194086
2018-06-22 11:05:46 +01:00
Gareth Rees
4c27186bf5
Arenafree event needs to include the pool so that telemetry-consuming applications can update pool statistics without having to remember the addresses of all the allocations.
...
Copied from Perforce
Change: 194050
2018-06-21 13:57:42 +01:00
Gareth Rees
5077e27813
Check that arena, buffer, land classes override sets of related methods.
...
Copied from Perforce
Change: 193060
ServerID: perforce.ravenbrook.com
2017-03-30 20:43:43 +01:00
Gareth Rees
d02a8f277e
Check that segment classes override sets of related methods.
...
Add missing finish functions amcSegFinish, mrgLinkSegFinish, mrgRefSegFinish, sncSegFinish.
Check all class constructor results.
Copied from Perforce
Change: 193055
ServerID: perforce.ravenbrook.com
2017-03-30 11:37:41 +01:00
Gareth Rees
577b32d481
Cherry-pick change 192595 from custom/cet/main, removing mps_addr_object. this function failed to solve the problem of decoding the stack on 64-bit windows, because the stack may need to be decoded after an mps assertion failure, in which case the arena lock is held and mps_addr_object cannot be called. we eventually solved the problem in a different way (using mps_arena_postmortem) and mps_addr_object is no longer used.
...
Copied from Perforce
Change: 192637
ServerID: perforce.ravenbrook.com
2016-10-19 14:13:38 +01:00
Gareth Rees
d83934de69
Remove return statements that have no effect.
...
Copied from Perforce
Change: 192529
ServerID: perforce.ravenbrook.com
2016-10-13 15:17:50 +01:00
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
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
Gareth Rees
8a19bd5e8c
Initialize arena->zoneshift to zoneshiftunset (which is not a valid shift) and modify the arena checking to spot this value. previously a default shift value (namely 20) was used, but this value was bogus as the zone shift is not determined until the class initialization runs.
...
Copied from Perforce
Change: 191370
ServerID: perforce.ravenbrook.com
2016-04-20 15:51:16 +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
Richard Brooksby
1c0704e3c8
Catch-up merge from master sources to branch/2016-04-08/protidying.
...
Copied from Perforce
Change: 191251
ServerID: perforce.ravenbrook.com
2016-04-19 16:37:51 +01:00
Richard Brooksby
8f56466017
Converting a low priority fixme into a todo for later.
...
Copied from Perforce
Change: 191013
ServerID: perforce.ravenbrook.com
2016-04-12 17:48:29 +01:00
Richard Brooksby
b4fbe7ba92
Making classes into instances of kinds, allowing subclass tests to be used to validate classes as well.
...
Copied from Perforce
Change: 190958
ServerID: perforce.ravenbrook.com
2016-04-11 20:58:39 +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
8d776db4f2
Converting many uses of classof* to method macros.
...
Copied from Perforce
Change: 190937
ServerID: perforce.ravenbrook.com
2016-04-11 17:59:36 +01:00
Gareth Rees
86c96d8455
Assert that the range passed to landinsert is not empty.
...
Assert that the range passed to ArenaFreeLandInsert is not empty.
Assert that there's address space left over in a chunk after the overheads have been accounted for.
Copied from Perforce
Change: 190920
ServerID: perforce.ravenbrook.com
2016-04-11 16:09:51 +01:00
Richard Brooksby
690df6974a
Using mustbea and couldbea when calling inst functions.
...
Copied from Perforce
Change: 190924
ServerID: perforce.ravenbrook.com
2016-04-11 15:17:24 +01:00
Gareth Rees
b8ea44a99f
Catch-up merge from master sources to branch/2015-08-11/compact.
...
Copied from Perforce
Change: 190901
ServerID: perforce.ravenbrook.com
2016-04-11 14:40:44 +01:00
Richard Brooksby
a148490cfa
Adding classname for use in describe methods.
...
Fixing error path to use class destroy in ArenaCreate.
Using MustBeA to reduce boiler plate in land classes.
Copied from Perforce
Change: 190904
ServerID: perforce.ravenbrook.com
2016-04-11 14:06:28 +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
907494aa56
Adding instinit and instfinish and using them as next methods in seginit, segfinish, etc.
...
Copied from Perforce
Change: 190857
ServerID: perforce.ravenbrook.com
2016-04-10 15:33:17 +01:00
Richard Brooksby
cf29dcc98d
Making arenas properly inherit from instances, and converting remaining method calls to use the method macro, while noting uses which are inside-out.
...
Copied from Perforce
Change: 190856
ServerID: perforce.ravenbrook.com
2016-04-10 14:00:55 +01:00
Richard Brooksby
24a1aaa4d8
Generating type-safe functions for getting and setting the class of instances.
...
Fixing warning revealed by GCC that I wasn't actually checking classes after init.
Fixing abstract classes so that they pass their own checks!
Copied from Perforce
Change: 190837
ServerID: perforce.ravenbrook.com
2016-04-08 19:50:12 +01:00