Repository navigation
feat: warn in measure when dyld shared cache is unshared - #78
Merged
Interlap01 merged 1 commit intoNov 30, 2026
Merged
Conversation
Contributor
|
Thank you! |
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.
Refs #73.
On macOS 27.2.x hosts, every simulator process keeps a private dirty copy of the dyld shared cache's
__DATA_CONST, so a fully slim simulator measures ~2.6 GB instead of ~0.4–0.9 GB. Slimming cannot fix that, but today users only see "slim isn't working". This makesmeasuresay why.What it does
Measureprobes the simulator's ownsharingd(never disabled) withfootprint -p <pid>and reads the Dirty column of the__DATA_CONSTrow.Measurement.SharedCacheUnshared. Measured values: ~848–884 KB on healthy hosts, ~88–89 MB on affected ones, so the threshold has wide margin on both sides.simslim measureprints one warning line to stderr linking Slim simulators use ~4x memory on a macOS 27.2.1 / Xcode 27.2 host (per-process dirty __DATA_CONST, cryptexd-mounted runtime) #73.--jsongains"sharedCacheUnshared": true, withomitempty, so existing consumers and the GUI are unaffected.footprintfails or the row is missing, the field stays false andmeasurereports as before.Not in this PR
sharingdis not running in the simulator (e.g. kept off via a custom setup), the probe is skipped.top,MeasureManyand the macOS app are unchanged. Happy to surface it there too if you want.Test plan
make checkpasses (go test, go vet, swift-format lint, zsh -n, plutil).measure_test.go: affected sample (89 MB), healthy sample (848 KB), missing row.--jsonincludes"sharedCacheUnshared": true.