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

2521 commits

Author SHA1 Message Date
Gareth Rees
df41d66de5 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
91efa65199 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
23cb9aa226 Add time series for per-trace mortality.
Copied from Perforce
 Change: 194538
2018-07-09 16:29:37 +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
3641c31e6b 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
07dfb53f25 Add mpseventpy as a target to the xcode project.
Copied from Perforce
 Change: 194296
2018-06-28 17:20:59 +01:00
Gareth Rees
5812cc3c8b 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
d33c34926a Not safe to call segsetsummary from gcsegfinish.
Copied from Perforce
 Change: 194277
2018-06-28 14:34:58 +01:00
Gareth Rees
fc6ae0978f 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
1a5179863f Fix alignment of event structures.
Copied from Perforce
 Change: 194220
2018-06-27 10:11:50 +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
9055658937 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
844d35d9ce Documentation for event header fields.
Copied from Perforce
 Change: 194113
2018-06-23 15:51:26 +01:00
Gareth Rees
1c7107fd8c 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
65d5f185f8 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
32a1c7c44f 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
7500c714e7 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
3dc5a92860 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
4c27186bf5 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
f4f795cb37 Better handling of intern events.
Copied from Perforce
 Change: 194040
2018-06-21 09:16:06 +01:00
Gareth Rees
d365ccbd08 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
2e85d9a850 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
687f5e0294 Fix issues identified in review by apt.
Copied from Perforce
 Change: 193982
2018-06-19 14:51:56 +01:00
Gareth Rees
374ab9c476 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
e62c3dc0c5 Simplify the wasmarked protocol.
Copied from Perforce
 Change: 193940
2018-06-18 20:03:13 +01:00
Gareth Rees
3e233329d3 Assertions on the critical path.
Copied from Perforce
 Change: 193879
2018-06-18 13:17:42 +01:00
Gareth Rees
00da8664cd 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
fd9f9c41d0 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
c4a840d676 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
11fff0151d Fix typo.
Copied from Perforce
 Change: 193811
2018-06-15 11:15:42 +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
a3779b8c3b 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
7ed378141c Fix issues identified in review by nb.
Copied from Perforce
 Change: 193793
2018-06-14 19:31:30 +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
e98b2a05c8 Improve comments.
Copied from Perforce
 Change: 193783
2018-06-14 17:44:41 +01:00
Gareth Rees
78e6d003bb Fix ansi build.
Copied from Perforce
 Change: 193769
2018-06-14 16:58:24 +01:00
Gareth Rees
38a08a6a62 Avoid compilation errors from latest msvc.
Copied from Perforce
 Change: 193768
2018-06-14 16:54:33 +01:00
Gareth Rees
598b64afb4 Support for fork on linux and freebsd.
Copied from Perforce
 Change: 193765
2018-06-14 16:47:23 +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
169b8dcaf6 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
b9ae05b94f 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
e9df5d6a35 Remove used epvmdefaultsubsequentsegsize.
Copied from Perforce
 Change: 192938
 ServerID: perforce.ravenbrook.com
2017-03-04 11:02:31 +00:00
Gareth Rees
cccb1c1e3c Documentation improvements.
Copied from Perforce
 Change: 192905
 ServerID: perforce.ravenbrook.com
2017-02-18 09:38:15 +00:00
Gareth Rees
4af5b181b3 Fix typos.
Copied from Perforce
 Change: 192890
 ServerID: perforce.ravenbrook.com
2017-02-11 11:30:15 +00: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
0f4564a71b 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
577b32d481 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
9f505c501d 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