-
Notifications
You must be signed in to change notification settings - Fork 619
Add support for Android User List in Trace Processor #3416
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
Change-Id: I922e866376fb2419fff87f21729268b32e808dc6
Change-Id: I53f8bcebd5ff148dac567fb824dc7e072e22b46d
Change-Id: Id5091cacd86eafe0d4cd42d657faf964940412f8
Change-Id: I27c15e787f16f3dffdd180c25bf9f4c6eedf9da5
Change-Id: Ib8e986a6e896e8b06578d4ba066a74c689b315e9
ccb8b3a to
82a676b
Compare
9c3598c to
e770237
Compare
aMayzner
left a comment
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 to me!
Change-Id: I371cc0f46e66eb8a17cccf8a9958339b5e32e084
08dd013 to
26c5be9
Compare
|
Removing myself and Ryan, Anna or Lalit (just one of the two) are the best candidates to review this |
src/trace_processor/perfetto_sql/stdlib/prelude/after_eof/views.sql
Outdated
Show resolved
Hide resolved
| -- NOTE: sorted by Android user id | ||
| CREATE PERFETTO VIEW android_users ( | ||
| -- Android user id | ||
| uid LONG, |
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.
I think I also asked about this but how does this correspond to uid on the android_process_metadata [1] table.
I think just calling this uid and "android user id" is highly confusing for everyone. I would like to see a explanation of this somewhere.
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.
On android_process_metada, I also see user_id as a column and says it is for "multi-user devices". How does that factor into things?
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.
I can change it to android_user_id because it is exactly that in processes.
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.
in android_process_metadata
linux uid = user_id * 1000 + uid (android app id)
bear in mind uid which is shown by linux ps is not present in android_process_metadata and android app id is called uid
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.
Yeah this is a historical mistake. It's too late to change this now beyond adding some documentation there. We should have done a better job on this when we first designed that table.
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.
we can name it user_id to keep the same name in tables
4404ab8 to
bd24240
Compare
d64902d to
4eaa597
Compare
Change-Id: I9a53d68a4ad475984f715f420d7cc498b987a053
4eaa597 to
5c17d4b
Compare
This change introduces the ability to parse, store, and query Android user list information from Perfetto traces.
Previously, information about the different Android users (e.g., system, secondary, guest) present on the device was not extracted from the trace. This change adds the necessary logic to process the
AndroidUserListtrace packet.Key changes include:
__intrinsic_user_listto store the user ID (uid) and user type (type).AndroidProbesModuleto handle theAndroidUserListmessage and populate the new table.android_users, with columnsuidandtype.stats::user_list_errorsto track any issues during parsing.test_ftrace_user_list) using a dedicated trace file (trace_user_list.pftrace) to validate the end-to-end functionality of parsing and querying theandroid_usersview.These changes enable trace analysts to easily query and correlate trace events with specific Android users on the system.