1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-03-23 07:12:12 -07:00
Commit graph

59 commits

Author SHA1 Message Date
Richard Brooksby
af3fd5eb3b Removing the commit limit from the amc and ams stress tests, since they hit it legitimately at random, and it isn't a good test of anything much.
See <https://info.ravenbrook.com/mail/2016/03/08/18-14-41/0/> for discussion and suggestions for better testing.

Copied from Perforce
 Change: 189781
 ServerID: perforce.ravenbrook.com
2016-03-08 18:25:07 +00:00
Gareth Rees
6ea9bc7894 Rename mps_key_arena_commit_limit and mps_key_arena_spare_commit_limit as mps_key_commit_limit and mps_key_spare_commit_limit respectively, as suggested by nb in review.
Copied from Perforce
 Change: 188286
 ServerID: perforce.ravenbrook.com
2015-09-08 16:21:27 +01:00
Gareth Rees
098b4da32d New function mps_arena_configure provides keyword argument interface to changing the properties of an arena.
New keyword arguments MPS_KEY_ARENA_COMMIT_LIMIT and MPS_KEY_SPARE_ARENA_COMMIT_LIMIT can be passed to mps_arena_create_k or mps_arena_configure.
Deprecate mps_arena_commit_limit_set and mps_arena_spare_commit_limit_set.

Copied from Perforce
 Change: 188085
 ServerID: perforce.ravenbrook.com
2015-08-06 17:02:51 +01:00
Gareth Rees
f1030073d4 Count the number of calls to make, for help with setting watchpoints.
Copied from Perforce
 Change: 187491
 ServerID: perforce.ravenbrook.com
2014-11-07 14:52:26 +00:00
Gareth Rees
052f53e367 Use gc_start messages to count collections.
Copied from Perforce
 Change: 187487
 ServerID: perforce.ravenbrook.com
2014-11-07 13:20:49 +00:00
Gareth Rees
39e8b866cf Rename mps_class_t to mps_pool_class_t for clarity.
Retain a typedef for mps_class_t for backwards compatibility.

Copied from Perforce
 Change: 187065
 ServerID: perforce.ravenbrook.com
2014-09-27 13:37:38 +01:00
Gareth Rees
78507d9df6 Ensure that the amcss test case uses a wide range of arena grain sizes (by scaling up the whole allocation).
Remove hack from rnd_grain -- this was covering up a bug.
Base the AMC "large" segment determination on the requested object size, not the (rounded up) segment size.
Assert in the case where largeSize < extendBy: this has bad space performance.

Copied from Perforce
 Change: 186755
 ServerID: perforce.ravenbrook.com
2014-06-30 16:07:09 +01:00
Gareth Rees
6215109145 Fix problems noted by rb in review <https://info.ravenbrook.com/mail/2014/06/18/14-40-10/0/>
Copied from Perforce
 Change: 186669
 ServerID: perforce.ravenbrook.com
2014-06-18 16:24:38 +01:00
Gareth Rees
8c3e5886b4 Vmpagesize now takes no arguments -- this avoids suggesting (incorrectly) that it might return a different value for each vm.
New function ProtGranularity returns the protection granularity of the operating system. (On all currently supported operating systems this is the same as the granularity of memory mapping returned by VMPageSuze, but it's important to separate these concepts.) MPMCheck asserts that the granularity of memory mapping is a multiple of the granularity of protection.
Client arena supports MPS_KEY_ARENA_GRAIN_SIZE.
Some of the test cases set the arena grain size.

Copied from Perforce
 Change: 186588
 ServerID: perforce.ravenbrook.com
2014-06-13 17:19:23 +01:00
Gareth Rees
c71e35f3c1 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
f6c7ab1e2d Reduce size of nursery to make it more likely that we get a collection.
Copied from Perforce
 Change: 186015
 ServerID: perforce.ravenbrook.com
2014-05-11 22:08:29 +01:00
Gareth Rees
a4044d0dc3 It is an error to destroy a chain if there is an active trace using the chain.
Copied from Perforce
 Change: 186013
 ServerID: perforce.ravenbrook.com
2014-05-11 21:47:20 +01:00
Gareth Rees
a37937e01a Ensure coverage of tracedescribe.
Copied from Perforce
 Change: 186011
 ServerID: perforce.ravenbrook.com
2014-05-11 21:37:09 +01:00
Gareth Rees
920a58cc29 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
c44f2d6a20 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
ae09ed50c5 Fix amcssth -- don't try to test two incompatible features at the same time (see job003561).
Set the commit limit in amcss and amcsshe so that we test that the MPS can live in a tight memory limit.
Don't try to detect when the MPS has made a "dynamic" collection. This is not reliable or maintainable.

Copied from Perforce
 Change: 185430
 ServerID: perforce.ravenbrook.com
2014-04-10 15:06:58 +01:00
Gareth Rees
c230d2ffaa Remove unnecessary headers from the test suite.
Copied from Perforce
 Change: 185340
 ServerID: perforce.ravenbrook.com
2014-04-08 13:03:04 +01:00
Gareth Rees
2f61fea487 Amc/amcz subclass test needs to be other way round now.
Smoke tests for AMCZ -- add it to amcss, amcsshe, amcssth, finaltest and walkt0.
Smoke tests for LO -- add it to walkt0.
Fix finaltest for AMC and AWL -- need to allocate in generation 0 to get prompt finalization. (Also fix MMQA test function/51.c.)

Copied from Perforce
 Change: 185327
 ServerID: perforce.ravenbrook.com
2014-04-07 23:05:35 +01:00
Gareth Rees
35039bbba2 There's no need for test cases to include mpsw3.h any more.
Copied from Perforce
 Change: 185322
 ServerID: perforce.ravenbrook.com
2014-04-07 18:19:37 +01:00
Gareth Rees
c1df7b56ce 64-bit support for pelles c:
* New nmake file w3i6pc.nmk.
* New stack scanner ssw3i6pc.c supplies missing jump buffer definition.
* Some platform tests change from defined(MPS_PF_W3I6MV) to defined(MPS_OS_w3) && defined(MPS_ARCH_I6).
* Make reasonable changes to the source code to avoid warnings from Pelles C:
** Ensure that printf formats are consistent with arguments by using PRIuLONGEST and casting to ulongest_t.
** Use size_t for loop variables that index into arrays.
** Suppress "Consider changing type to 'size_t' for loop variable" warnings for the MPS core.

Copied from Perforce
 Change: 184996
 ServerID: perforce.ravenbrook.com
2014-03-25 10:59:09 +00:00
Gareth Rees
c94be13bdf Improved support for pelles c:
* Refactor nmake files so that a compiler-specific makefile is included; move Microsoft Visual C-specific options to mv.nmk.
* Add nmake files for Pelles (w3i3pc.nmk and pc.nmk).
* Rename spw3i3mv.c to spw3i3.c and spw3i6mv.c to spw3i6.c since these are also used by Pelles C.
* Make reasonable changes to the source code to avoid warnings from Pelles C:
** check results of function calls;
** avoid useless return values;
** undef max before defining it;
** ensure printf formats are checkable;
** move notreached() assertions to the end of blocks;
** suppress warnings in cases where the code shouldn't be changed ("Unreachable code", "Inline assembly code is not portable", "Structured Exception Handling is not portable").

Copied from Perforce
 Change: 184977
 ServerID: perforce.ravenbrook.com
2014-03-24 18:23:29 +00:00
Gareth Rees
333840f54a Ensure that all test cases call testlib_init so that the testlib assertion handler is installed: this ensures that on windows you can set mps_testlib_noabort to avoid the dialog box from abort().
Copied from Perforce
 Change: 184965
 ServerID: perforce.ravenbrook.com
2014-03-24 11:41:01 +00:00
Richard Brooksby
8a9d451ff8 Catch-up merge from custom/cet/main to master.
Includes installable assertion handler, events in circular memory buffers, LARGEADDRESSAWARE, etc.

Copied from Perforce
 Change: 182176
 ServerID: perforce.ravenbrook.com
2013-05-24 19:42:46 +01:00
Gareth Rees
f85720fcbd Comment out all calls to mps_arena_commit_limit_set in test case amcsshe. (this test case formerly set the commit limit "in the hope of getting one dynamic collection", but this was unreliable: see job003440 for details.)
Copied from Perforce
 Change: 181122
 ServerID: perforce.ravenbrook.com
2013-03-12 15:15:57 +00:00
Gareth Rees
8d6d8e7023 Remove "mps_alert_collection_set" from public interface and remove its implementation and test case. client programs should use the messages interface to find out what the mps is doing.
Copied from Perforce
 Change: 181119
 ServerID: perforce.ravenbrook.com
2013-03-12 14:33:27 +00:00
Gareth Rees
be50952a4f Move global 'pool' to local so that we can rename argument 'pol' to 'pool'.
Copied from Perforce
 Change: 181095
 ServerID: perforce.ravenbrook.com
2013-03-08 12:41:41 +00:00
Gareth Rees
296ac3bccf Improve the usability of the test suite:
1. "make test" now reports the name of the test case before running it, so that when you look back through the test output you can see which test case failed.
2. "make test" now collects the standard output from all the tests to a log file in /tmp, so that this does not clutter the user's terminal, and so that nothing is lost if the output exceeds the terminal's scrollback.
3. Each test case now prints a success message ("Conclusion: Failed to find any defects.") to standard output (not standard error) so that these messages do not clutter up the terminal when running "make test".
4. Each test case now uses its result code (not the printed message) to indicate whether it succeeded or failed.
5. More of the diagnostic messages from the test cases now start by printing argv[0] so that it is easier to tell which test case was running.

Copied from Perforce
 Change: 181071
 ServerID: perforce.ravenbrook.com
2013-03-07 13:13:32 +00:00
Richard Brooksby
5b557ecfb6 Deprecating the mps trampoline by using vectored exception handling on windows.
Copied from Perforce
 Change: 180961
 ServerID: perforce.ravenbrook.com
2013-02-20 12:11:40 +00:00
Richard Brooksby
dc7ceb607f Fixing up remaining visible warnings in xcode (all in test programs).
Expanding or removing some '@@@@' marks.

Copied from Perforce
 Change: 179574
 ServerID: perforce.ravenbrook.com
2012-09-20 01:08:41 +01:00
Richard Brooksby
f748ad2b28 Eliminating type puns on scan states, location dependencies, and allocation points through the mps interface.
Now that we're recommending inlining with client code and optimising with -O2 or -O3, we can't afford any bug introduced by the strict aliasing rule.

Copied from Perforce
 Change: 179322
 ServerID: perforce.ravenbrook.com
2012-09-07 12:58:57 +01:00
David Lovemore
6035ec1c75 Cleanup test. i've worked around the bogosity of the test for mps_arena_has_addr rather than replace it with something more fancy.
Copied from Perforce
 Change: 178495
 ServerID: perforce.ravenbrook.com
2012-06-18 14:50:40 +01:00
Richard Brooksby
af4b20b4e4 Disabling address probing test for 64-bit platforms until we design a better one.
Copied from Perforce
 Change: 178282
 ServerID: perforce.ravenbrook.com
2012-05-22 16:30:35 +01:00
David Lovemore
dc29d0d755 Using mps_word_const instead of ull for proper fixes to constants
Copied from Perforce
 Change: 178196
 ServerID: perforce.ravenbrook.com
2012-05-17 15:18:50 +01:00
Richard Brooksby
8d2ee74aa3 Temporary fix to constant to suppress warning.
Copied from Perforce
 Change: 178088
 ServerID: perforce.ravenbrook.com
2012-05-03 12:05:02 +01:00
Richard Brooksby
82c29cfd3e Fixing up occurences of "unsigned long" in the main mps and test code so that we no longer assume that "unsigned long" is large enough for a pointer or size, or that it's the longest available integer type, since these are not true on 64-bit windows.
Copied from Perforce
 Change: 178021
 ServerID: perforce.ravenbrook.com
2012-04-23 16:20:40 +01:00
Richard Kistruck
920390c31a Mps br/timing: rename mps_alert_collection_*. the correct term for when a new mps operation begins is "begin", and when it ends is "end". (whereas several starts/stops may happen during a single mps operation).
Copied from Perforce
 Change: 167386
 ServerID: perforce.ravenbrook.com
2009-02-16 17:11:05 +00:00
Richard Kistruck
cd17a5f411 Mps br/timing: mps_alert_collection_set() -- client sets a callback
function; MPS calls it synchronously on collection start/stop 
(immediately after posting start/stop message).  The callback 
receives two ints: alertcode (start|stop; see mps.h), and whycode 
(trace->why).  Note: callback is also called for heap walk 
start/stop.
amcss.c: show start/stop alerts.

Copied from Perforce
 Change: 166703
 ServerID: perforce.ravenbrook.com
2008-11-12 15:07:04 +00:00
Richard Kistruck
abb8654f3b Mps br/timing: amcss output changes:
- Keep counts of both collection start messages and collection end 
  messages.  Upon receipt of these messages, format the collection 
  start/end reports as 'brackets' (makes it easier to see whether 
  allocation continues during the collection or not).
- If mps_collections has changed, report() messages before doing 
  anything else.
- (source code clarity) Guess that the naked "4" in the 
  mps_arena_has_addr test means "hitsWanted", and label it.

Copied from Perforce
 Change: 166689
 ServerID: perforce.ravenbrook.com
2008-11-11 10:31:48 +00:00
Richard Kistruck
ac8737958b Mps br/timing:
message.c: maintain postedClock field, set it with mps_clock() at post time;
  amcss.c: call and display mps_message_clock() on _gc_start & _gc messages.

Copied from Perforce
 Change: 166677
 ServerID: perforce.ravenbrook.com
2008-11-07 16:11:37 +00:00
Richard Kistruck
a74aa28b4f Mps br/timing: (cosmetic) re-format report()'s switch on message type
to comply with design/cstyle.

Copied from Perforce
 Change: 166676
 ServerID: perforce.ravenbrook.com
2008-11-07 15:22:24 +00:00
Richard Kistruck
1be911f2ab Mps br/timing: (tabs) amcss.c
Copied from Perforce
 Change: 166670
 ServerID: perforce.ravenbrook.com
2008-11-07 13:37:23 +00:00
David Jones
1da7d11307 Mps: added mps_message_type_gc_start()
Copied from Perforce
 Change: 39781
 ServerID: perforce.ravenbrook.com
2003-02-19 16:34:08 +00:00
Richard Brooksby
667f82dbc4 Changing global graphics copyright notice to say "portions copyright" to avoid confusion.
Copied from Perforce
 Change: 30258
 ServerID: perforce.ravenbrook.com
2002-06-18 16:28:41 +01:00
Richard Brooksby
c11fa19243 Merging branch mps/2002-05-22/open-source-prep.
Making some new files consistent with changes from that branch.
Deleting some new Global Graphics confidential files.

Copied from Perforce
 Change: 30256
 ServerID: perforce.ravenbrook.com
2002-06-18 16:19:34 +01:00
Nick Barnes
0c8fe12191 Integrate changes from global graphics.
Copied from Perforce
 Change: 30250
 ServerID: perforce.ravenbrook.com
2002-06-18 14:14:55 +01:00
Richard Brooksby
f22e14e334 Eliminating "impl" type tags and replacing them with uri-style file references.
Copied from Perforce
 Change: 29900
 ServerID: perforce.ravenbrook.com
2002-06-07 17:34:59 +01:00
Richard Brooksby
5afb4899ef Adding forward reference to licenses from copyright notices.
Adding licenses to a couple of files I missed.

Copied from Perforce
 Change: 29837
 ServerID: perforce.ravenbrook.com
2002-06-06 11:56:19 +01:00
Richard Brooksby
819ed0ed76 Adding licenses to source code files.
Copied from Perforce
 Change: 29836
 ServerID: perforce.ravenbrook.com
2002-06-06 11:44:23 +01:00
Richard Brooksby
014a537725 Fixing minor printf format type mismatch in amcss.c.
Copied from Perforce
 Change: 29470
 ServerID: perforce.ravenbrook.com
2002-05-24 13:59:00 +01:00
Nick Barnes
3060aacc04 Improve treatment of dylan formats: keep common code in fmtdy.c, header-specific code in fmthe.c, the null format in fmtno.[ch], and split out the prototypes for the test functions into fmtdytst.h.
Copied from Perforce
 Change: 29145
 ServerID: perforce.ravenbrook.com
2002-05-14 13:06:13 +01:00