diff --git a/mps/code/mpmtypes.h b/mps/code/mpmtypes.h
index 1e630cf2034..c01f68c8f71 100644
--- a/mps/code/mpmtypes.h
+++ b/mps/code/mpmtypes.h
@@ -51,16 +51,16 @@ typedef mps_arg_s *Arg;
typedef mps_arg_s *ArgList;
typedef mps_key_t Key;
-typedef Word RefSet; /* design.mps.refset */
-typedef Word ZoneSet; /* design.mps.refset */
-typedef unsigned Rank;
-typedef unsigned RankSet;
-typedef unsigned RootMode;
-typedef Size Epoch; /* design.mps.ld */
-typedef unsigned TraceId; /* */
-typedef unsigned TraceSet; /* */
-typedef unsigned TraceState; /* */
-typedef unsigned TraceStartWhy;
+typedef Word RefSet; /* */
+typedef Word ZoneSet; /* */
+typedef unsigned Rank; /* */
+typedef unsigned RankSet; /* */
+typedef unsigned RootMode; /* */
+typedef Size Epoch; /* */
+typedef unsigned TraceId; /* */
+typedef unsigned TraceSet; /* */
+typedef unsigned TraceState; /* */
+typedef unsigned TraceStartWhy; /* */
typedef unsigned AccessSet; /* */
typedef unsigned Attr; /* */
typedef unsigned RootVar; /* */
diff --git a/mps/design/arenavm.txt b/mps/design/arenavm.txt
index cf37391749c..1f5aa558910 100644
--- a/mps/design/arenavm.txt
+++ b/mps/design/arenavm.txt
@@ -59,10 +59,11 @@ Notes
-----
_`.note.refset`: Some of this document simply assumes that RefSets
-(see the horribly incomplete design.mps.refset) have been chosen as
-the solution for design.mps.arena.req.fun.set_. It's a lot simpler
-that way. Both to write and understand.
+(see design.mps.collections.refsets_) have been chosen as the solution for
+design.mps.arena.req.fun.set_. It's a lot simpler that way. Both to
+write and understand.
+.. _design.mps.collections.refsets: collections#refsets
.. _design.mps.arena.req.fun.set: arena#req-fun-set
diff --git a/mps/design/monitor.txt b/mps/design/monitor.txt
index ea3c3235502..4a055da9ca6 100644
--- a/mps/design/monitor.txt
+++ b/mps/design/monitor.txt
@@ -34,7 +34,7 @@ _`.req.state.stopped`: that has finished running.
It should be possible to see:
-_`.req.memory.total`: the total memory in use by the client program;
+_`.req.memory.total`: the total memory in use by the client program [GR_2004-12-02]_;
_`.req.memory.pool`: the memory in use by each pool;
@@ -42,7 +42,7 @@ _`.req.trace`: when traces take place;
_`.req.trace.generation`: which generations get collected by each trace;
-_`.req.time-fraction`: the fraction of time spent in collections;
+_`.req.time-fraction`: the fraction of runtime spent in collections;
_`.req.barriers`: the rate of barrier hits, to indicate how the barriers
are working.
@@ -141,6 +141,11 @@ References
Ravenbrook Limited; 2018-06-27;
.
+.. [GR_2004-12-02]
+ "RE: MPS, working set, and address space"; Göran Rydqvist;
+ Configura Sverige AB; 2004-12-02;
+ .
+
Document History
----------------
diff --git a/mps/design/type.txt b/mps/design/type.txt
index 89b43be9515..e333272ce8a 100644
--- a/mps/design/type.txt
+++ b/mps/design/type.txt
@@ -391,7 +391,9 @@ intended.
``typedef Word RefSet``
_`.refset`: ``RefSet`` is a conservative approximation to a set of
-references. See design.mps.refset.
+references. See design.mps.collection.refsets_.
+
+.. _design.mps.collection.refsets: collection#refsets
``typedef int Res``
@@ -655,7 +657,7 @@ which we know very little about.
``typedef Word ZoneSet``
_`.zoneset`: ``ZoneSet`` is a conservative approximation to a set of
-zones. See design.mps.refset.
+zones. See design.mps.collection.refsets_.
Abstract types
diff --git a/mps/tool/monitor b/mps/tool/monitor
index 0f98edf1dcd..d2da3d2d331 100755
--- a/mps/tool/monitor
+++ b/mps/tool/monitor
@@ -180,7 +180,7 @@ SI_PREFIX = list('yzafpnµm kMGTPEZY')
SI_PREFIX[8] = ''
def with_SI_prefix(y, precision=5, unit=''):
- """Turn the number y into a string using SI prefixes followed by unit."""
+ "Turn the number y into a string using SI prefixes followed by unit."
if y < 0:
return '-' + with_SI_prefix(-y, precision, unit)
y = decimal.Context(prec=precision).create_decimal(y)
@@ -1463,7 +1463,7 @@ class ApplicationWindow(QtWidgets.QMainWindow):
self._log(message)
def _on_key_press(self, event):
- """Handle a keyboard event."""
+ "Handle a keyboard event."
with ErrorReporter(self._log_lines):
if event.key in self._shortcuts:
self._shortcuts[event.key][0](event)
@@ -1471,11 +1471,11 @@ class ApplicationWindow(QtWidgets.QMainWindow):
self._log(f"Unknown key {event.key!r}")
def _mpl_key(self, event):
- """Hand a key-press even on to the toolbar."""
+ "Pass a key-press event to the toolbar."
key_press_handler(event, self._canvas, self._toolbar)
def _help(self, event):
- """Report keyboard help to the log pane."""
+ "Report keyboard help to the log pane."
# Collate shortcut keys by their documentation string.
doc_keys = defaultdict(list)
for _, key, doc in self._shortcuts.values():
@@ -1487,15 +1487,15 @@ class ApplicationWindow(QtWidgets.QMainWindow):
self._log(f"\t{'/'.join(doc_keys[doc])}\t{doc}")
def _pause(self, event):
- """Toggle pausing of axis limit updates."""
+ "Toggle pausing of axis limit updates."
self._toolbar.pause()
def _close(self, event):
- """Close the monitor application."""
+ "Close the monitor application."
self.close()
def _toggle_log_linear(self, event):
- """Toggle the bytes axis between log and linear scales."""
+ "Toggle the bytes axis between log and linear scales."
yscale = 'linear' if self._log_scale else 'log'
self._axes_dict[BYTES_AXIS].set_yscale(yscale)
self._axes_dict[BYTES_AXIS].yaxis.set_major_formatter(
@@ -1504,33 +1504,33 @@ class ApplicationWindow(QtWidgets.QMainWindow):
self._log(f'Switched bytes axis to {yscale} scale.')
def _next_point(self, event):
- """Select the next point on the selected line."""
+ "Select the next point on the selected line."
if self._close_points is None:
return
line, index = self._close_points[self._selected]
self._select(line, index + 1)
def _previous_point(self, event):
- """Select the previous point on the selected line."""
+ "Select the previous point on the selected line."
if self._close_points is None:
return
line, index = self._close_points[self._selected]
self._select(line, index - 1)
def _up_line(self, event):
- """Select the point on the line above the currently selected point."""
+ "Select the point on the line above the currently selected point."
if self._selected is None:
return
self._annotate(self._selected + 1)
def _down_line(self, event):
- """Select the point on the line below the currently selected point."""
+ "Select the point on the line below the currently selected point."
if self._selected is None:
return
self._annotate(self._selected - 1)
def _select(self, line, index):
- """Select the point with index `index` on `line`, if it exists."""
+ "Select the point with index `index` on `line`, if it exists."
if index < 0 or index >= len(line):
return
t, y = line[index]
@@ -1693,7 +1693,7 @@ class ApplicationWindow(QtWidgets.QMainWindow):
self._zoom_to(newlo, newhi)
def _zoom_to(self, lo, hi):
- """Redraw with new limits on the time axis."""
+ "Redraw with new limits on the time axis."
ax = self._axes_dict[BYTES_AXIS]
if self._toolbar.empty():
self._toolbar.push_current()