diff options
author | Mattias Simonsson <mattiass@google.com> | 2024-05-08 14:24:00 +0000 |
---|---|---|
committer | Mattias Simonsson <mattiass@google.com> | 2024-05-08 15:10:51 +0000 |
commit | 96f6035f4aeaf14567e2db67f85d58aa125d4a02 (patch) | |
tree | 7e42d58d5c2e3a9475e14bff354f3ed730f08fa0 | |
parent | 6e66b2db2f5328f9ef4d54c78a2ef7690082fc32 (diff) | |
download | perfetto-96f6035f4aeaf14567e2db67f85d58aa125d4a02.tar.gz |
ui: add fallback for user tracks without package name
aosp/2912626 attempted to add a fallback for UID tracks with
no package name, but it did not work because those tracks were
excluded by the inner join in the SQL query.
Having a fallback is useful because not all workloads have
a package name, for example benchmarks that work by uploading
and running a native binary on the device.
Bug: 325049734
Change-Id: I71fffa13410685df28b38bd99665984416f80798
-rw-r--r-- | ui/src/controller/track_decider.ts | 4 | ||||
-rw-r--r-- | ui/src/tracks/async_slices/index.ts | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/ui/src/controller/track_decider.ts b/ui/src/controller/track_decider.ts index e7e66f9f2..16c6453ac 100644 --- a/ui/src/controller/track_decider.ts +++ b/ui/src/controller/track_decider.ts @@ -805,7 +805,7 @@ class TrackDecider { t.uid as uid, iif(g.cnt = 1, g.package_name, 'UID ' || g.uid) as packageName from _uid_track_track_summary_by_uid_and_name t - join grouped_packages g using (uid) + left join grouped_packages g using (uid) `); const it = result.iter({ @@ -823,7 +823,7 @@ class TrackDecider { } const rawName = it.name; const uid = it.uid === null ? undefined : it.uid; - const userName = it.packageName === null ? `UID: ${uid}` : it.packageName; + const userName = it.packageName === null ? `UID ${uid}` : it.packageName; const groupUuid = `uid-track-group${rawName}`; if (groupMap.get(rawName) === undefined) { diff --git a/ui/src/tracks/async_slices/index.ts b/ui/src/tracks/async_slices/index.ts index 49520a031..644d22f24 100644 --- a/ui/src/tracks/async_slices/index.ts +++ b/ui/src/tracks/async_slices/index.ts @@ -151,7 +151,7 @@ class AsyncSlicePlugin implements Plugin { __max_layout_depth(t.track_count, t.track_ids) as maxDepth, iif(g.cnt = 1, g.package_name, 'UID ' || g.uid) as packageName from _uid_track_track_summary_by_uid_and_name t - join grouped_packages g using (uid) + left join grouped_packages g using (uid) `); const it = result.iter({ @@ -165,8 +165,8 @@ class AsyncSlicePlugin implements Plugin { for (; it.valid(); it.next()) { const kind = ASYNC_SLICE_TRACK_KIND; const rawName = it.name === null ? undefined : it.name; - const userName = it.packageName === null ? undefined : it.packageName; const uid = it.uid === null ? undefined : it.uid; + const userName = it.packageName === null ? `UID ${uid}` : it.packageName; const rawTrackIds = it.trackIds; const trackIds = rawTrackIds.split(',').map((v) => Number(v)); const maxDepth = it.maxDepth; |