Open rptb1 opened 1 year ago
This performance regression was introduced gradually by several changes. SegSetGrey
was recognized as being on the critical path in the past but extra assertions were introduced with segment classes.
Compare https://github.com/Ravenbrook/mps/blob/081d79ee2299509615b67cdbe8f0bfdfbd93feab/code/seg.c#L1578-L1585 with https://github.com/Ravenbrook/mps/blob/081d79ee2299509615b67cdbe8f0bfdfbd93feab/code/seg.c#L237-L254
We could track down where this happened if we really wanted.
Some suggestions for prevention:
2. Better profiling support.
See also https://github.com/Ravenbrook/mps/pull/138#issuecomment-1422704228
Consider shorting out the segment class dispatch (calling gcSegSetGrey
directly) here (and similar) https://github.com/Ravenbrook/mps/blob/9bc668f7ef5284c624504d9c17e015c4167011ec/code/poolamc.c#L1651
We know that the destination toSeg
is a GC segment.
SegSetGrey
is occupying a lot of CPU time on the critical path in sampling profiles.keybase://chat/ravenbrook#mps/2232 by @rptb1 of 2022-12-14 16:59 UTC says: