diff options
author | 2021-11-24 19:29:38 -0700 | |
---|---|---|
committer | 2021-12-07 17:08:18 -0700 | |
commit | a9ad69b663bc5358d7641d873b657ab00138dcba (patch) | |
tree | baa6d1d86ff03f523ba4a82721744f175c421d8b /libs/graphicsenv/GpuStatsInfo.cpp | |
parent | 3228c37ddad11e9ab72ddf0e724890ac942bbed0 (diff) |
Add angleInUse field to 'dumpsys gpu'
Add the angleInUse field to the 'dumpsys gpu' command, which tracks if
ANGLE or the system driver was loaded for each package.
This CL also purges old packages from GpuStats::mAppStats when it fills
up, so GpuStats::mAppStats always contains the most recently launched
apps. This guarantees that `adb shell dumpsys gpu` and bugreports always
contain relevant data if there's an issue.
Bug: b/154955572
Test: adb shell dumpsys gpu
Test: atest CtsAngleIntegrationHostTestCases
Test: atest GpuStatsTest
Change-Id: I0ab96327affefeaebb775aa2ef973131cc823b97
Diffstat (limited to 'libs/graphicsenv/GpuStatsInfo.cpp')
-rw-r--r-- | libs/graphicsenv/GpuStatsInfo.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/libs/graphicsenv/GpuStatsInfo.cpp b/libs/graphicsenv/GpuStatsInfo.cpp index f2d0943e86..858739c9dd 100644 --- a/libs/graphicsenv/GpuStatsInfo.cpp +++ b/libs/graphicsenv/GpuStatsInfo.cpp @@ -88,6 +88,7 @@ status_t GpuStatsAppInfo::writeToParcel(Parcel* parcel) const { if ((status = parcel->writeBool(cpuVulkanInUse)) != OK) return status; if ((status = parcel->writeBool(falsePrerotation)) != OK) return status; if ((status = parcel->writeBool(gles1InUse)) != OK) return status; + if ((status = parcel->writeBool(angleInUse)) != OK) return status; return OK; } @@ -101,6 +102,7 @@ status_t GpuStatsAppInfo::readFromParcel(const Parcel* parcel) { if ((status = parcel->readBool(&cpuVulkanInUse)) != OK) return status; if ((status = parcel->readBool(&falsePrerotation)) != OK) return status; if ((status = parcel->readBool(&gles1InUse)) != OK) return status; + if ((status = parcel->readBool(&angleInUse)) != OK) return status; return OK; } @@ -111,6 +113,7 @@ std::string GpuStatsAppInfo::toString() const { StringAppendF(&result, "cpuVulkanInUse = %d\n", cpuVulkanInUse); StringAppendF(&result, "falsePrerotation = %d\n", falsePrerotation); StringAppendF(&result, "gles1InUse = %d\n", gles1InUse); + StringAppendF(&result, "angleInUse = %d\n", angleInUse); result.append("glDriverLoadingTime:"); for (int32_t loadingTime : glDriverLoadingTime) { StringAppendF(&result, " %d", loadingTime); |