Repository navigation
[gc-stats][macos] Exclude the runtime events ring from max RSS on macOS - #152
Open
ngorogiannis wants to merge 1 commit into
Open
ngorogiannis wants to merge 1 commit into
ngorogiannis wants to merge 1 commit into
Conversation
ngorogiannis
force-pushed
the
mac-rss-without-ring
branch
from
September 23, 2026 07:25
adccd2b to
a650cf1
Compare
ngorogiannis
force-pushed
the
mac-rss-without-ring
branch
from
September 30, 2026 07:53
a650cf1 to
a12eb5b
Compare
ngorogiannis
force-pushed
the
mac-rss-without-ring
branch
from
September 30, 2026 07:54
a12eb5b to
a650cf1
Compare
ngorogiannis
force-pushed
the
mac-rss-without-ring
branch
from
September 30, 2026 07:55
a650cf1 to
33834e6
Compare
ngorogiannis
force-pushed
the
mac-rss-without-ring
branch
3 times, most recently
from
November 10, 2026 18:27
b7ea9fe to
a810c1f
Compare
ngorogiannis
marked this pull request as draft
November 11, 2026 08:03
ngorogiannis
force-pushed
the
mac-rss-without-ring
branch
5 times, most recently
from
November 13, 2026 14:16
653121c to
a68abbe
Compare
The macOS arm of the exclusion the previous commit added for Linux. The ring's share is sized, per sample, by walking the child's VM regions with proc_pidinfo(PROC_PIDREGIONPATHINFO) and summing pri_pages_resident over those whose backing vnode matches a stat() of <pid>.events. Matching is on device+inode rather than the region path, which the kernel truncates for long paths and which need not be canonical; adjacent regions are summed, since a large mapping can be split across several. The mapping never moves, so its address is cached. Unlike Linux, the count comes from the backing region rather than the child's own page tables, so it can in principle exceed the child's RSS. FreeBSD still reports the RSS with the ring included, and is left as further work.
ngorogiannis
force-pushed
the
mac-rss-without-ring
branch
from
November 13, 2026 17:27
a68abbe to
d3afd5c
Compare
ngorogiannis
marked this pull request as ready for review
November 13, 2026 17:30
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The macOS arm of the exclusion the previous commit added for Linux.
The ring's share is sized, per sample, by walking the child's VM regions
with proc_pidinfo(PROC_PIDREGIONPATHINFO) and summing pri_pages_resident
over those whose backing vnode matches a stat() of .events. Matching
is on device+inode rather than the region path, which the kernel
truncates for long paths and which need not be canonical; adjacent
regions are summed, since a large mapping can be split across several.
The mapping never moves, so its address is cached.
Unlike Linux, the count comes from the backing region rather than the
child's own page tables, so it can in principle exceed the child's RSS.
FreeBSD still reports the RSS with the ring included, and is left as
further work.
Stack created with GitHub Stacks CLI • Give Feedback 💬