-
-
Notifications
You must be signed in to change notification settings - Fork 444
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
Parse ANRv2 thread dump into threads interface #2661
Conversation
|
Performance metrics 🚀
|
Revision | Plain | With Sentry | Diff |
---|---|---|---|
5c79398 | 372.37 ms | 400.17 ms | 27.80 ms |
d881681 | 328.72 ms | 357.90 ms | 29.18 ms |
74b172a | 341.92 ms | 390.34 ms | 48.42 ms |
ef7c2ad | 339.88 ms | 396.00 ms | 56.12 ms |
99c12f2 | 318.80 ms | 373.24 ms | 54.44 ms |
6129622 | 331.38 ms | 381.78 ms | 50.40 ms |
f383e87 | 326.91 ms | 360.36 ms | 33.45 ms |
App size
Revision | Plain | With Sentry | Diff |
---|---|---|---|
5c79398 | 1.73 MiB | 2.28 MiB | 564.48 KiB |
d881681 | 1.73 MiB | 2.28 MiB | 564.35 KiB |
74b172a | 1.73 MiB | 2.28 MiB | 564.35 KiB |
ef7c2ad | 1.73 MiB | 2.28 MiB | 564.51 KiB |
99c12f2 | 1.73 MiB | 2.28 MiB | 564.44 KiB |
6129622 | 1.73 MiB | 2.28 MiB | 564.48 KiB |
f383e87 | 1.73 MiB | 2.28 MiB | 564.48 KiB |
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## feat/anr-v2 #2661 +/- ##
=================================================
+ Coverage 80.28% 81.12% +0.83%
- Complexity 3990 4387 +397
=================================================
Files 327 345 +18
Lines 15017 16182 +1165
Branches 1977 2177 +200
=================================================
+ Hits 12057 13127 +1070
+ Misses 2183 2155 -28
- Partials 777 900 +123
☔ View full report in Codecov by Sentry. |
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.
LGTM! 🚀
final String abnormalMechanism = ((AbnormalExit) hint).mechanism(); | ||
if (abnormalMechanism == null) { | ||
return false; | ||
} | ||
|
||
if (abnormalMechanism.equals("anr_foreground")) { | ||
return false; | ||
} | ||
|
||
return abnormalMechanism.equals("anr_background"); |
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.
l
: I guess you added the options for readability right? Otherwise could be simplified to:
final String abnormalMechanism = ((AbnormalExit) hint).mechanism(); | |
if (abnormalMechanism == null) { | |
return false; | |
} | |
if (abnormalMechanism.equals("anr_foreground")) { | |
return false; | |
} | |
return abnormalMechanism.equals("anr_background"); | |
final String abnormalMechanism = ((AbnormalExit) hint).mechanism(); | |
return "anr_background".equals(abnormalMechanism); |
#skip-changelog
📜 Description
getTraceInputStream()
. Most of the parsing has been adapted from AOSP (with license header!), and each thread is transformed directly toSentryThread
.SentryLockReason
which we can infer from the thread dump and which can tell us if a thread is blocked on a lock by another thread. ASentryThread
can have a dictionary/map of held locks.💡 Motivation and Context
Part of #1796
💚 How did you test it?
Manually and automated
📝 Checklist
sendDefaultPII
is enabled.🔮 Next steps