1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-25 06:50:46 -08:00
Commit graph

2466 commits

Author SHA1 Message Date
Gareth Rees
ce8e22cd8e Split generic mutator context module into two parts: one for generic operating system (prmcan.c) and one for generic architecture (prmcanan.c).
Copied from Perforce
 Change: 192583
 ServerID: perforce.ravenbrook.com
2016-10-14 13:25:14 +01:00
Gareth Rees
9a2d4390b5 Add discriminator to mutatorcontextstruct and implement mutatorcontextinitfault and mutatorcontextinitthread on posix/linux.
Copied from Perforce
 Change: 192577
 ServerID: perforce.ravenbrook.com
2016-10-14 12:39:50 +01:00
Gareth Rees
0e3d8e373d Add discriminator to mutatorcontextstruct and implement mutatorcontextinitfault and mutatorcontextinitthread on os x.
Copied from Perforce
 Change: 192572
 ServerID: perforce.ravenbrook.com
2016-10-14 12:04:01 +01:00
Gareth Rees
1a04431cff New modulefile prmcw3.c avoids duplication of code between prmcw3i3.c and prmcw3i6.c.
Implement MutatorContextCheck on Windows. Add AVERT(MutatorContext, context) in PoolAccess and other functions.
Document initialization functions MutatorContextInitFault and MutatorContextInitThread and implement them on Windows.
Add a union discriminator to MutatorContextStruct on Windows so that we don't accidentally try to get the stack pointer from a fault context, or the exception address from a thread context.

Copied from Perforce
 Change: 192567
 ServerID: perforce.ravenbrook.com
2016-10-14 11:53:26 +01:00
Gareth Rees
4457a77a07 Initialization and checking of mutatorcontext data structures.
New files prmcix.c and prmcxc.c avoid duplicated code.

Copied from Perforce
 Change: 192562
 ServerID: perforce.ravenbrook.com
2016-10-13 23:13:40 +01:00
Gareth Rees
0abb95e025 Use protsgix.c on linux and delete protli.c.
Copied from Perforce
 Change: 192556
 ServerID: perforce.ravenbrook.com
2016-10-13 21:24:04 +01:00
Gareth Rees
a4064881dc In protsgix.c, construct a mutatorcontext object and pass it to arenaaccess.
Copied from Perforce
 Change: 192550
 ServerID: perforce.ravenbrook.com
2016-10-13 20:12:32 +01:00
Gareth Rees
139611337a Fix "make testmmqa" on freebsd (the shell doesn't do {a,b,c} expansion).
Copied from Perforce
 Change: 192545
 ServerID: perforce.ravenbrook.com
2016-10-13 19:31:25 +01:00
Gareth Rees
613f3f56f1 Fix comment: ll = clang/llvm, not gcc.
Copied from Perforce
 Change: 192540
 ServerID: perforce.ravenbrook.com
2016-10-13 19:15:27 +01:00
Gareth Rees
ba896883ba Fix makefile, accidentally broken by change 192512.
Copied from Perforce
 Change: 192539
 ServerID: perforce.ravenbrook.com
2016-10-13 19:13:31 +01:00
Gareth Rees
9b3e45e883 Implement mutatorcontextsp and mutatorcontextscan for platforms w3i3 and w3i6.
This means that ThreadScan becomes identical on these two platforms and can be moved to thw3.c.
This means that thw3.h, thw3i3.c and thw3i6.c become redundant and can be deleted.

Copied from Perforce
 Change: 192534
 ServerID: perforce.ravenbrook.com
2016-10-13 16:28:50 +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
b4a3d0824b Rename the "protection mutator context" module to "mutator context" (this module handles mutator context decoding for both the protection module and the thread module).
Rename functions Prot{Can,}StepInstruction to MutatorContext{Can,}StepInstruction so that they follow the naming convention in guide.implc.naming.prefix.program.
Move mutator context declarations out of prot.h into new header prmc.h.
Correct .assume.null in a couple of places -- it's not safe for MutatorContextStepInstruction to return ResUNIMPL, instead MutatorContextCanStepInstruction should return FALSE.

Copied from Perforce
 Change: 192528
 ServerID: perforce.ravenbrook.com
2016-10-13 15:06:14 +01:00
Gareth Rees
437bf9c6a4 Rename mutatorfaultcontext to mutatorcontext because this data structure is not only used to store the context of a fault, but also to store the context of a thread that has been suspended.
Copied from Perforce
 Change: 192523
 ServerID: perforce.ravenbrook.com
2016-10-13 14:23:39 +01:00
Gareth Rees
34be22b383 Remove undocumented global mps_exception_info. now that the mps is open source, there is no difficulty in debugging the mutator context.
Copied from Perforce
 Change: 192518
 ServerID: perforce.ravenbrook.com
2016-10-13 13:45:31 +01:00
Gareth Rees
d2f3bc0e36 Fix testmmqa target in the hot variety.
Copied from Perforce
 Change: 192515
 ServerID: perforce.ravenbrook.com
2016-10-13 13:31:58 +01:00
Gareth Rees
d0ae56d7dd Rename prot{i3,i6}.c to prmc{i3,i6}.c because these files are part of the protection mutator context module.
Rename prmc{i3,i6}{fr,li,w3,xc}.c to prmc{fr,li,w3,xc}{i3,i6}.c for consistency of ordering of platform codes (OS before AR before CT).

Copied from Perforce
 Change: 192512
 ServerID: perforce.ravenbrook.com
2016-10-13 13:24:47 +01:00
Gareth Rees
62be09b5e9 Revert incorrect change to globalspreparetodestroy (see change 192365) that made the mps assert when destroying an arena with uncollected finalization messages.
Copied from Perforce
 Change: 192473
 ServerID: perforce.ravenbrook.com
2016-09-27 11:57:19 +01:00
Gareth Rees
afbc6e32d7 The mmqa runset command now takes multiple test-sets.
Copied from Perforce
 Change: 192418
 ServerID: perforce.ravenbrook.com
2016-09-14 16:24:34 +01:00
Gareth Rees
1a86f372b4 Update following release 1.116.0.
Copied from Perforce
 Change: 192406
 ServerID: perforce.ravenbrook.com
2016-09-14 14:18:17 +01:00
Gareth Rees
d393296238 Don't set stackprobedepth to 500 if config_pf_ansi is defined -- this leads to an assertion failure in span.c.
Copied from Perforce
 Change: 192393
 ServerID: perforce.ravenbrook.com
2016-09-14 13:03:27 +01:00
Gareth Rees
d5aa38cf65 Account allocations in amc segments between whiten and reclaim as condemned, improving the accuracy of the mortality calculation and avoiding assertion failure.
Copied from Perforce
 Change: 192387
 ServerID: perforce.ravenbrook.com
2016-09-14 12:49:51 +01:00
Gareth Rees
6398c5140d Update mps_release in preparation for forthcoming release 1.116.0.
Copied from Perforce
 Change: 192370
 ServerID: perforce.ravenbrook.com
2016-09-13 17:43:39 +01:00
Gareth Rees
62f3be6400 Merge branch/2016-09-06/job004006.
Copied from Perforce
 Change: 192365
 ServerID: perforce.ravenbrook.com
2016-09-13 17:32:07 +01:00
Gareth Rees
d43cc4ef35 Fix problems noted in review.
Copied from Perforce
 Change: 192357
 ServerID: perforce.ravenbrook.com
2016-09-13 17:19:07 +01:00
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
e8be3323ff Usability improvements for mmqa:
* -i option (MPS_INCLUDE_DIR) now defaults to the code directory relative to the test harness location.
* -p option (PLATFORM) is now a six-character platform code for consistency with the rest of the MPS.
* New -v option (VARIETY) for specifying cool/hot/rash.
* -l option (MPS_LINK_OBJ) now defaults to the appropriate object file for the platform and variety.
* The object file is built automatically.
* If $Id$ of a test file is longer than 70 characters, cut characters out of the middle rather than off the end.
* Eliminate obsolete option -prod (MPS_PRODUCT).
* Support for FreeBSD.

Copied from Perforce
 Change: 192285
 ServerID: perforce.ravenbrook.com
2016-09-12 11:55:36 +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
b21f8b7e9a Improve documentation.
Copied from Perforce
 Change: 192258
 ServerID: perforce.ravenbrook.com
2016-09-09 11:18:12 +01:00
Gareth Rees
be5db32120 Lockisheld implementation for generic ("ansi") locks.
When CONFIG_THREAD_SINGLE is defined, use the generic lock module rather than compiling out all lock calls via lock.h. (Otherwise test cases that check LockIsHeld will fail.)

Copied from Perforce
 Change: 192254
 ServerID: perforce.ravenbrook.com
2016-09-09 11:01:04 +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
cb41b91f19 Remove support for linux 2.4 and 2.5 (these versions used linuxthreads). linux is now supported from version 2.6 onwards (these versions use posix threads).
Copied from Perforce
 Change: 192240
 ServerID: perforce.ravenbrook.com
2016-09-08 11:36:02 +01:00
Gareth Rees
a0db5c7bfe Catch-up merge from master sources to branch/2016-04-13/mortality.
Copied from Perforce
 Change: 192192
 ServerID: perforce.ravenbrook.com
2016-09-05 16:17:04 +01:00
Gareth Rees
a42ef06b8d Catch-up merge from master sources to branch/2016-04-12/job004000.
Copied from Perforce
 Change: 192187
 ServerID: perforce.ravenbrook.com
2016-09-05 16:01:17 +01:00
Gareth Rees
20e756ada8 Catch-up merge from master sources to branch/2016-04-21/amswalk.
Copied from Perforce
 Change: 192181
 ServerID: perforce.ravenbrook.com
2016-09-05 15:48:47 +01:00
Gareth Rees
c898410a63 Catch-up merge from the master sources to branch/2016-04-23/inst-methods.
Copied from Perforce
 Change: 192176
 ServerID: perforce.ravenbrook.com
2016-09-05 15:31:34 +01:00
Gareth Rees
8c219cdd92 Catch-up merge from the master sources.
Copied from Perforce
 Change: 192170
 ServerID: perforce.ravenbrook.com
2016-09-05 15:21:33 +01:00
Gareth Rees
484c7e3142 When injecting allocation failures to test the fail-over land, don't also inject failures into the arena's free land's block pool.
Copied from Perforce
 Change: 192164
 ServerID: perforce.ravenbrook.com
2016-09-05 13:17:59 +01:00
Gareth Rees
af67eaaea5 Correct the logic in mvfreesize -- lost spans are not accounted as free. only sum the free space in the spans in checking varieties, otherwise just return the cached sum.
Copied from Perforce
 Change: 192159
 ServerID: perforce.ravenbrook.com
2016-09-05 12:03:46 +01:00
Gareth Rees
d84baa6eed Don't pick a grain size that's so large that you can't avoid hitting the commit limit.
Copied from Perforce
 Change: 192154
 ServerID: perforce.ravenbrook.com
2016-09-05 11:37:19 +01:00
Gareth Rees
e3951fca1e Add _critical to assertions on the critical path for manual-allocation-bound programs using mvff. this brings the hot/rash ratio for "djbench mvff" down from over 150% to about 130%.
Copied from Perforce
 Change: 192148
 ServerID: perforce.ravenbrook.com
2016-09-04 19:20:05 +01:00
Gareth Rees
d558f6acb2 Build and test the toy scheme interpreter during continuous integration, to reduce the risk of accidentally breaking it.
Copied from Perforce
 Change: 192133
 ServerID: perforce.ravenbrook.com
2016-09-04 14:47:08 +01:00
Gareth Rees
a90a02704a Initialize in/out parameter old_exception_count before passing it to thread_swap_exception_ports.
Copied from Perforce
 Change: 192128
 ServerID: perforce.ravenbrook.com
2016-09-04 14:28:28 +01:00
Gareth Rees
48b3a425af Support registering a thread with the mps multiple times on os x.
Restore test case.

Copied from Perforce
 Change: 192127
 ServerID: perforce.ravenbrook.com
2016-09-04 14:23:07 +01:00
Gareth Rees
6932a51b2f New preprocessor constants config_pthreadext_sigsuspend and config_pthreadext_sigresume for configuring the signals used to suspend and resume threads.
Copied from Perforce
 Change: 192122
 ServerID: perforce.ravenbrook.com
2016-09-04 13:55:39 +01:00
Gareth Rees
f1b3655bd5 Add a case for rootthread to rootcheck.
Add test coverage for mps_root_create_thread_scanned and mps_root_create_area; improve coverage for mps_root_create_area_tagged, mps_scan_area_tagged, mps_scan_area.

Copied from Perforce
 Change: 192111
 ServerID: perforce.ravenbrook.com
2016-09-04 11:56:09 +01:00
Gareth Rees
4fd5435a51 Avoid strict aliasing errors in the mps test suite, so that it compiles and runs using gcc 6.1.
Update the manual entries for mps_alloc and mps_sac_alloc with notes highlighting the problem.

Copied from Perforce
 Change: 192104
 ServerID: perforce.ravenbrook.com
2016-09-02 19:20:58 +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
63b301ca93 New program mpseventpy emits python data structures representing telemetry events.
Copied from Perforce
 Change: 191895
 ServerID: perforce.ravenbrook.com
2016-06-02 15:02:05 +01:00
Gareth Rees
38614c785e Make shield assertions robust against deep checking -- when shieldcover is called from shieldraise there is one unsynced segment that has not yet been queued. record this fact in a new queuepending flag in the shield structure.
Remove incorrect shield assertion "shield->depth == 0 || shield->suspended" -- depth may be increased without suspending the mutator if the segment did not need protecting.

Copied from Perforce
 Change: 191812
 ServerID: perforce.ravenbrook.com
2016-05-03 17:25:27 +01:00