-
-
Notifications
You must be signed in to change notification settings - Fork 377
fix: Record cached dyld images async #7269
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Semver Impact of This PR🟢 Patch (bug fixes) 📋 Changelog PreviewThis is how your changes will appear in the changelog. This PR will not appear in the changelog. 🤖 This preview updates automatically when you update the PR. |
❌ 4 Tests Failed:
View the top 3 failed test(s) by shortest run time
To view more test analytics, go to the Test Analytics Dashboard |
| add_dyld_image(mh); | ||
| } | ||
|
|
||
| void dyld_tracker_start(void) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe this should have sentry's prefix
|
@noahsmartin, I didn't check the code yet, as this is still a draft. Please be aware that they also need the loaded binary image in the UIViewControllerSwizzling, as pointed out here #4618 (comment). If the proposal respects this, then excellent. |
Performance metrics 🚀
|
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| b5c1b24 | 1217.94 ms | 1248.76 ms | 30.82 ms |
| 83bf9af | 1213.30 ms | 1234.18 ms | 20.89 ms |
| c424b6a | 1220.38 ms | 1248.18 ms | 27.80 ms |
| b206854 | 1228.68 ms | 1250.76 ms | 22.08 ms |
| 7e93d85 | 1205.28 ms | 1243.71 ms | 38.44 ms |
| 3b01aaf | 1194.98 ms | 1210.36 ms | 15.38 ms |
| 79e2bb8 | 1216.37 ms | 1242.42 ms | 26.05 ms |
| 50e7b3e | 1221.54 ms | 1250.81 ms | 29.27 ms |
| a7d7fb6 | 1209.53 ms | 1235.91 ms | 26.38 ms |
| 2e5230b | 1207.41 ms | 1240.41 ms | 33.00 ms |
App size
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| b5c1b24 | 24.14 KiB | 1.06 MiB | 1.04 MiB |
| 83bf9af | 24.14 KiB | 1.04 MiB | 1.02 MiB |
| c424b6a | 24.14 KiB | 1.06 MiB | 1.04 MiB |
| b206854 | 24.14 KiB | 1.07 MiB | 1.04 MiB |
| 7e93d85 | 24.14 KiB | 1.06 MiB | 1.04 MiB |
| 3b01aaf | 24.14 KiB | 1.06 MiB | 1.04 MiB |
| 79e2bb8 | 24.14 KiB | 1.04 MiB | 1.02 MiB |
| 50e7b3e | 24.14 KiB | 1.04 MiB | 1.02 MiB |
| a7d7fb6 | 24.14 KiB | 1.06 MiB | 1.04 MiB |
| 2e5230b | 24.14 KiB | 1.04 MiB | 1.02 MiB |
This is a POC for how I think we should solve #4618
It fixes an existing race condition and moves the image handler to a background thread. Synchronization is now done safely with atomics so the crash handler can read from the added images without risk of race conditions (which existed before).
#skip-changelog