Skip to content
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

feat(protocol): Change lock_reason to a held_locks dictionary #2018

Merged
merged 3 commits into from
Apr 12, 2023

Conversation

romtsn
Copy link
Member

@romtsn romtsn commented Apr 7, 2023

A thread can hold multiple locks, so this PR changes the recently introduced lock_reason attribute to a dictionary/map, where the key is the lock object address and the value is the existing LockReason struct. I was also thinking to make it just an Array, but I think it'd be easier and faster to look up by a lock address when we analyze.

Additionally, I haven't found any docs about how to update snapshot files, so I've added a section to readme about that, lemme know if that makes sense.

https://cs.android.com/android/platform/superproject/+/master:development/tools/bugreport/src/com/android/bugreport/stacks/ThreadSnapshot.java;l=53

@romtsn romtsn requested review from shruthilayaj and a team April 7, 2023 13:19
@romtsn
Copy link
Member Author

romtsn commented Apr 7, 2023

Additionally, I haven't found any docs about how to update snapshot files, so I've added a section to readme about that, lemme know if that makes sense.

Ah, ok, it's here https://develop.sentry.dev/rust/#development-environment, should I remove it from the readme then?

Copy link
Contributor

@olksdr olksdr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm!

@romtsn romtsn enabled auto-merge (squash) April 12, 2023 22:24
@romtsn romtsn merged commit ab2a3dc into master Apr 12, 2023
17 checks passed
@romtsn romtsn deleted the feat/rz/lock-reason-dictionary branch April 12, 2023 22:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants