Gareth Rees
52d6325133
New pool method poolsegpoolgen gets the pool generation for a segment. (this allows the segment whiten and reclaim methods not to need to know the pool class.)
...
Copied from Perforce
Change: 193084
ServerID: perforce.ravenbrook.com
2017-03-31 13:28:25 +01:00
Gareth Rees
2a24ad79df
Since we know that a segment belongs to a pool with a format at the point where we call segwalk, it makes sense to pass the format.
...
Copied from Perforce
Change: 193079
ServerID: perforce.ravenbrook.com
2017-03-31 09:15:41 +01:00
Gareth Rees
e615adda88
Avoid "result of 32-bit shift implicitly converted to 64 bits" warning from visual c.
...
Check AWL pool generation.
Update design.
Copied from Perforce
Change: 193076
ServerID: perforce.ravenbrook.com
2017-03-31 09:03:38 +01:00
Gareth Rees
a697ef913f
Move alignshift to pool structure allows us to eliminate duplicate code between awl and lo.
...
Copied from Perforce
Change: 193071
ServerID: perforce.ravenbrook.com
2017-03-31 08:41:14 +01:00
Gareth Rees
49ba7045fc
Only walk segments belonging to pools with an object format.
...
Copied from Perforce
Change: 193066
ServerID: perforce.ravenbrook.com
2017-03-31 08:05:59 +01:00
Gareth Rees
2962cdff8b
Check that arena, buffer, land classes override sets of related methods.
...
Copied from Perforce
Change: 193060
ServerID: perforce.ravenbrook.com
2017-03-30 20:43:43 +01:00
Gareth Rees
17c1449096
Check that segment classes override sets of related methods.
...
Add missing finish functions amcSegFinish, mrgLinkSegFinish, mrgRefSegFinish, sncSegFinish.
Check all class constructor results.
Copied from Perforce
Change: 193055
ServerID: perforce.ravenbrook.com
2017-03-30 11:37:41 +01:00
Gareth Rees
fd9cb83ec5
Avoid "format may be used uninitialized" warning.
...
Copied from Perforce
Change: 193050
ServerID: perforce.ravenbrook.com
2017-03-30 10:42:40 +01:00
Gareth Rees
79c2263d53
No need for poolclassmixinscan and abstractscanpool.
...
Copied from Perforce
Change: 193045
ServerID: perforce.ravenbrook.com
2017-03-30 10:23:15 +01:00
Gareth Rees
d4a68602ff
Changing segnowalk to segtrivwalk avoids the need for attrfmt (now we can walk all segments).
...
Copied from Perforce
Change: 193044
ServerID: perforce.ravenbrook.com
2017-03-30 10:18:22 +01:00
Gareth Rees
2ffd832103
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
8ab47f84d1
Remove unused variable pool.
...
Copied from Perforce
Change: 193034
ServerID: perforce.ravenbrook.com
2017-03-30 09:19:54 +01:00
Gareth Rees
a400239f7e
Move walk method from pool class to segment class.
...
Copied from Perforce
Change: 193028
ServerID: perforce.ravenbrook.com
2017-03-30 08:54:35 +01:00
Gareth Rees
b7a490ae32
Move fix and fixemergency methods from pool class to segment class.
...
Copied from Perforce
Change: 193023
ServerID: perforce.ravenbrook.com
2017-03-30 08:09:14 +01:00
Gareth Rees
9734df3505
Remove unused fixclosure field from trace and scanstate structures.
...
Copied from Perforce
Change: 193018
ServerID: perforce.ravenbrook.com
2017-03-30 07:14:10 +01:00
Gareth Rees
00a4ade456
Move scan method from pool class to segment class.
...
Copied from Perforce
Change: 193012
ServerID: perforce.ravenbrook.com
2017-03-29 19:17:17 +01:00
Gareth Rees
db5db0a9f3
Move reclaim method from pool class to segment class.
...
Copied from Perforce
Change: 193007
ServerID: perforce.ravenbrook.com
2017-03-29 17:13:45 +01:00
Gareth Rees
07adf64ebb
Move whiten method from pool class to segment class.
...
Copied from Perforce
Change: 193002
ServerID: perforce.ravenbrook.com
2017-03-29 16:22:14 +01:00
Gareth Rees
47a1715c2d
Move greyen method from pool class to segment class.
...
Copied from Perforce
Change: 192997
ServerID: perforce.ravenbrook.com
2017-03-29 15:58:32 +01:00
Gareth Rees
1dc5ac742a
Move the blacken method from the pool class to the segment class.
...
Copied from Perforce
Change: 192994
ServerID: perforce.ravenbrook.com
2017-03-29 15:32:17 +01:00
Gareth Rees
7c159fd2f8
Remove undocumented plinth function mps_lib_assert_fail_expr and rewrite assertp macro to call documented plinth function mps_lib_assert_fail instead.
...
Copied from Perforce
Change: 192941
ServerID: perforce.ravenbrook.com
2017-03-04 11:17:11 +00:00
Gareth Rees
f6356fc2ef
Remove used epvmdefaultsubsequentsegsize.
...
Copied from Perforce
Change: 192938
ServerID: perforce.ravenbrook.com
2017-03-04 11:02:31 +00:00
Gareth Rees
38dae4d616
Documentation improvements.
...
Copied from Perforce
Change: 192905
ServerID: perforce.ravenbrook.com
2017-02-18 09:38:15 +00:00
Gareth Rees
1c5e8269a8
Fix typos.
...
Copied from Perforce
Change: 192890
ServerID: perforce.ravenbrook.com
2017-02-11 11:30:15 +00:00
Gareth Rees
cb23106273
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
148f538510
Merge design.mps.class-interface into design.mps.pool (as suggested by pekka p. pirinen on 1999-07-20).
...
Bring pool class method descriptions up to date.
Document bufferClass, bufferFill, bufferEmpty, totalSize, freeSize methods.
Document generic instance methods at design.mps.protocol.method.
Copied from Perforce
Change: 192642
ServerID: perforce.ravenbrook.com
2016-10-19 15:34:35 +01:00
Gareth Rees
79d301f528
Cherry-pick change 192595 from custom/cet/main, removing mps_addr_object. this function failed to solve the problem of decoding the stack on 64-bit windows, because the stack may need to be decoded after an mps assertion failure, in which case the arena lock is held and mps_addr_object cannot be called. we eventually solved the problem in a different way (using mps_arena_postmortem) and mps_addr_object is no longer used.
...
Copied from Perforce
Change: 192637
ServerID: perforce.ravenbrook.com
2016-10-19 14:13:38 +01:00
Gareth Rees
587a3efb20
Remove unused pool class methods tracebegin and traceend.
...
Remove unused event AMCTraceEnd.
The fixEmergency method must have the same type as the fix method because of how they are used.
Copied from Perforce
Change: 192636
ServerID: perforce.ravenbrook.com
2016-10-19 14:07:20 +01:00
Gareth Rees
7f18fa9802
Use nextmethod to call the superclass init method, instead of calling poolabsinit directly. regularize the error handling.
...
Copied from Perforce
Change: 192631
ServerID: perforce.ravenbrook.com
2016-10-19 11:34:04 +01:00
Gareth Rees
4a5bfd071a
Bring design.mps.message up to date and move it from old to current.
...
Copied from Perforce
Change: 192625
ServerID: perforce.ravenbrook.com
2016-10-18 22:35:13 +01:00
Gareth Rees
1b6774b850
Regularize the signature comments, for the benefit of design.mps.sig.test.uniq.
...
Copied from Perforce
Change: 192620
ServerID: perforce.ravenbrook.com
2016-10-18 18:30:50 +01:00
Gareth Rees
c5869484e5
Remove design documents for unsupported operating systems sunos, solaris and osf/1 (protsu, sso1al, vmo1, and vmso).
...
Update thread-safety and version-library design documents and move them from old to current.
Copied from Perforce
Change: 192617
ServerID: perforce.ravenbrook.com
2016-10-18 18:30:09 +01:00
Gareth Rees
c6a0bd0f34
Remove unused functions landcreate and landdestroy.
...
Copied from Perforce
Change: 192603
ServerID: perforce.ravenbrook.com
2016-10-14 22:30:11 +01:00
Gareth Rees
0c2db358de
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
2b4ae16b87
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
bcd592b96b
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
d38c74a0b2
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
bcfbaaf3e4
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
d82fc68bde
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
1d65260d5b
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
6903784501
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
626f880a7e
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
fe1f07321b
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
d31012f13a
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
91551170b1
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
5c31ca3cab
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
c35e544d73
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
5a580660f6
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
8b002dc4d5
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
3dbe56a8b7
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