1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-21 13:10:37 -08:00
Commit graph

46 commits

Author SHA1 Message Date
Gareth Rees
9a57106d49 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
a3b3fcc7b6 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
d934afafc5 Catch-up merge from master sources to branch/2014-03-21/pellesc.
Copied from Perforce
 Change: 185074
 ServerID: perforce.ravenbrook.com
2014-03-28 13:54:30 +00:00
Gareth Rees
68edf84c3b Remove #pragma warning(disable: ...) for microsoft visual c/c++ warnings that are no longer generated by the code, so that we get the maximum checking from this compiler.
Copied from Perforce
 Change: 185072
 ServerID: perforce.ravenbrook.com
2014-03-28 13:09:14 +00:00
Gareth Rees
00ee0bfcc5 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
9d5266c0cc 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
cf0d96dd0b 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
5c6785b815 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
8dc0d72a8d 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
78d5f049f0 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
Richard Brooksby
13ba70d2dd Fixing warnings revealed by xcode (clang).
Copied from Perforce
 Change: 178898
 ServerID: perforce.ravenbrook.com
2012-08-11 09:30:24 +01:00
Richard Brooksby
0b1d9d1fbb Minor fixups to printing and scanning formats to build cleanly on freebsd.
Copied from Perforce
 Change: 178774
 ServerID: perforce.ravenbrook.com
2012-07-30 14:25:27 +01:00
David Lovemore
8fc8bd6370 Added mps_word_const and other fixes to get zcoll test to work
Copied from Perforce
 Change: 178193
 ServerID: perforce.ravenbrook.com
2012-05-17 14:55:18 +01:00
David Lovemore
9bf482ea08 Fixed up long constants and shifts that needed to be cast to correct type.
Copied from Perforce
 Change: 178095
 ServerID: perforce.ravenbrook.com
2012-05-03 16:38:47 +01:00
Richard Brooksby
61890da12b 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
6e4b89edd2 mps br/vmem: simple-chunk-return:
zcoll.c -- re-enable message timestamp reporting, and BigDropSmall tests (remove ifdefs)

Copied from Perforce
 Change: 170100
 ServerID: perforce.ravenbrook.com
2010-03-23 07:03:38 +00:00
Richard Kistruck
7bdbbeb2c9 mps br/vmem: simple-chunk-return:
arenavm.c:
   - M_whole, M_frac: print count of bytes as Megabytes
   - diag on VMCompact after all client-requested traces, plus any others where we returned a chunk.
   - show vmem change, and also trace cond, live / % / stuck(pip), notCond

 mpm.c -- new "$3" format for 0-padding 3-char-wide field, for thousandths of a MB

 zcoll.c -- try some new parameters for tests

 diag.c -- just VMCompact diag

Copied from Perforce
 Change: 170097
 ServerID: perforce.ravenbrook.com
2010-03-23 03:52:41 +00:00
Richard Kistruck
1ff022cae1 mps br/vmem: simple-chunk-return:
zcoll.c:
 How to get rid of all the objects, so full collect really collects all automatic objects:
   - Rootdrop() helps, but we can still retain a 1.2MB object;
   - stackwipe() does not help much -- these unwanted ambig refs are being left on the stack by MPS code that runs between mps_arena_collect and the flip!
   - therefore StackScan(0/1) to destroy stack+reg root before full collect: it's the only way to be sure.

 Reproducibility:
   - give Make() a random? switch, acted on by df() = diversity function, to allow bypass of rnd();
   - ZRndStateSet, to set the seed for rnd()

 Output:
   - print_M: switchable Mebibytes or Megabytes (more useful, to be honest);
   - get(): don't report message times, it messes up diffs.

 testlib.c/h:
 Reproducibility:
   - fix rnd_state so a rnd_state getter is possible;
   - testlib.h += rnd_state_t, rnd_state(), rnd_state_set(), rnd_state_set_v2()

 trace.c: traceFindGrey diag: no newline please

Copied from Perforce
 Change: 170093
 ServerID: perforce.ravenbrook.com
2010-03-22 23:00:42 +00:00
Richard Kistruck
968eafea90 Mps br/vmem zcoll.c: (tidy) make "make()" a proper function, not inline in the script-decoding switch statement
Copied from Perforce
 Change: 170087
 ServerID: perforce.ravenbrook.com
2010-03-22 14:59:36 +00:00
Richard Kistruck
b75de3e923 mps br/vmem: simple-chunk-return:
arenavm.c --  on VMFree(), destroy any empty chunks (except the primary).  (VMFree is not the ideal place to do it, but works for proof of concept).
 tract.c -- fix ChunkCache defects:
  - previously, if cache is empty (chunkCache->chunk == NULL) then other fields are *undefined*; but code looks at them anyway (!) without first checking chunkCache->chunk;
  - change it (.chunk.empty.fields) so that, if cache is empty, other fields have defined values: cache-using code may look at them, and they are chosen so that no cache hit will occur.
  --> this fixes crashing defect shown by changelist 170072
  - AVERT(ChunkCache) in the many places it should be checked;
  - use AVERT_CRITICAL in ChunkEncache, because it is called by ChunkOfAddr;

 Also:
 plan.txt -- notes on use of primary chunk.
 config.h -- DIAG also in ci, please [Do not integ to master]
 diag.c -- skip ChainCondemnAuto diag thanks
 zcoll.c -- move printf announcing Destroying arena etc to just before, not just after, we do it.

Copied from Perforce
 Change: 170082
 ServerID: perforce.ravenbrook.com
2010-03-22 13:24:49 +00:00
Richard Kistruck
e82d034c98 Mps br/vmem: prepare for simple-chunk-return:
arenavm.c: VMFree is okay for testing chunk-ret; though just sparePagesPurge() for now;
  diag.c: show what we want for using zcoll to show chunk-ret:
    VM_ix_Create/Destroy
    TraceStart, excpet only briefly for dyn-crit (why=2) and not at all for minor
  locus.c: no newline on "condemn gens" diag please
  tract.c: ChunkDecache is BROKEN; just add AVER to catch this for now
  vmix.c: VM_ix_Create_ok/VM_ix_Destroy (vmw3.c needs similar)
  zcoll.c:
    release after mps_arena_collect!!!
    make, collect, make, collect, to show chunk-ret
    10MB arena means many chunks
None of this is releaseable quality of course.

Copied from Perforce
 Change: 170071
 ServerID: perforce.ravenbrook.com
2010-03-20 13:51:23 +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
cffc8c282b Mps br/padding zcoll.c: (fix build on w3i3*) rename argument/variable "small" as "small_ref", because the name "small" is already in use by the compiler or a windows header file.
Copied from Perforce
 Change: 168761
 ServerID: perforce.ravenbrook.com
2009-09-25 13:55:12 +01: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
2fad7cbe30 Mps br/padding zcoll.c: (remove hack: revert change zcoll.c168574)
Copied from Perforce
 Change: 168575
 ServerID: perforce.ravenbrook.com

GitHub-reference: https://github.com/Ravenbrook/mps/issues/8
2009-09-04 16:53:52 +01:00
Richard Kistruck
783dc5c88d Mps br/padding zcoll.c: (hack to verify that prlr in amctraceend_pageret diag is correctly detecting pages of large segs by a rest-obj ref)
Copied from Perforce
 Change: 168574
 ServerID: perforce.ravenbrook.com
2009-09-04 16:51:11 +01:00
Richard Kistruck
94537515e0 Mps br/padding zcoll: fix round-up bug, ugly logic, and lack of comments in makething() in zcoll.c
Copied from Perforce
 Change: 168560
 ServerID: perforce.ravenbrook.com
2009-09-02 16:53:49 +01:00
Richard Kistruck
cb5290c9ab Mps br/padding zcoll: fix root_table bug (this development branch only)
(introduced in //info.ravenbrook.com/project/mps/branch/2009-03-31/padding/code/zcoll.chttps://github.com/Ravenbrook/mps/issues/4, changelist 168451)
Now that we have two root tables -- Ambig & Exact -- we had better store them in two separate variables!  D'oh.
Bug: single variable "root_table" was used for Ambig, and then re-used for Exact.  On clear up, only Exact was mps_root-destroyed, and leaving Ambig still around at mps_arena_destroy.  In .variety.ci, after ControlFinish, a CHECKL(RingCheck(&arenaGlobals->rootRing)); tries to access the undestoryed root, even though the ControlPool has been unmapped.  This causes seg fault.  GDB works fine to show this, with bt.
Fix: two vars; call mps_root_destroy on each.

Copied from Perforce
 Change: 168533
 ServerID: perforce.ravenbrook.com
2009-08-28 17:36:59 +01:00
Richard Kistruck
09480c095f Mps br/padding: lsp tweaks and diag
zcoll:
  - parameterize BigdropSmall for big-obj size and small-obj ref-type, eg "BigdropSmall(big 28000, small A)"
  - Park, to avoid all those minor collections.  Explanatory comments.
poolamc.c:
  - diags: AMCTraceEnd, AMCTraceEnd_perc (new), AMCTraceEnd_pad_med (new),
  - AMCTraceEnd: c Segs/Pages Whiten/Reclaim, cPagesRet(ained)
  - AMCTraceEnd_perc: percentage of condemned pages retained by ambig refs
  - AMCTraceEnd_pad_med: over-detailed calculations of Gain & Loss for Medium segs,
    requiring knowledge of size of obj1 in each seg.
diag.c:
  - Just show AMCTraceEnd_perc and AMCTraceEnd_pad_med, for zcoll/BigdropSmall's purposes.
Note: poolamc.c now has several episodes of experimental diagnostic in it.
It's time to re-baseline it from an un-hacked version.

Copied from Perforce
 Change: 168512
 ServerID: perforce.ravenbrook.com
2009-08-26 17:34:56 +01:00
Richard Kistruck
1c3940b99a Mps br/padding zcoll.c: change bigsmall() test to bigdropsmallambig() --
creates a big object and drops the ref to it, followed by a small object and keeps an ambig ref to it (to nail the AMCSeg it is in).
Loops 100 times.  This is for testing job001811 changes.

Copied from Perforce
 Change: 168451
 ServerID: perforce.ravenbrook.com
2009-08-18 17:14:19 +01:00
Richard Kistruck
e3d6c443ad Mps br/padding: diagnostics that show large-segment-padding in action.
zcoll.c: BigSmall() command -- creates small, then big, then small object.
poolamc.c: AMCDescribe(): output AMC Seg maps, showing single big object -- a pad -- at end of large-segment.
arena/config/diag: allow output of AMC Seg maps.

Copied from Perforce
 Change: 167763
 ServerID: perforce.ravenbrook.com
2009-04-09 16:01:21 +01:00
Richard Kistruck
ed1f97ac9f Mps br/padding: more diagnostic for how padding survives a collection.
More diag:
  - new traceSetSignalEmergency;
  - new AMCFix_amcSegCreateNailboard and AMCHeaderFix_amcSegCreateNailboard
    (note: the other, unreported, route to becoming boarded is because of a (mutator) buffer);
  - in traces: show SegBase and zone;
   - in TraceStart: show genZoneSets;
   - in amcReclaimNailed: show cbpip and cbpad.
 zcoll.c:
   - sizemethod 1 to Make command: occasionally makes >1MiB objects;
   - declare root_table all MPS_RANK_AMBIG.

Copied from Perforce
 Change: 167726
 ServerID: perforce.ravenbrook.com
2009-04-02 18:29:10 +01:00
Richard Kistruck
d25b1ab8e2 Mps br/timing zcoll.c: oops, need to (re-)initialise myroot array for each script, before declaring it a root (integ from zmess.c).
Copied from Perforce
 Change: 167400
 ServerID: perforce.ravenbrook.com
2009-02-17 16:15:59 +00:00
Richard Kistruck
b7907a053d Mps br/timing zcoll.c: catalog example is broken because of
unmanaged ambiguous interior pointers (when compiled with 
moderate optimization), so comment it out for now.

Copied from Perforce
 Change: 167381
 ServerID: perforce.ravenbrook.com
2009-02-16 16:26:39 +00:00
Richard Kistruck
ce6846ffa8 Mps br/timing zcoll.c: (fix compiler warning for w3i3m9) vc9 warns that sscanf is unsafe; disable this warning for zcoll.c. see also job001934.
Copied from Perforce
 Change: 167379
 ServerID: perforce.ravenbrook.com
2009-02-16 14:57:54 +00:00
Richard Kistruck
c5dc7885d8 Mps br/timing zcoll: show gc timing, by printing mps_message_clock value (currently formatted for centiseconds, ie. clock() on unix)
Copied from Perforce
 Change: 167351
 ServerID: perforce.ravenbrook.com
2009-02-06 22:14:35 +00:00
Richard Kistruck
3477d797d5 Mps br/timing zcoll.c: (comments only) briefly describe script commands
Copied from Perforce
 Change: 167349
 ServerID: perforce.ravenbrook.com
2009-02-06 17:38:34 +00:00
Richard Kistruck
21ee127448 Mps br/timing zcoll catalog client:
1. CatalogCheck(), which verifies the tree.
2. Don't set empty object slots to NULL -- make_dylan_vector() has already set them to a DYLAN_INT(0), which means dylan's fmt_scan ignores them.
3. fflush(stdout) more.

Copied from Perforce
 Change: 167321
 ServerID: perforce.ravenbrook.com
2009-02-04 17:40:54 +00:00
Richard Kistruck
70998dd894 Mps br/timing zcoll.c: start to write the "catalog" example client, and find it already gives some non-obvious results.
Copied from Perforce
 Change: 167227
 ServerID: perforce.ravenbrook.com
2009-01-27 14:14:11 +00:00
Richard Kistruck
6c3156fa91 Mps br/timing zcoll.c: move arenasize and rootspace into script;
showStatsAscii uses ascii-graphics to show collections

Copied from Perforce
 Change: 167211
 ServerID: perforce.ravenbrook.com
2009-01-23 17:31:51 +00:00
Richard Kistruck
ee6d463a74 Mps br/timing zcoll.c: get() reports collection statistics
also (in zcoll's tiny script language) tidy up Make() command.

Copied from Perforce
 Change: 167196
 ServerID: perforce.ravenbrook.com
2009-01-21 16:29:40 +00:00
Richard Kistruck
acceb5c41f Mps br/timing zcoll.c: remove temporary rnd()-test code
Copied from Perforce
 Change: 167193
 ServerID: perforce.ravenbrook.com
2009-01-21 14:25:43 +00:00
Richard Kistruck
4fc1ea19fb Mps br/timing zcoll.c: show count of objects made & kept.
Also (TEMPORARY) investigate poor seeding of rnd().  Aha -- 
it's a full-period generator.  Therefore the current 
randomize is a very poor way to seed it.

Copied from Perforce
 Change: 167152
 ServerID: perforce.ravenbrook.com
2009-01-13 16:30:27 +00:00
Richard Kistruck
a899c472e1 Mps br/timing zcoll.c: (fix unused variable)
Copied from Perforce
 Change: 167018
 ServerID: perforce.ravenbrook.com
2008-12-22 17:33:05 +00:00
Richard Kistruck
262e9ae530 Mps br/timing zcoll.c: (new test) hack in the basics; build it
Copied from Perforce
 Change: 167017
 ServerID: perforce.ravenbrook.com
2008-12-22 17:31:14 +00:00
Richard Kistruck
6bd96ccc41 Mps br/timing zcoll.c: (new test) create by integrating from zmess.c
Copied from Perforce
 Change: 167014
 ServerID: perforce.ravenbrook.com
2008-12-22 16:28:32 +00:00