1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-22 21:50:45 -08:00
Commit graph

171 commits

Author SHA1 Message Date
Gareth Rees
973f5369e1 Rename chain.h to locus.h, for consistency with other modules, where the interface has the same name as the implemention.
Copied from Perforce
 Change: 189682
 ServerID: perforce.ravenbrook.com
2016-03-06 18:56:32 +00:00
Richard Brooksby
07a1290f3e Eliminating closure_size from area scanners and root registration functions, as it isn't all that useful.
Copied from Perforce
 Change: 189491
 ServerID: perforce.ravenbrook.com
2016-03-01 15:59:06 +00:00
Richard Brooksby
998a11b45a Catch-up merge from master sources to branch/2015-09-04/stack.
Copied from Perforce
 Change: 189370
 ServerID: perforce.ravenbrook.com
2016-02-27 00:54:00 +00:00
Richard Brooksby
8a4e5ab290 Moving scanning accounting to tracescanarea and creating analogous formatscan.
Copied from Perforce
 Change: 189325
 ServerID: perforce.ravenbrook.com
2016-02-19 12:11:50 +00:00
Richard Brooksby
0f8bee3762 Detabifying code and restructuredtext files.
Copied from Perforce
 Change: 189309
 ServerID: perforce.ravenbrook.com
2016-02-18 19:58:13 +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
6b7c5f3d74 Lifting assumptions about area scanners closer to interface.
Copied from Perforce
 Change: 189191
 ServerID: perforce.ravenbrook.com
2016-02-15 16:46:09 +00:00
Richard Brooksby
16bde84a68 Generalising tracescanarea to be a checking wrapper for all area scanners.
Copied from Perforce
 Change: 189190
 ServerID: perforce.ravenbrook.com
2016-02-15 15:44:57 +00:00
Richard Brooksby
a3fdda4678 Lifting and generalising area scanners to allow flexible tagging schemes.
Copied from Perforce
 Change: 189189
 ServerID: perforce.ravenbrook.com
2016-02-15 15:30:08 +00:00
Richard Brooksby
b6be181e15 Lifting area scanners into client-side code.
These versions also produce tighter loops under Clang.

Copied from Perforce
 Change: 189188
 ServerID: perforce.ravenbrook.com
2016-02-14 00:57:28 +00:00
Richard Brooksby
65c32e5965 Fixing misuse of format header offset to decode tagging. see <https://info.ravenbrook.com/mail/2016/02/11/17-20-12/0/> point 5.
Copied from Perforce
 Change: 189134
 ServerID: perforce.ravenbrook.com
2016-02-11 21:32:41 +00:00
Richard Brooksby
c8fed5bb8d Renaming tracescanareamasked to tracescanareatagged
Copied from Perforce
 Change: 189133
 ServerID: perforce.ravenbrook.com
2016-02-11 20:39:57 +00:00
Richard Brooksby
a0e001c000 Catch up merge from master sources.
Copied from Perforce
 Change: 189130
 ServerID: perforce.ravenbrook.com
2016-02-10 21:10:25 +00:00
Gareth Rees
6521d927eb Add accesssetcheck and check accessset arguments.
Copied from Perforce
 Change: 188251
 ServerID: perforce.ravenbrook.com
2015-09-04 20:15:36 +01:00
Gareth Rees
edf30c06b4 New function mps_root_create_reg_masked applies a mask and pattern test to all words in registers and on the stack when scanning them. this supports tagged references in these locations.
Consistently use the type "Word *" for pointers into the stack or into saved registers.
Remove TraceScanAreaTagged.

Copied from Perforce
 Change: 188231
 ServerID: perforce.ravenbrook.com
2015-09-04 12:22:03 +01:00
Gareth Rees
9a303f6935 Refactor tracequantum into tracepoll and traceadvance. (tracequantum was formerly called from arenapark, but that doesn't care about the quantum size.)
Copied from Perforce
 Change: 188198
 ServerID: perforce.ravenbrook.com
2015-09-02 10:50:00 +01:00
Gareth Rees
eee7ccb60c New function policystarttrace decides whether to start a trace.
Copied from Perforce
 Change: 188154
 ServerID: perforce.ravenbrook.com
2015-08-20 16:57:33 +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
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
08f341fcc9 Catch-up merge from master sources @186540 to branch/2014-05-17/chunk-tree.
Copied from Perforce
 Change: 186546
 ServerID: perforce.ravenbrook.com
2014-06-12 17:55:16 +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
cf75884793 Refer to rb's e-mail for potential optimization.
Copied from Perforce
 Change: 186524
 ServerID: perforce.ravenbrook.com
2014-06-12 12:18:30 +01:00
Gareth Rees
de2a30d207 Catch-up merge from master sources @186481 to branch/2014-05-17/chunk-tree.
Copied from Perforce
 Change: 186491
 ServerID: perforce.ravenbrook.com
2014-06-11 13:52:31 +01:00
Gareth Rees
144d1aea03 Catch-up merge from master sources @186213 to branch/2014-05-17/chunk-tree.
Copied from Perforce
 Change: 186214
 ServerID: perforce.ravenbrook.com
2014-05-20 19:11:50 +01:00
Gareth Rees
2f0ef9355d Clarify tracefix logic by unwinding the nested conditions.
Change the arena's chunk tree from a splay tree to an ordinary tree (so that it's not possible to accidentally splay it and leave it unbalanced).
New function TreeFindNext allows us to implement TractFirst and TractNext without having to splay the tree.
Make sure all operations on the chunk tree leave it balanced. But don't balance the tree directly in ChunkFinish() because this is only ever called in a loop where multiple chunks are being deleted from the tre. Instead use the sequence TreeToVine -- iterate and delete -- TreeBalance. The new macro TREE_DESTROY assists with this.
No need any more for ArenaIsReservedAddr, CHUNK_OF_ADDR, TRACT_OF_ADDR.
Update design documentation.

Copied from Perforce
 Change: 186212
 ServerID: perforce.ravenbrook.com
2014-05-20 18:12:37 +01:00
Gareth Rees
04a44878f3 Catch-up merge from master sources @186174 to branch/2014-04-30/poolgen.
Copied from Perforce
 Change: 186185
 ServerID: perforce.ravenbrook.com
2014-05-19 14:59:19 +01:00
Gareth Rees
4d10bb418b Catch-up merge from master sources @186077 to branch/2014-04-23/awl.
Copied from Perforce
 Change: 186110
 ServerID: perforce.ravenbrook.com
2014-05-15 10:17:41 +01:00
Gareth Rees
4c7106cd6f Check the trace argument to tracequantum.
Copied from Perforce
 Change: 186027
 ServerID: perforce.ravenbrook.com
2014-05-12 13:35:21 +01:00
Gareth Rees
8a84937edb Improve formatting of poolgendescribe and tracedescribe.
Add ArenaDescribe calls to amcss and finalcv to get coverage of PoolGenDescribe, TraceDescribe, and MRGDescribe.

Copied from Perforce
 Change: 186010
 ServerID: perforce.ravenbrook.com
2014-05-11 21:13:55 +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
d05197dccb Avoid the need for newsizeatcreate by emitting events for the pool generations in tracecreate instead of tracestart.
Get rid of proflow member of GenDescStruct (it was unused).
Use STATISTIC to avoid updating segs, freeSize, oldSize, and oldDeferredSize in non-checking varieties.
Add design for pool generation accounting.

Copied from Perforce
 Change: 185930
 ServerID: perforce.ravenbrook.com
2014-05-01 19:00:08 +01:00
Gareth Rees
4fa0ae0db9 Output all the pool generation accounting information.
Copied from Perforce
 Change: 185911
 ServerID: perforce.ravenbrook.com
2014-04-30 17:39:37 +01:00
Gareth Rees
36d731c149 Use double-entry book-keeping and bank reconciliation to ensure the soundness and completeness of the pool generation size accounting.
Copied from Perforce
 Change: 185888
 ServerID: perforce.ravenbrook.com
2014-04-30 12:14:54 +01:00
Gareth Rees
0eb9ac546f Pool generations now refer directly to their generation (not via a chain and a generation number).
Allocation into a generation now via PoolGenAlloc (not ChainAlloc).
The "top generation" logic is encapsulated in the function ChainGen.

Copied from Perforce
 Change: 185877
 ServerID: perforce.ravenbrook.com
2014-04-30 11:18:44 +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
b888d047ba Explain traceaddwhite failure logic as requested by nb in <https://info.ravenbrook.com/mail/2014/04/24/12-10-09/0/>.
Copied from Perforce
 Change: 185800
 ServerID: perforce.ravenbrook.com
2014-04-25 17:41:56 +01:00
Gareth Rees
b674ece749 Tracecondemnzones could leave the white set inconsistent if traceaddwhite failed. add an assertion to cover this case (corresponding to the similar assertion in tracecondemnall).
Copied from Perforce
 Change: 185765
 ServerID: perforce.ravenbrook.com
2014-04-23 20:22:19 +01:00
Gareth Rees
6ffd4c7df5 Fix bugs in condemn logic:
1. TraceStartCollectAll now condemns all segments in pools with AttrGC (not just pools attached to generation zero of some chain, as before).
2. ChainDeferral now looks at all generations in the chain, so that the chain is condemned if any generation's new size is greater than its capacity (not just generation zero, as before).
3. ChainCondemnAuto now condemns all generations up to and including the highest generation whose new size is greater than its capacity (rather than, as before, up to and excluding the lowest generation whose new size is lower than its capacity).
Update finaltest.c so that it has a mode in which it allocates in generation 1 of a chain and with the arena released so that the above fixes are tested. Remove the MPS_KEY_GEN workarounds from awlut and awluthe as these are no longer needed.

Copied from Perforce
 Change: 185741
 ServerID: perforce.ravenbrook.com
2014-04-22 17:53:47 +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
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
9c8713f51b Fix problems found by coverity. see <https://info.ravenbrook.com/mail/2014/04/10/23-23-42/0/> for full analysis.
Copied from Perforce
 Change: 185445
 ServerID: perforce.ravenbrook.com
2014-04-11 00:26:48 +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
9bb6b2f8be Tidy-up of attributes and pool classes:
* Bring design up to date.
* New function PoolHasAttr encapsulates attribute checking.
* Abstract classes are abstract and mustn't be checked.
* The dummy pool class in fotest needs a size.
* Abstract pool classes null out methods that they can't provide a generic implementation for, to force subclasses to provide one.
* New function PoolTrivFramePopPending provides a generic implementation of that method.
* Rename PoolNoFreeWalk to PoolTrivFreeWalk since it has NOOP rather than NOTREACHED.
* Check that AttrMOVINGGC implies AttrGC.
* Remove unimplemented attributes (BUF_RESERVE, BUF_ALLOC, INCR_RB, INCR_WB, PM)
* AMC now inherits from AMCZ instead of the other way round. This is simpler: AMC adds features to AMCZ rather than AMCZ taking features away (and not quite getting it right).
* Similarly, LO inherits from AbstractSegBufPoolClass + PoolClassMixInCollect so that it doesn't have to clear AttrSCAN and the scan methods.
* Fix bug in MFSCheck -- mustn't check unroundedUnitSize >= UNIT_MIN since small unit sizes are rounded up to UNIT_MIN.
* Don't see AttrFREE in MRG (since no free method is supplied).
* Check AttrSCAN systematically (in PoolScan and SegCheck) rather than opportunistically in TraceStart and TraceQuantum.

Copied from Perforce
 Change: 185231
 ServerID: perforce.ravenbrook.com
2014-04-04 17:05:08 +01:00
Gareth Rees
b2ec897e6b Support the clang address sanitizer.
Copied from Perforce
 Change: 185096
 ServerID: perforce.ravenbrook.com
2014-03-30 18:51:53 +01:00
Gareth Rees
f025b00534 Turn on -wunreachable-code for gcc and clang.
Remove unreachable code:
* No need to have different debug options or structured allocation classes for different platforms.
* Don't use STATISTIC_BEGIN, use STATISTIC_STAT.
* #ifdef away the unused code in zmess.c for testing ControlAlloc failure.
* Remove unused code from the example Scheme interpreter.

Copied from Perforce
 Change: 185089
 ServerID: perforce.ravenbrook.com
2014-03-30 14:26:02 +01:00
Richard Brooksby
d8cb7e9a01 Catch-up merge from master, mainly to pick up chain-zones merge.
Copied from Perforce
 Change: 184343
 ServerID: perforce.ravenbrook.com
2014-02-14 15:23:36 +00:00
Richard Brooksby
e6ff3a648f Merging branch //info.ravenbrook.com/project/mps/branch/2014-01-29/mps-chain-zones/... into master.
Copied from Perforce
 Change: 184342
 ServerID: perforce.ravenbrook.com
2014-02-14 15:15:07 +00:00
Richard Brooksby
8679bb210f Catch-up merge from master, mainly to pick up gcbench.
Copied from Perforce
 Change: 184335
 ServerID: perforce.ravenbrook.com
2014-02-12 17:39:31 +00:00