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

2473 commits

Author SHA1 Message Date
Gareth Rees
08beb998fd Don't represent capacities internally in kilobytes, convert once on initialization.
In the monitor, start average mortality time series with the initial predicted value.

Copied from Perforce
 Change: 194565
2018-07-10 13:10:00 +01:00
Gareth Rees
13f5b95ddb Add time series for fraction of generations condemned in chain.
Copied from Perforce
 Change: 194541
2018-07-09 16:56:16 +01:00
Gareth Rees
9fe19e67fb Add time series for per-trace mortality.
Copied from Perforce
 Change: 194538
2018-07-09 16:29:37 +01:00
Gareth Rees
e67c9dd45d 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
cee7c490ac Add time series for mortality in a generation, and size of segments referencing each generation.
Copied from Perforce
 Change: 194348
2018-07-02 15:40:42 +01:00
Gareth Rees
5acfa30f9e Add mpseventpy as a target to the xcode project.
Copied from Perforce
 Change: 194296
2018-06-28 17:20:59 +01:00
Gareth Rees
f7e33956e9 Try to avoid "eventpy.c:164:3: error: comparison of unsigned expression < 0 is always false" from gcc 4.8.4 (the version on the travis buildbots). see https://travis-ci.org/ravenbrook/mps/jobs/397813493
Copied from Perforce
 Change: 194282
2018-06-28 16:07:56 +01:00
Gareth Rees
9f031d9c5c Not safe to call segsetsummary from gcsegfinish.
Copied from Perforce
 Change: 194277
2018-06-28 14:34:58 +01:00
Gareth Rees
7a10a50136 New event segsetsummary allows the monitor to track the sizes of segments referencing particular zones.
Copied from Perforce
 Change: 194259
2018-06-28 13:14:12 +01:00
Gareth Rees
f134e5afb9 Fix alignment of event structures.
Copied from Perforce
 Change: 194220
2018-06-27 10:11:50 +01:00
Gareth Rees
2c494e9878 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
c339f63320 Endianness support allows you to (theoretically) run the monitor on a different platform.
Copied from Perforce
 Change: 194118
2018-06-23 16:01:26 +01:00
Gareth Rees
49b2c3606f Documentation for event header fields.
Copied from Perforce
 Change: 194113
2018-06-23 15:51:26 +01:00
Gareth Rees
aea2ed3811 Handle deletion of arenas and pools (they often get recreated at the same addresses so this is vital).
Sort the events in batches so that, for example, we get PoolFinish before ArenaDestroy.
Emit ArenaDestroy event after finishing all its pools.
Add arena parameter to PoolFinish event.
Restore top-down logging of events (no need to order them the telemetry output, since the monitor sorts them).
Add comments for all the events used by the monitor.
Include the arena's name in the pool's name when there are multiple arenas.

Copied from Perforce
 Change: 194112
2018-06-23 15:37:11 +01:00
Gareth Rees
bb5034594d Event alignment doesn't need to be mps_pf_align (that's wasteful on windows).
Copied from Perforce
 Change: 194091
2018-06-22 14:09:56 +01:00
Gareth Rees
c3a7104eff Label the time series in the monitor.
In telemetry output, distinguish between labelling of (client) addresses and (MPS-internal) pointers, to avoid transgressing the distinction.
Add arena grain size, class, and serial number to ArenaCreate* events.
Add pool class and serial number to PoolInit event.

Copied from Perforce
 Change: 194086
2018-06-22 11:05:46 +01:00
Gareth Rees
6ebfdb2a10 Avoid "dereferencing type-punned pointer will break strict-aliasing rules" from gcc 4.8.
Copied from Perforce
 Change: 194061
2018-06-21 17:30:51 +01:00
Gareth Rees
14ce806a0c Emit events in time order (per kind for now) in order to support telemetry consumers that run in real time.
Copied from Perforce
 Change: 194051
2018-06-21 14:00:05 +01:00
Gareth Rees
e961c80ff9 Arenafree event needs to include the pool so that telemetry-consuming applications can update pool statistics without having to remember the addresses of all the allocations.
Copied from Perforce
 Change: 194050
2018-06-21 13:57:42 +01:00
Gareth Rees
7b735041ab Better handling of intern events.
Copied from Perforce
 Change: 194040
2018-06-21 09:16:06 +01:00
Gareth Rees
d3eff9ff45 Since we changed the major version number, we might as well fix the type of the ok parameter of the commitlimitset event.
Copied from Perforce
 Change: 194033
2018-06-20 16:09:57 +01:00
Gareth Rees
5cc5bb5922 Don't store booleans as bit-fields in event structures: this makes it impossible to automatically unpack them using python's struct module. (the only event where this actually saved any space was poolinitmvff!)
Update event format to 2.0.0 since telemetry format changed.
New macro EVENT_ANY_FIELDS allows consumers to determine the layout of the event header.
mpseventpy now analyzes the event layout (including padding bytes) and emits struct format specifications.
New program tool/monitor.py reads and unpacks a stream of telemetry events.

Copied from Perforce
 Change: 194026
2018-06-20 15:51:38 +01:00
Gareth Rees
6d3b228200 Fix issues identified in review by apt.
Copied from Perforce
 Change: 193982
2018-06-19 14:51:56 +01:00
Gareth Rees
c6af54572d No need for empty atfork handlers, can pass null to pthread_atfork.
Copied from Perforce
 Change: 193963
2018-06-19 08:57:26 +01:00
Gareth Rees
89a4b0378a Simplify the wasmarked protocol.
Copied from Perforce
 Change: 193940
2018-06-18 20:03:13 +01:00
Gareth Rees
76b082ab3c Assertions on the critical path.
Copied from Perforce
 Change: 193879
2018-06-18 13:17:42 +01:00
Gareth Rees
f5ffaeb349 Mach_thread_self() can in theory "return mach_port_null if a resource shortage prevented the reception of the send right" so add a check in each case. (there's nothing we can do about it but at least we can notice.)
Copied from Perforce
 Change: 193831
2018-06-15 12:54:28 +01:00
Gareth Rees
e9d454d796 It's safe to register a thread multiple times on macos, so there is no need for the guard.
Copied from Perforce
 Change: 193828
2018-06-15 12:44:51 +01:00
Gareth Rees
307bc47730 Rename "mac os x" and "os x" to "macos", except for a few cases where for historical accuracy we want to continue to refer to the former name.
Copied from Perforce
 Change: 193821
2018-06-15 12:15:36 +01:00
Gareth Rees
81874fdf08 Fix typo.
Copied from Perforce
 Change: 193811
2018-06-15 11:15:42 +01:00
Gareth Rees
b0a73a5c71 Refactor atfork code to improve separation of concerns.
Copied from Perforce
 Change: 193806
2018-06-15 10:58:33 +01:00
Gareth Rees
4eeac719ad Start the collection and dereference the objects in the parent as well as the child.
Copied from Perforce
 Change: 193800
2018-06-15 10:06:59 +01:00
Gareth Rees
ad432cf7c4 Fix issues identified in review by nb.
Copied from Perforce
 Change: 193793
2018-06-14 19:31:30 +01:00
Gareth Rees
b1ac192a9a Update design history. restore accidentally removed check.
Copied from Perforce
 Change: 193787
2018-06-14 17:55:03 +01:00
Gareth Rees
6fda834973 Improve comments.
Copied from Perforce
 Change: 193783
2018-06-14 17:44:41 +01:00
Gareth Rees
612b44060f Fix ansi build.
Copied from Perforce
 Change: 193769
2018-06-14 16:58:24 +01:00
Gareth Rees
b5e1965b3d Avoid compilation errors from latest msvc.
Copied from Perforce
 Change: 193768
2018-06-14 16:54:33 +01:00
Gareth Rees
f92f645f63 Support for fork on linux and freebsd.
Copied from Perforce
 Change: 193765
2018-06-14 16:47:23 +01:00
Gareth Rees
e70b4c273c 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
2401957e62 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
8146970622 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
9de5c1dfbe Avoid using deprecated function mps_fix and deprecated macro mps_fix in the test cases; use mps_fix12 instead.
Copied from Perforce
 Change: 193726
2018-06-13 13:59:14 +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