1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-25 06:50:46 -08:00
Commit graph

106 commits

Author SHA1 Message Date
Richard Brooksby
687c50b762 Implementing top-down (last fit) allocation in zones.
Copied from Perforce
 Change: 184771
 ServerID: perforce.ravenbrook.com
2014-03-13 12:06:28 +00:00
Richard Brooksby
4eec2493b7 Adding a keyword to the arena to disable zoned allocation.
Copied from Perforce
 Change: 184599
 ServerID: perforce.ravenbrook.com
2014-02-28 13:20:06 +00:00
Richard Brooksby
2151d00c7f Catch-up merge from master, mainly to pick up spare-ring merge.
Copied from Perforce
 Change: 184365
 ServerID: perforce.ravenbrook.com
2014-02-18 13:47:49 +00: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
f1d5750639 Adding a cache of free pages per zone to the arena, so that we recycle single pages fast, especially after each reclaim.
Copied from Perforce
 Change: 184324
 ServerID: perforce.ravenbrook.com
2014-02-11 15:23:32 +00:00
Richard Brooksby
2c3c67e73e Deleting a chunk’s address range from the arena’s freecbs when the chunk is destroyed. otherwise, the memory gets allocated and an assertion fires when that memory is not in any chunk.
Copied from Perforce
 Change: 184281
 ServerID: perforce.ravenbrook.com
2014-02-01 00:34:52 +00:00
Richard Brooksby
ae6362a7ce Adding arena extension back to the arena allocation policy.
Copied from Perforce
 Change: 184280
 ServerID: perforce.ravenbrook.com
2014-01-31 22:47:29 +00:00
Richard Brooksby
66a05e1f05 Changes from review comments made in <https://info.ravenbrook.com/mail/2014/01/31/13-40-25/0/>.
ArenaSpareCommitExceeded changed to ArenaPurgeSpare so that the arena can properly reduce the amount of spare memory when setting the commit limit etc.
pagesMarkAllocated promptly unmaps page table pages in its error path.
Miscellaneous clarifications and extra checking.

Copied from Perforce
 Change: 184267
 ServerID: perforce.ravenbrook.com
2014-01-31 15:21:21 +00:00
Richard Brooksby
7a73e98638 Refactored implementation of preferenced allocation policy from vm arena to general purpose arena.
Eliminating SegPrefExpress in most places, especially where there wasn’t really any preference.
Eliminating special case knowledge about garbage collection from the arena.

Copied from Perforce
 Change: 184279
 ServerID: perforce.ravenbrook.com
2014-01-30 18:08:10 +00:00
Richard Brooksby
e50418ce54 Tidying up the bootstrap so that every chunk gets added to the arena’s freecbs.
Copied from Perforce
 Change: 184238
 ServerID: perforce.ravenbrook.com
2014-01-30 15:44:46 +00:00
Richard Brooksby
e27cf4b361 Merging from branch //info.ravenbrook.com/project/mps/branch/2014-01-29/mps-chain-zones/... in order to eliminate generational considerations from the vm arena's placement policy.
Copied from Perforce
 Change: 184233
 ServerID: perforce.ravenbrook.com
2014-01-30 15:29:46 +00:00
Richard Brooksby
8e4e0f066e Eliminating dodgy use of *segprefdefault() which could lead to implicit calls to memcpy.
Copied from Perforce
 Change: 184217
 ServerID: perforce.ravenbrook.com
2014-01-29 15:13:22 +00:00
Richard Brooksby
f719851f50 Since the dynamic generation is shared between chains (for some reason) using its unified zone set, rather than keeping a special zone set per chain, which would’ve used up more zones.
Using arena->topGen->mortality for the dynamic generation’s mortality, rather than a global variable.

Copied from Perforce
 Change: 184216
 ServerID: perforce.ravenbrook.com
2014-01-29 13:49:42 +00:00
Richard Brooksby
115af8c270 Catch-up merge from master to pick up improvements to segment iteration.
Copied from Perforce
 Change: 184122
 ServerID: perforce.ravenbrook.com
2014-01-25 17:01:57 +00:00
Richard Brooksby
56d48bbd1d iterating over segments using the pool and segment rings, rather than scanning the tract table, which may be full of irrelevant tracts, especially when non-gc pools are large. see <https://info.ravenbrook.com/mail/2014/01/25/12-16-09/0/>.
Copied from Perforce
 Change: 184120
 ServerID: perforce.ravenbrook.com
2014-01-25 15:33:10 +00:00
Richard Brooksby
cd4a12047f Non-working preferential allocation within a block of the cbs.
This doesn't work because the splay tree can't cope with homing in on a node (that appears big enough) then being told that it isn't suitable (because it doesn't have space in the right zone).  The splay tree summary condition must be precise, as stated in the design.  The splay tree isn't suited to this kind of search.

Copied from Perforce
 Change: 184073
 ServerID: perforce.ravenbrook.com
2014-01-21 16:29:30 +00:00
Richard Brooksby
be42effdb3 First draft of freeing into the arena's freecbs.
Copied from Perforce
 Change: 184052
 ServerID: perforce.ravenbrook.com
2014-01-18 18:24:07 +00:00
Richard Brooksby
32d8c32b6d Making the reservoir use arenaalloc and arenafree like a good citizen, rather than bypassing them, so that it correctly gets memory from the freecbs.
Copied from Perforce
 Change: 184051
 ServerID: perforce.ravenbrook.com
2014-01-18 17:45:56 +00:00
Gareth Rees
5ddfd0dbcd Remove unused (and unusable) macros arenarootring() and arenatracering().
Copied from Perforce
 Change: 183947
 ServerID: perforce.ravenbrook.com
2014-01-12 11:19:35 +00:00
Gareth Rees
ea9df0b2b7 Merge custom cet mainline into the master sources. this includes fixes for job003519 (clock values in text telemetry logs on windows have top 32 bits zero), job003536 (cet office can't replicate 100k snowmen in reasonable time), job003651 (stack overflows are not reliably handled).
Copied from Perforce
 Change: 183926
 ServerID: perforce.ravenbrook.com
2014-01-10 14:16:08 +00:00
Gareth Rees
e88bcc5184 Document the intention behind mps_ld_isstale rather than the implementation: it captures the intention of testing whether a particular dependency is stale (even though the implementation in fact tests whether any dependency is stale). add new function mps_ls_isstale_any for expressing the intention of testing whether any dependencey is stale. the two functions have the same implementation at present, but the separation gives us the freedom to return a more precise result from mps_ld_isstale in future.
Copied from Perforce
 Change: 182816
 ServerID: perforce.ravenbrook.com
2013-06-20 16:25:08 +01:00
Richard Brooksby
56645cdc0c Merging branch/2013-05-17/emergency with major rework of mvt, mvff, and cbs.
Some parts of this are still ragged, and would not normally pass review, but this is a massive improvement to the existing code.

Copied from Perforce
 Change: 182614
 ServerID: perforce.ravenbrook.com
2013-06-08 10:57:57 +01:00
Gareth Rees
509ebcb215 Check that all addresses in the freed range belong to the pool, not just the base of the range.
Copied from Perforce
 Change: 182602
 ServerID: perforce.ravenbrook.com
2013-06-07 13:20:20 +01:00
Richard Brooksby
982dc78f06 Merging branch/2013-06-05/diag to eliminate the "diag" system. hurrah!
Copied from Perforce
 Change: 182575
 ServerID: perforce.ravenbrook.com
2013-06-06 14:56:47 +01:00
Gareth Rees
1c4ff669ac Remove diag facility.
Copied from Perforce
 Change: 182553
 ServerID: perforce.ravenbrook.com
2013-06-05 18:35:40 +01:00
Gareth Rees
934ae05ca3 Rename the enumeration cbsfinddelete to finddelete in anticipation of it being shared between cbs and new freelist module.
Since ABQDisposition enumeration only has two values, it's better to use Bool.

Copied from Perforce
 Change: 182347
 ServerID: perforce.ravenbrook.com
2013-05-31 00:09:33 +01:00
Gareth Rees
aaf6e8b13b New public function mps_fmt_create_k creates an object format using the keyword argument interface.
Deprecate the format variant structures (mps_fmt_A_s, mps_fmt_B_s, mps_fmt_auto_header_s, mps_fmt_fixed_s) and the old interface (mps_fmt_create_A, mps_fmt_create_B, mps_fmt_create_auto_header, mps_fmt_create_fixed).

Copied from Perforce
 Change: 182277
 ServerID: perforce.ravenbrook.com
2013-05-28 16:10:08 +01:00
Richard Brooksby
818a65f36f Replacing duplicate *trivvarargs methods with a single implementation in args.c.
Copied from Perforce
 Change: 181851
 ServerID: perforce.ravenbrook.com
2013-05-16 13:10:01 +01:00
Richard Brooksby
bb02f55b62 Making clear the size of the array of args passed to varargs conversion methods.
Copied from Perforce
 Change: 181845
 ServerID: perforce.ravenbrook.com
2013-05-16 03:12:11 +01:00
Richard Brooksby
93fee75c50 Eliminating unnecessary use of varargs in segment split and merge functions.
Copied from Perforce
 Change: 181842
 ServerID: perforce.ravenbrook.com
2013-05-16 03:02:20 +01:00
Richard Brooksby
688b5bf73d Converting varags on buffer and ap creation into keyword argument lists.
Copied from Perforce
 Change: 181680
 ServerID: perforce.ravenbrook.com
2013-05-09 18:25:53 +01:00
Richard Brooksby
af44d1241f Replacing varargs passed to seginit with keyword argument list.
Copied from Perforce
 Change: 181679
 ServerID: perforce.ravenbrook.com
2013-05-09 17:34:01 +01:00
Richard Brooksby
13095f52bf Moving keyword argument declarations to their own header, since they're largely separable from the mps.
Copied from Perforce
 Change: 181646
 ServerID: perforce.ravenbrook.com
2013-05-08 23:09:35 +01:00
Richard Brooksby
71b7e4f70a Pushing varargs decoding into a pool class method. much simpler.
Copied from Perforce
 Change: 181642
 ServerID: perforce.ravenbrook.com
2013-05-08 22:43:51 +01:00
Richard Brooksby
c781e594a8 Adding keyword argument checking for format and chain.
Copied from Perforce
 Change: 181637
 ServerID: perforce.ravenbrook.com
2013-05-08 16:29:12 +01:00
Richard Brooksby
07f446a450 Converting pools to use keyword arguments, mostly, and so far inconsistently, but at least it compiles.
Copied from Perforce
 Change: 181635
 ServerID: perforce.ravenbrook.com
2013-05-08 16:21:12 +01:00
Richard Brooksby
c0a8608bf7 Basically working keyword arguments, though vmparam is unsatisfactory.
Copied from Perforce
 Change: 181545
 ServerID: perforce.ravenbrook.com
2013-05-03 17:20:35 +01:00
Richard Brooksby
1bc62b27ef First draft of keyword arguments. mainly checking in in order to try working with git fusion on this branch.
Copied from Perforce
 Change: 181538
 ServerID: perforce.ravenbrook.com
2013-05-02 17:55:07 +01:00
Richard Brooksby
513aabb046 Further elimination of type puns that violate the strict aliasing rule. this change eliminates puns on the format methods.
Copied from Perforce
 Change: 179452
 ServerID: perforce.ravenbrook.com
2012-09-12 19:45:27 +01:00
Richard Brooksby
9248316fb6 Further reduction of interface puns that violate the strict aliasing rule, this time in thread function types and the corresponding threadstruct.
Copied from Perforce
 Change: 179451
 ServerID: perforce.ravenbrook.com
2012-09-12 19:32:37 +01:00
Richard Brooksby
75837d8376 Fixing type puns around arenapeek and arenapoke by allowing them to take a ref * to get a ref, rather than an addr.
Copied from Perforce
 Change: 179382
 ServerID: perforce.ravenbrook.com
2012-09-10 10:33:22 +01:00
Richard Brooksby
5a604a2f51 Fixing bugs introduced by type puns passed through scanning methods, discovered by offsetting mps_ss_s from the beginning of scanstatestruct.
Adding a pseudo-target "find-puns" which, on FreeBSD mostly, prints useful warnings about strict aliasing rule violations.
Fixing more strict aliasing rule violations found by the above.

Copied from Perforce
 Change: 179358
 ServerID: perforce.ravenbrook.com
2012-09-07 23:48:14 +01: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
858e4ac0ac Partial merge of branch/2012-07-23/cet-transform, excluding cet-specific parts.
Copied from Perforce
 Change: 179309
 ServerID: perforce.ravenbrook.com
2012-09-06 17:17:18 +01:00
Richard Brooksby
27c6706791 Merging branch/2012-08-21/diagnostic-telemetry.
Copied from Perforce
 Change: 179289
 ServerID: perforce.ravenbrook.com
2012-09-05 23:45:31 +01:00
David Lovemore
886e96ba8e Fix weak band assert. we now trace weak segments as weak on a fault if we are in the weak band.
Copied from Perforce
 Change: 179210
 ServerID: perforce.ravenbrook.com
2012-09-03 17:05:51 +01:00
Richard Brooksby
c4c3595fb8 Now there is no measurable performance penalty for events, they're on in all varieties (except we).
Copied from Perforce
 Change: 179137
 ServerID: perforce.ravenbrook.com
2012-08-31 16:42:17 +01:00
David Lovemore
ed8cd9432d In tracescanareatagged use the alignments of pools in the condemned set to determine mask.
Copied from Perforce
 Change: 179117
 ServerID: perforce.ravenbrook.com
2012-08-30 13:48:41 +01:00
Richard Brooksby
15de8407ce Moving linux-specific parts out of thli.c in order to unify with freebsd.
Copied from Perforce
 Change: 178925
 ServerID: perforce.ravenbrook.com
2012-08-14 17:05:11 +01:00
Richard Brooksby
3893cede56 Catching up with masters, to bring in work from branch/2012-03-27/longest.
Copied from Perforce
 Change: 178073
 ServerID: perforce.ravenbrook.com
2012-05-01 16:29:25 +01:00