Helmut Eller
7dfa9e76eb
* mps/code/global.c (GlobalsDescribe): Include tracedTime.
2025-11-26 10:41:34 +01:00
Eli Zaretskii
74492583e5
Support the MinGW build of MPS and tests, part 1
...
* mps/code/w3i6gc.gmk:
* mps/code/w3i3gc.gmk:
* mps/code/mingw.gmk: New files, for the MinGW build.
* mps/code/ss.c (StackHot) [__MINGW32__ && __GNUC__ >= 12]: Ignore
dangling-pointer warnings.
* mps/code/global.c (ArenaFinalize): Avoid compiler warnings.
* mps/code/thw3.c (ThreadScan): Avoid compilation errors due to
prototype mismatch.
* mps/code/testlib.h (alloca): Don't redefine for MinGW.
(setenv): Don't redefine for mingw.org's MinGW.
(ulongest_t, longest_t): Separate definitions for MinGW64.
* mps/code/testlib.c (sizelog2) [__MINGW32__]: Fix comparison.
(rnd_align): Avoid name clashes with 'min' and 'max'.
* mps/code/spw3i3.c (StackProbe) [__GNUC__]: Implementation for
MinGW.
* mps/code/protw3.c: Avoid compiler warning.
* mps/code/mpstd.h: Define MinGW (_X86_) and MinGW64 (__X86_64)
configurations.
* mps/code/mpsiw3.c (mps_SEH_filter, mps_SEH_handler): Add
prototypes.
* mps/code/mps.c [MPS_PF_W3I3GC]: Define 32-bit MinGW stuff.
[MPS_PF_W3I6GC]: Define 64-bit MinGW64 stuff.
* mps/code/lockw3.c (RTL_RUN_ONCE, PRTL_RUN_ONCE_INIT_FN)
(RTL_RUN_ONCE_INIT, INIT_ONCE_STATIC_INIT, RTL_RUN_ONCE INIT_ONCE)
(PRTL_RUN_ONCE PINIT_ONCE, PINIT_ONCE_FN, InitOnceExecuteOnce):
Define for mingw.org's MinGW.
* mps/code/comm.gmk (EVENT_TARGETS, EXTRA_TARGETS, TEST_TARGETS)
(UNBUILDABLE_TARGETS): Add $(EXEEXT) to program names.
(TESTTHR): Define correct test for MS-Windows.
Don't fail the build if the *.d dependency files don't exist.
2025-09-24 13:02:30 +03:00
Helmut Eller
b38d8789fe
* mps/code/global.c (ArenaStep): Fix calculation of available time.
2025-09-13 13:23:52 +02:00
Gareth Rees
76bff163f5
Ensure that the mps builds with clang 10.
...
Clang 10 turns on -Wimplicit-int-float-conversion, and on 64-bit
platforms this issues a warning that implicit conversions to double
from Size and unsigned long "may lose precision".
This commit adds casts to (double) for all such conversions. The loss
of precision is either impossible in practice (because a double can
represent all integers up to 2**53, which is about 9 petabytes, well
beyond the addressing capabilities for current CPUs), or else
acceptable, because we are accumulating an approximate quantity like
"collection work" or "fill size" (that has to cope with loss of
precision due in any case), or computing a threshold like the spare
commit limit where it is acceptable for it to be somewhat approximate.
2021-01-10 10:42:05 +00:00
Gareth Rees
93438da02d
Remove mps_arena_expose, deprecated since release 1.111.0
...
Also remove mps_arena_unsafe_expose_remember_protection and
mps_arena_unsafe_expose_restore_protection.
2020-09-24 09:35:47 +01:00
Gareth Rees
5559f36540
Fix indentation of second clause of license.
2020-08-30 10:13:06 +01:00
Gareth Rees
5165d75267
Use https: instead of http: when linking to the ravenbrook web site.
2020-08-30 10:13:03 +01:00
Peter Jackson
1d00afac81
Publish licence updates in code directory.
...
Publish minor changes to readme and configure files in main directory.
Main directory and code directory licence texts are now fully updated.
Copied from Perforce
Change: 196994
2020-06-11 17:05:40 +01:00
Gareth Rees
0b324c158b
Use tags with dots; regularize design references from code.
...
Copied from Perforce
Change: 195761
2018-11-29 17:12:29 +00:00
Gareth Rees
60bf7320e2
Document the event parameters.
...
Split event ArenaAccess into ArenaAccessBegin and ArenaAccessEnd to avoid the need for the count field.
New events SegReclaim and SegScan.
Delete some redundant events: AMCFinish (PoolFinish), AMCFix, AMCFixForward, AMCFixInPlace (TraceFix), AMCGenCreate (GenInit), AMCGenDestroy (GenFinish), AMCInit (PoolInitAMC), AMCReclaim (SegReclaim), AMCScanBegin, AMCScanEnd (SegScan), ArenaWriteFaults (ArenaAccessBegin), PoolInitMV, TraceScanSeg (SegScan).
Add result code field to events ArenaAllocFail, CommitLimitSet, SegAllocFail.
Remove arena field from events PoolInitAMS, PoolInitMFS, PoolInitMVFF (already appeared in generic PoolInit event).
Copied from Perforce
Change: 195247
2018-10-14 14:04:40 +01:00
Gareth Rees
06b87869fd
Catch-up merge from master sources at changelevel 194022 to branch/2018-06-20/monitor.
...
Copied from Perforce
Change: 195071
2018-09-15 21:29:28 +01:00
Gareth Rees
0747ce1ee7
Describe values uniformly as bytes (not kilobytes).
...
Copied from Perforce
Change: 194982
2018-08-14 09:44:15 +01:00
Gareth Rees
0fcb0ecf90
Introduce a count of the "system" pools (that is, those remaining when arenadestroy is called), so that arena classes can add new ones.
...
Copied from Perforce
Change: 194812
2018-07-31 13:35:22 +01:00
Gareth Rees
652ce0dae8
Fix indentation in globalsdescribe.
...
Copied from Perforce
Change: 194708
2018-07-23 10:38:47 +01:00
Gareth Rees
8fb0e4dcc9
Label the top generation and the generations in the arena's default generation chain, for the benefit of the telemetry monitor.
...
Copied from Perforce
Change: 194536
2018-07-09 16:11:17 +01:00
Gareth Rees
353768d313
Fix issues identified in review by gdr < https://info.ravenbrook.com/mail/2018/07/07/15-54-49/0/ >
...
Copied from Perforce
Change: 194494
2018-07-07 19:23:58 +01:00
Gareth Rees
e5b175a961
Catch-up merge from master sources at changelevel 194484 to branch/2014-10-26/sc.
...
Copied from Perforce
Change: 194487
2018-07-06 21:42:35 +01:00
Gareth Rees
3366ef1bc2
Catch-up merge from master sources at changelevel 194449 to branch/2018-06-18/mrgseg.
...
Copied from Perforce
Change: 194452
2018-07-05 16:22:24 +01:00
Gareth Rees
1c80c8f387
Catch-up merge from master sources at changelevel 194314 to branch/2016-03-01/mvff-control.
...
Copied from Perforce
Change: 194323
2018-06-29 14:28:33 +01:00
Gareth Rees
409bc1910b
Catch-up merge from the master sources at changelevel 194194 to branch/2017-03-04/seg-methods.
...
Copied from Perforce
Change: 194267
2018-06-28 13:52:36 +01:00
Gareth Rees
e323bd2e15
New events arenapollbegin and arenapollend.
...
Measure fraction of CPU time in polling.
Represent the units of each TimeSeries.
Draw graphs for up to two different units using Axes.twinx.
Copied from Perforce
Change: 194204
2018-06-26 16:21:48 +01:00
Gareth Rees
e93949aeef
Refactor arenapeekseg so that it maintains the mps invariants by scanning the segment if necessary. arenaread is now a thin wrapper around arenapeekseg. new function arenawrite is now the corresponding wrapper around arenapokeseg.
...
MRG reference segments inherit from GCSeg (not MutatorSeg) and so don't have hardware barriers. Instead, the code implements software barriers by always using ArenaRead and ArenaWrite.
Copied from Perforce
Change: 193990
2018-06-19 16:25:52 +01:00
Gareth Rees
687f5e0294
Fix issues identified in review by apt.
...
Copied from Perforce
Change: 193982
2018-06-19 14:51:56 +01:00
Gareth Rees
5324b1a2dd
Catch-up merge from master sources at change 193831 to branch/2017-03-04/seg-methods.
...
Copied from Perforce
Change: 193836
2018-06-15 13:46:23 +01:00
Gareth Rees
0662e96899
Refactor atfork code to improve separation of concerns.
...
Copied from Perforce
Change: 193806
2018-06-15 10:58:33 +01:00
Gareth Rees
a865019b13
Update design history. restore accidentally removed check.
...
Copied from Perforce
Change: 193787
2018-06-14 17:55:03 +01:00
Gareth Rees
61e24c399a
Take locks before fork(), release them in the parent and reinitialize them in the child.
...
Add forktest target to the Xcode project.
Write design for fork safety and cross-reference from the code.
Update release notes.
Copied from Perforce
Change: 193760
2018-06-14 16:25:08 +01:00
Gareth Rees
2ccdd80953
Extend forktest so that it does allocation before the fork and collection afterwards; this ensures that we hit the read barrier and thus exercise the exception handling.
...
After forking in the child, re-create exception port and exception thread, and re-register the (only) thread with that port.
Copied from Perforce
Change: 193755
2018-06-14 12:54:35 +01:00
Gareth Rees
47fc093662
Add fork test case (fails on os x if pthread_atfork is not called).
...
pthread_atfork handlers on OS X: in the child, update the mach port for the forking thread and move all other threads to the dead ring.
Copied from Perforce
Change: 193746
2018-06-13 17:09:07 +01:00
Gareth Rees
4c9f14729f
Move access method from pool class to segment class.
...
Copied from Perforce
Change: 193039
ServerID: perforce.ravenbrook.com
2017-03-30 09:55:37 +01:00
Gareth Rees
3389ec396f
Add "cold end" and "hot end" to the glossary index.
...
Copied from Perforce
Change: 192660
ServerID: perforce.ravenbrook.com
2016-10-20 13:52:30 +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
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
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
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
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
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
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
0297b380b9
Clear the emergency before removing the trace from busytraces, to avoid violating <code/global.c#emergency.invariant>.
...
Copied from Perforce
Change: 191774
ServerID: perforce.ravenbrook.com
2016-05-02 13:06:07 +01:00
Richard Brooksby
546e082125
Removing bogus arenatrivdescribe and turning arenadescribe the right way in.
...
Copied from Perforce
Change: 191480
ServerID: perforce.ravenbrook.com
2016-04-21 15:27:41 +01:00
Richard Brooksby
02a8064a07
Moving location dependency history into its own structure to reduce arenastruct bloat.
...
Copied from Perforce
Change: 191417
ServerID: perforce.ravenbrook.com
2016-04-21 09:05:34 +01:00
Gareth Rees
0d0eb93f01
Merge branch/2016-04-19/job004011.
...
Copied from Perforce
Change: 191374
ServerID: perforce.ravenbrook.com
2016-04-20 16:00:43 +01:00
Gareth Rees
c1aeb1f67a
Ensure that at most one collection of the world can be started in a call to arenapoll. this avoids a loop if the live set is large enough to provoke the "dynamic criterion".
...
Copied from Perforce
Change: 191274
ServerID: perforce.ravenbrook.com
2016-04-19 18:17:09 +01:00
Gareth Rees
aabe4992eb
Compile out statistic declarations in non-statistical varieties (at the cost of some syntax checking).
...
Add some missing STATISTIC guards where statistics are used.
Add design documentation.
Avoid unnecessary distinction between STATISTIC and STATISTIC_STAT (both result in statements).
Copied from Perforce
Change: 191178
ServerID: perforce.ravenbrook.com
2016-04-16 12:07:10 +01:00
Richard Brooksby
5c98fb1b92
Catch-up merge from master sources to branch/2016-03-01/mvff-control.
...
Copied from Perforce
Change: 190549
ServerID: perforce.ravenbrook.com
2016-03-30 16:17:37 +01:00
Richard Brooksby
f501f73eb9
Catch-up merge from master sources to branch/2014-10-26/sc.
...
Copied from Perforce
Change: 190483
ServerID: perforce.ravenbrook.com
2016-03-27 21:28:39 +01:00
Richard Brooksby
247396690d
Catch-up merge from master sources to branch/2016-03-11/shield-coalesce.
...
Copied from Perforce
Change: 190373
ServerID: perforce.ravenbrook.com
2016-03-24 11:08:24 +00:00
Richard Brooksby
428e8bae92
Fixing build errors on windows (w3i6mv).
...
tagtest was missing from makefiles.
Implicit conversion warning from Clock to double.
Copied from Perforce
Change: 190372
ServerID: perforce.ravenbrook.com
2016-03-24 11:04:58 +00:00
Richard Brooksby
a03174304d
Tearing down shield correctly.
...
Copied from Perforce
Change: 190225
ServerID: perforce.ravenbrook.com
2016-03-20 01:01:54 +00:00