1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-28 00:01:33 -08:00
Commit graph

79 commits

Author SHA1 Message Date
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
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
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
Richard Brooksby
dc00e06914 Fixing assumption in arenaread that we are in a trace and the segment is grey.
Copied from Perforce
 Change: 179403
 ServerID: perforce.ravenbrook.com
2012-09-10 19:04:53 +01:00
David Lovemore
75a1d731ba Unused variable.
Copied from Perforce
 Change: 179390
 ServerID: perforce.ravenbrook.com
2012-09-10 13:44:34 +01:00
David Lovemore
8cc0eeb220 Scan at correct rank according to the band in arenaread.
Copied from Perforce
 Change: 179385
 ServerID: perforce.ravenbrook.com
2012-09-10 12:15:20 +01:00
Richard Brooksby
75837d8376 Fixing type puns around arenapeek and arenapoke by allowing them to take a ref * to get a ref, rather than an addr.
Copied from Perforce
 Change: 179382
 ServerID: perforce.ravenbrook.com
2012-09-10 10:33:22 +01:00
Richard Brooksby
858e4ac0ac Partial merge of branch/2012-07-23/cet-transform, excluding cet-specific parts.
Copied from Perforce
 Change: 179309
 ServerID: perforce.ravenbrook.com
2012-09-06 17:17:18 +01:00
Richard Brooksby
27c6706791 Merging branch/2012-08-21/diagnostic-telemetry.
Copied from Perforce
 Change: 179289
 ServerID: perforce.ravenbrook.com
2012-09-05 23:45:31 +01:00
Richard Brooksby
8d7373042c Making note about low priority fixme task.
Copied from Perforce
 Change: 179202
 ServerID: perforce.ravenbrook.com
2012-09-03 14:49:25 +01:00
Richard Brooksby
d3aacdebfc Suppressing warnings revealed by increased level of optimisation and building the mps from mps.c
Copied from Perforce
 Change: 179192
 ServerID: perforce.ravenbrook.com
2012-09-03 13:15:34 +01:00
Richard Brooksby
fa0bfed44e Removing product-specific configuration, including dylan- and scriptworks-specific targets and config_prod configurations. we should support any necessary requirements generically.
It's now possible to write "cc -c mps.c" and get a sensible result.

Copied from Perforce
 Change: 179169
 ServerID: perforce.ravenbrook.com
2012-09-02 10:39:42 +01:00
Richard Brooksby
89a685f164 Renaming some check* macros with more accurate names, making remaining check* macros similar in function.
Copied from Perforce
 Change: 179155
 ServerID: perforce.ravenbrook.com
2012-09-01 10:18:08 +01:00
Richard Brooksby
e00495829f Adding more events corresponding to diagnostics.
Copied from Perforce
 Change: 179141
 ServerID: perforce.ravenbrook.com
2012-08-31 19:33:45 +01:00
Richard Brooksby
7047e27cd1 Writing events into separate buffers by kind.
Always recording events into buffers, but only writing them to the telemetry stream if they're enabled.

Copied from Perforce
 Change: 179136
 ServerID: perforce.ravenbrook.com
2012-08-31 16:09:07 +01:00
Richard Brooksby
4009b8a559 Abolishing eventgen.pl. event structures are now expanded by the preprocessor.
Abolishing event formats.  Each event now has its own structure.
Event parameters are now written directly into the event buffer, rather than being copied twice.

Copied from Perforce
 Change: 179010
 ServerID: perforce.ravenbrook.com
2012-08-21 22:48:11 +01:00
Richard Brooksby
f2f702fc18 Added single compilation unit version of mps library to allow global optimization and universal binary building. minor fixes to other sources to avoid clashing symbols.
Separated XCI3GC (gcc) from XCI3LL (clang) platforms, so that we can build both 32- and 64-bit binaries with clang.
Enabled universal (multi architecture) builds.

Copied from Perforce
 Change: 178287
 ServerID: perforce.ravenbrook.com
2012-05-22 21:27:55 +01:00
Richard Kistruck
27df534da7 Mps br/padding arenastep: do not change pollthreshold -- that's for arenapoll, not arenastep.
So ArenaStep may advance, but not retard, trace work.

Copied from Perforce
 Change: 169855
 ServerID: perforce.ravenbrook.com
2010-02-24 16:18:10 +00:00
Richard Kistruck
0540074ccb mps br/padding (back out non-working changelist 169853 (attempt to clear up what "clamped" means))
Copied from Perforce
 Change: 169854
 ServerID: perforce.ravenbrook.com
2010-02-24 16:14:38 +00:00
Richard Kistruck
9c4e0d4265 Mps br/padding (non-working changelist) see whether we can clear up what "clamped" means:
ArenaPoll will still call TracePoll if clamped...
but TracePoll won't start a new trace if clamped
ArenaStep won't start an opportunistic full collect if clamped
ArenaStep won't advance pollThreshold, ever
traceFlip asserts that clamped is FALSE.
(see http://info.ravenbrook.com/mail/2010/02/23/13-19-24/0.txt)
---
But no, clamped is more complex than that.
  - Certain mps.h calls affect it.
  - Certain MPS tests use it for more control and reproducibility.
  - MPS itself uses it, as part of starting a full collect, for which it must first run any current trace to completion without starting any new ones.
In particular, this set of changes asserts:
  MPS ASSERTION FAILURE: ArenaGlobals(arena)->clamped == FALSE
  trace.c
  534
because mps_arena_collect() tries to start a full collect while clamped.
---
So this changelist is for historical interest only, and will be backed out.

Copied from Perforce
 Change: 169853
 ServerID: perforce.ravenbrook.com
2010-02-24 16:07:17 +00:00
Richard Kistruck
deb6058af8 Mps br/padding arenapoll: non-naive fix for j2205: correct updating of pollthreshold, depending on whether we have no work and are sleeping, or have work and are advancing the clock by one unit. if there's no work, don't keep checking. avoid multiple calls to clock().
Copied from Perforce
 Change: 169851
 ServerID: perforce.ravenbrook.com
2010-02-23 13:43:27 +00:00
Richard Kistruck
ffb0ef749e Mps br/padding: global.c arenapoll: just loop until pollthreshold is past fillmutatorsize. don't be clever. fixes defect in global.cwhere if there was no tracepoll work to do, pollthreshold would not be updated. (ooops).
Copied from Perforce
 Change: 169818
 ServerID: perforce.ravenbrook.com

GitHub-reference: https://github.com/Ravenbrook/mps/issues/4
2010-02-12 17:17:32 +00:00
Richard Kistruck
540f72c8ff Mps br/padding: make arenapoll do lots of tracepolls if required, to catch up after fillmutatorsize jumps by > 64kib (job002205)
Changes:
  - separate ArenaPoll and ArenaStep code paths;
  - simplify ArenaPoll;
  - loop calling TracePoll to catch-up;
  zcoll: 100MB is a more sensible arena size than 0.5 MB
Warning: barely "experimental" code quality, omitting the following necessities:
  - consideration of interactions with ArenaStep,
  - re-engineering of ArenaPoll and friends.

Copied from Perforce
 Change: 169814
 ServerID: perforce.ravenbrook.com
2010-02-12 14:16:53 +00:00
Richard Kistruck
7c06dd2ad6 Mps br/padding:
poolamc.c tidy up:
  neater implementation of obj1pip (amcReclaimNailed)
  neater implementation of amcResetTraceIdStats -- no need for a function any more
  delete lots of obsolete temporary diagnostic (superseded by AMCTraceEnd_pageret)
  a few more avers (especially on buffer empty)
also revert temporary diagnostic changes in arena.c, config.h, diag.c, global.c
diag.c: fix diag-buffer at 100 screenfuls (200000 chars).
zcoll.c: reinstate Make 50000 with occasional big objs.

Copied from Perforce
 Change: 168688
 ServerID: perforce.ravenbrook.com
2009-09-17 16:59:39 +01:00
Richard Kistruck
9821bdea02 Mps br/padding diag: make globalsdescribe only call pooldescribe for amc, please
Copied from Perforce
 Change: 168357
 ServerID: perforce.ravenbrook.com
2009-07-24 17:03:59 +01:00
Richard Kistruck
33546a36cc Mps br/timing global.c: report dropped messages (currently in diagnostic varieties only)
Copied from Perforce
 Change: 166955
 ServerID: perforce.ravenbrook.com
2008-12-16 17:54:53 +00:00
Richard Kistruck
cd8f0ed2ad Mps br/timing global.c: new diag "globalspreparetodestroy", reports if message queue not empty.
Copied from Perforce
 Change: 166952
 ServerID: perforce.ravenbrook.com
2008-12-16 16:20:16 +00:00