Gareth Rees
cb0c6eabef
Catch-up merge from custom/cet/branch/2016-09-13/job004006 to branch/2016-09-06/job004006.
...
Copied from Perforce
Change: 192351
ServerID: perforce.ravenbrook.com
2016-09-13 15:33:31 +01:00
Gareth Rees
d56741e1ea
In order to be able to test mps_arena_busy in all build configurations, we must always take and release the arena lock, even in the single-threaded case. we gain some additional checking by doing this, at low cost (since in this build configuration the locks are generic and so just increment/decrement a count of claims).
...
In the CONFIG_POLL_NONE we configuration, we would still like to check that no traces are busy when leaving the arena, but since we now call ArenaLeave in this configurations, move the assertion to ShieldLeave.
In ArenaDestroy, call ArenaLeave, don't just release the lock.
Copied from Perforce
Change: 192267
ServerID: perforce.ravenbrook.com
2016-09-09 13:01:25 +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
Gareth Rees
c737a08bc2
Fix assertion text in the manual.
...
Place a cross-reference by each assertion the appears in the manual, to assist in keeping the manual up to date.
Copied from Perforce
Change: 192097
ServerID: perforce.ravenbrook.com
2016-09-02 14:11:08 +01:00
Gareth Rees
0297b380b9
Clear the emergency before removing the trace from busytraces, to avoid violating <code/global.c#emergency.invariant>.
...
Copied from Perforce
Change: 191774
ServerID: perforce.ravenbrook.com
2016-05-02 13:06:07 +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
02a8064a07
Moving location dependency history into its own structure to reduce arenastruct bloat.
...
Copied from Perforce
Change: 191417
ServerID: perforce.ravenbrook.com
2016-04-21 09:05:34 +01:00
Gareth Rees
0d0eb93f01
Merge branch/2016-04-19/job004011.
...
Copied from Perforce
Change: 191374
ServerID: perforce.ravenbrook.com
2016-04-20 16:00:43 +01:00
Gareth Rees
c1aeb1f67a
Ensure that at most one collection of the world can be started in a call to arenapoll. this avoids a loop if the live set is large enough to provoke the "dynamic criterion".
...
Copied from Perforce
Change: 191274
ServerID: perforce.ravenbrook.com
2016-04-19 18:17:09 +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
Richard Brooksby
247396690d
Catch-up merge from master sources to branch/2016-03-11/shield-coalesce.
...
Copied from Perforce
Change: 190373
ServerID: perforce.ravenbrook.com
2016-03-24 11:08:24 +00:00
Richard Brooksby
428e8bae92
Fixing build errors on windows (w3i6mv).
...
tagtest was missing from makefiles.
Implicit conversion warning from Clock to double.
Copied from Perforce
Change: 190372
ServerID: perforce.ravenbrook.com
2016-03-24 11:04:58 +00:00
Richard Brooksby
a03174304d
Tearing down shield correctly.
...
Copied from Perforce
Change: 190225
ServerID: perforce.ravenbrook.com
2016-03-20 01:01:54 +00:00
Richard Brooksby
e09dbaab0f
Promoting shield to first class structure.
...
Copied from Perforce
Change: 190219
ServerID: perforce.ravenbrook.com
2016-03-20 00:32:43 +00:00
Richard Brooksby
ff69c9af04
Separating flag for segment in shield cache from depth, clarifying code and optimising segfree somewhat.
...
Copied from Perforce
Change: 190194
ServerID: perforce.ravenbrook.com
2016-03-19 13:42:09 +00:00
Richard Brooksby
9172773f9c
Updating shield design and actually checking invariants in code.
...
Copied from Perforce
Change: 190192
ServerID: perforce.ravenbrook.com
2016-03-19 10:15:10 +00:00
Richard Brooksby
641cdc164c
Catch-up merge from master sources to branch/2016-03-11/shield-coalesce.
...
Copied from Perforce
Change: 190150
ServerID: perforce.ravenbrook.com
2016-03-17 13:53:40 +00:00
Richard Brooksby
662a1b1b9b
Allocate the shield cache. also improve commentary quite a bit.
...
Copied from Perforce
Change: 190147
ServerID: perforce.ravenbrook.com
2016-03-17 13:37:40 +00: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
d4a055f70b
Merging branch/2016-03-12/pause into the master sources.
...
Copied from Perforce
Change: 190053
ServerID: perforce.ravenbrook.com
2016-03-15 06:31:08 +00:00
Gareth Rees
e034e7aeea
Address points made by rb in review < https://info.ravenbrook.com/mail/2016/03/14/18-48-19/0/ >
...
Copied from Perforce
Change: 190031
ServerID: perforce.ravenbrook.com
2016-03-14 20:10:14 +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
Richard Brooksby
ca7dcd913e
Basic removal of the reservoir pool from code and design.
...
Copied from Perforce
Change: 190000
ServerID: perforce.ravenbrook.com
2016-03-13 20:32:24 +00:00
Gareth Rees
167408b7e0
Implement pause time control.
...
Copied from Perforce
Change: 189921
ServerID: perforce.ravenbrook.com
2016-03-12 22:08:26 +00:00
Richard Brooksby
a3efd2d694
Catch-up merge from branch/2015-08-06/config to remove arenaconfigure.
...
Copied from Perforce
Change: 189335
ServerID: perforce.ravenbrook.com
2016-02-25 22:59:06 +00:00
Richard Brooksby
c015827c36
Catch-up merge from master sources.
...
Copied from Perforce
Change: 189265
ServerID: perforce.ravenbrook.com
2016-02-17 11:04:51 +00:00
Richard Brooksby
5dccd2e006
Catch-up merge from masters.
...
Copied from Perforce
Change: 188928
ServerID: perforce.ravenbrook.com
2016-01-20 11:04:09 +00:00
Richard Brooksby
eac348d664
Catch-up merge from masters.
...
Copied from Perforce
Change: 188921
ServerID: perforce.ravenbrook.com
2016-01-19 16:22:39 +00:00
Gareth Rees
aa6a027c68
Catch-up merge from branch/2015-08-11/policy to branch/2015-08-25/tradeoff.
...
Copied from Perforce
Change: 188250
ServerID: perforce.ravenbrook.com
2015-09-04 19:13:28 +01:00
Gareth Rees
2514663693
Move policy for mps_arena_step to policy module.
...
Copied from Perforce
Change: 188238
ServerID: perforce.ravenbrook.com
2015-09-04 15:25:37 +01:00
Gareth Rees
30a7fa542d
Fix bug introduced by change 188219: the end of the interval is not the same as the available collection time.
...
Copied from Perforce
Change: 188223
ServerID: perforce.ravenbrook.com
2015-09-04 08:53:23 +01:00
Gareth Rees
b9cd26b30a
There can only be an emergency when a trace is busy, so check this.
...
Copied from Perforce
Change: 188220
ServerID: perforce.ravenbrook.com
2015-09-03 20:14:06 +01:00
Gareth Rees
158c7758d7
Arenastep considers collecting the world after finishing a trace (not just on entry if no traces are busy).
...
ArenaStep does not care about quanta, so call TraceAdvance instead of TracePoll.
Copied from Perforce
Change: 188219
ServerID: perforce.ravenbrook.com
2015-09-03 19:11:49 +01:00
Gareth Rees
7bf1664f5e
Separate the values "more work to do?" and "amount of work done" in tracepoll. previously, the code used "amount of work done > 0" when it needed "more work to do?" but that's not right, because on the last two calls to traceadvance, no "work" is done (because reclaim work is not measured), but there may still be more work to do.
...
Copied from Perforce
Change: 188218
ServerID: perforce.ravenbrook.com
2015-09-03 15:51:37 +01:00
Gareth Rees
b4db3bd09f
Introduce new type work representing a measure of work done by the collector. use this systematically to make the code clearer.
...
Copied from Perforce
Change: 188210
ServerID: perforce.ravenbrook.com
2015-09-03 13:01:55 +01:00
Gareth Rees
bea6e91d73
Accumulate trace metrics in arenapark.
...
Copied from Perforce
Change: 188208
ServerID: perforce.ravenbrook.com
2015-09-03 11:50:28 +01:00
Gareth Rees
9dd49aa48e
New functions policypoll and policypollagain.
...
Update design.strategy.
Copied from Perforce
Change: 188165
ServerID: perforce.ravenbrook.com
2015-08-25 13:27:17 +01:00
Gareth Rees
d506458eea
New function policycollectiontime estimates the time needed to collect the arena. mysterious constants are given names and moved to config.h.
...
Copied from Perforce
Change: 188160
ServerID: perforce.ravenbrook.com
2015-08-21 15:27:14 +01:00
Richard Brooksby
1a730f9e83
Clarifying situations in which arenaaccess might find the barrier already down. see < https://info.ravenbrook.com/mail/2015/07/14/15-08-55/0/ >.
...
Copied from Perforce
Change: 188033
ServerID: perforce.ravenbrook.com
2015-07-14 17:18:00 +01:00
Gareth Rees
abbdcfc59f
Assert if a thread dies while registered, but make a best effort to continue working after the assertion, by marking the thread as dead and moving it to a ring of dead threads.
...
Copied from Perforce
Change: 187393
ServerID: perforce.ravenbrook.com
2014-10-25 17:41:42 +01:00
Gareth Rees
d0ae2f62ae
Rename lockreleasempm to lockrelease. this name was changed because of a clash with a symbol in scriptworks, and that's no longer a concern. see < https://info.ravenbrook.com/project/mps/import/2001-09-27/mminfo/doc/meeting/general/1997-02-19 >. if we get symbol name clashes in future, we can try the .name.single strategy, or maybe objcopy --prefix.
...
Copied from Perforce
Change: 187322
ServerID: perforce.ravenbrook.com
2014-10-21 22:35:30 +01:00
Gareth Rees
4348937862
Don't use avert unless the arena lock is held (it's not thread-safe in all varieties). add design explaining this.
...
Copied from Perforce
Change: 187238
ServerID: perforce.ravenbrook.com
2014-10-13 14:36:15 +01:00
Gareth Rees
f3cf67c792
New constant rankmin gives the minimum rank. use this (rather than 0 or rankambig) to better express the intention.
...
Copied from Perforce
Change: 187156
ServerID: perforce.ravenbrook.com
2014-10-07 22:31:12 +01:00
Gareth Rees
0048f341e0
Arenafinalize now asserts that the object belongs to a finalizable (attrgc) pool. (it's a programming error to try to register a non-finalizable object for finalization.)
...
Can't test this behaviour via the smoke tests, unfortunately.
Document the performance problem with mps_definalize, so that users aren't tempted into using it inappropriately.
Copied from Perforce
Change: 187109
ServerID: perforce.ravenbrook.com
2014-10-02 10:27:57 +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
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
7b5411c4f7
Catch-up merge from master sources @186035 to branch/2014-03-25/ansi.
...
Copied from Perforce
Change: 186040
ServerID: perforce.ravenbrook.com
2014-05-12 18:42:33 +01:00
Gareth Rees
e13fc954ce
Park the arena before destroying the default chain, to ensure that there are no traces using that chain.
...
Fix test cases that used automatic collection, but destroyed data structures without parking the arena.
Document the requirement on mps_chain_destroy and add the assertion to "common assertions and their causes".
Copied from Perforce
Change: 186021
ServerID: perforce.ravenbrook.com
2014-05-12 11:19:57 +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