1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-26 07:11:34 -08:00
Commit graph

103 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
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
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
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
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
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
d1b44a4f05 Back out change 185626 (violates the design.mps.writef.snazzy).
Copied from Perforce
 Change: 185941
 ServerID: perforce.ravenbrook.com
2014-05-02 12:44:31 +01:00
Gareth Rees
2f4d1c8cd4 Catch-up merge from master sources to branch/2014-03-25/ansi.
Copied from Perforce
 Change: 185907
 ServerID: perforce.ravenbrook.com
2014-04-30 16:51:30 +01:00
David Lovemore
70c0cb9a94 Rename bool(v) to boolof(v) to fix clash with the windows header file windows.h
Copied from Perforce
 Change: 185841
 ServerID: perforce.ravenbrook.com
2014-04-28 13:14:04 +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
e65a085be9 New function tracedescribe.
Copied from Perforce
 Change: 185631
 ServerID: perforce.ravenbrook.com
2014-04-17 14:22:19 +01:00
Gareth Rees
6721c2b913 Correct indentation of describe output.
Copied from Perforce
 Change: 185626
 ServerID: perforce.ravenbrook.com
2014-04-17 13:36:42 +01:00
Gareth Rees
3731f5741b Check the poolring so that there is an assertion failure (not a crash) if the client fails to destroy a pool.
Copied from Perforce
 Change: 185527
 ServerID: perforce.ravenbrook.com
2014-04-14 22:31:24 +01:00
Gareth Rees
2eac654319 Check rings before destroying the control pool, so that you get an assertion when a ring points into space that is about to be unmapped, instead of a crash after it has been unmapped.
Copied from Perforce
 Change: 185495
 ServerID: perforce.ravenbrook.com
2014-04-13 20:51:10 +01:00
Gareth Rees
da307afb81 Turn on -wduplicate-enum and -wmissing-variable-declarations options for clang. ensure the mps compiles with these options.
Copied from Perforce
 Change: 185466
 ServerID: perforce.ravenbrook.com
2014-04-11 15:17:20 +01:00
Gareth Rees
93a79ac8a6 Add -wconversion to the options for gcc. ensure that the mps builds.
Copied from Perforce
 Change: 185463
 ServerID: perforce.ravenbrook.com
2014-04-11 14:25:15 +01:00
Gareth Rees
a76ab7ce6b Catch-up merge from master sources to branch/2014-03-25/ansi.
Copied from Perforce
 Change: 185305
 ServerID: perforce.ravenbrook.com
2014-04-07 16:04:58 +01:00
Gareth Rees
b7c3b0ae84 Can't can't checkd_nosig(ring, &arenaring) because &arenaring is never null and gcc will warn about a constant comparison.
Copied from Perforce
 Change: 185279
 ServerID: perforce.ravenbrook.com
2014-04-07 13:22:21 +01:00
Gareth Rees
f2776dc0b4 Can't use checkd_nosig(tree, ...) because treeempty is null.
arena->enabledMessageTypes might be NULL.

Copied from Perforce
 Change: 185271
 ServerID: perforce.ravenbrook.com
2014-04-07 10:14:40 +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
84cd92ab89 Improve clarity of product configuration so that names more explicitly indicate what they do:
* CONFIG_POLL_NONE (because the user-visible consequence is that polling is no longer supported; was CONFIG_PROTECTION_NONE).
* DISABLE_LOCKS (was THREAD_SINGLE).
* DISABLE_SHIELD (was THREAD_SINGLE && PROTECTION_NONE)
* DISABLE_REMEMBERED_SET (was PROTECTION_NONE)
When the shield is disabled, ArenaLeave asserts that there are no busy traces, and ArenaPoll is a no-op.
By having functions implemented using the corresponding macro, we can avoid duplicated code, and avoid testing DISABLE_SHIELD in global.c.
Remove all remaining references to MPS_PROD_EPCORE.

Copied from Perforce
 Change: 185176
 ServerID: perforce.ravenbrook.com
2014-04-02 15:48:57 +01:00
Gareth Rees
ad72ec24c8 Remove comment from rb "the thread_single and protection_none build configs aren't regularly tested, though they might well be useful for embedded custom targets. should test them." -- this configuration is now tested by "make test" on the linux and freebsd platforms.
Copied from Perforce
 Change: 185054
 ServerID: perforce.ravenbrook.com
2014-03-27 15:57:34 +00:00
Gareth Rees
cb17267a8e Fix some checkleveldeep assertions:
1. In GlobalsPrepareToDestroy, set arenaGlobals->defaultChain to NULL before calling ChainDestroy, to avoid a failed ChainCheck inside ControlFree.
2. In GlobalsPrepareToDestroy, set arenaGlobals->lock to NULL after destroying it, to avoid a failed LockCheck inside ControlFree.
3. In TraceIdMessagesCreate, set tsMessage[ti] and tMessage[ti] together to avoid a failed TraceIdMessagesCheck inside traceMessageInit.
4. In TracePostStartMessage, set tsMessage[ti] to NULL before calling MessagePost, to avoid a failed TraceStartMessageCheck inside ControlFree.
5. Ditto for TracePostMessage and tMessage[ti].

Copied from Perforce
 Change: 184924
 ServerID: perforce.ravenbrook.com
2014-03-20 23:37:02 +00:00
Richard Brooksby
1982233b78 Adding a default chain to the arena. not used anywhere yet.
Copied from Perforce
 Change: 184224
 ServerID: perforce.ravenbrook.com
2014-01-29 18:07:43 +00:00
Gareth Rees
73fa242bb1 Improve documentation of thread- and exception-safety precautions.
Copied from Perforce
 Change: 183635
 ServerID: perforce.ravenbrook.com
2013-11-04 15:14:47 +00:00
Gareth Rees
bb7a5f1389 Improve the explanation at the start of globalsfinish.
Put assertion from vmChunkDestroy into the manual.

Copied from Perforce
 Change: 182633
 ServerID: perforce.ravenbrook.com
2013-06-08 16:16:48 +01:00
Gareth Rees
1c4ff669ac Remove diag facility.
Copied from Perforce
 Change: 182553
 ServerID: perforce.ravenbrook.com
2013-06-05 18:35:40 +01:00
Gareth Rees
3aa19f30a4 Assert instead of crashing in mps_arena_destroy when the client has failed to destroy some data structures.
Also, don't forget to finish the chainRing.

Copied from Perforce
 Change: 182258
 ServerID: perforce.ravenbrook.com
2013-05-27 12:58:05 +01:00
Richard Brooksby
07f446a450 Converting pools to use keyword arguments, mostly, and so far inconsistently, but at least it compiles.
Copied from Perforce
 Change: 181635
 ServerID: perforce.ravenbrook.com
2013-05-08 16:21:12 +01:00
Gareth Rees
a5e6a66511 Restore arena serial numbers.
Copied from Perforce
 Change: 181121
 ServerID: perforce.ravenbrook.com
2013-03-12 15:11:22 +00:00
Gareth Rees
81eca1b2c1 Make mps_arena_step suitable for purpose: arenastep now calls tracestartcollectall directly (not via arenastartcollect) so that it no longer unclamps the arena as a side effect.
Add test case: steptest now runs with the arena clamped, and checks that mps_arena_step does not unclamp it.

Copied from Perforce
 Change: 181098
 ServerID: perforce.ravenbrook.com
2013-03-08 15:13:16 +00:00
Gareth Rees
490ee8a31c New event "arenasetemergency".
Copied from Perforce
 Change: 180479
 ServerID: perforce.ravenbrook.com
2012-11-15 14:08:13 +00:00
Gareth Rees
6abf20535f Events have to be inside the arena lock.
Copied from Perforce
 Change: 180463
 ServerID: perforce.ravenbrook.com
2012-11-13 17:59:41 +00:00
Gareth Rees
6f81d69df3 Add two new events:
* ArenaAccess for handling barrier hits;
* ArenaPoll for choosing a quantum of work.

Copied from Perforce
 Change: 180432
 ServerID: perforce.ravenbrook.com
2012-11-09 15:19:35 +00:00