diff options
| author | 2019-02-15 16:04:41 -0800 | |
|---|---|---|
| committer | 2019-02-15 16:12:35 -0800 | |
| commit | 512a723aaec6df4d4520637670c317a16a48b20f (patch) | |
| tree | fc6d8c383bd36afc7277f88892464705cd6566e2 /libs/graphicsenv/GraphicsEnv.cpp | |
| parent | 79e0f7f4bbe65e0c44449ca1f335a39f5ade581a (diff) | |
Game Driver: plumb driver build date into GpuStats
Driver build date is used to track graphics driver age of the Android
ecosystem. This change also make the binder transaction async so that
both GL and Vulkan loaders won't be blocked by GpuStats module in the
GpuService.
Bug: 123156461
Test: Build, flash and boot. Verify the GpuService receiver side.
Change-Id: I89fd94613da2f5be7c28e5a5f8c3ec653f85cd2a
Diffstat (limited to 'libs/graphicsenv/GraphicsEnv.cpp')
| -rw-r--r-- | libs/graphicsenv/GraphicsEnv.cpp | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/libs/graphicsenv/GraphicsEnv.cpp b/libs/graphicsenv/GraphicsEnv.cpp index a07627a657..386f9f0dfb 100644 --- a/libs/graphicsenv/GraphicsEnv.cpp +++ b/libs/graphicsenv/GraphicsEnv.cpp @@ -158,6 +158,7 @@ void GraphicsEnv::setDriverPath(const std::string path) { void GraphicsEnv::setGpuStats(const std::string& driverPackageName, const std::string& driverVersionName, uint64_t driverVersionCode, + const std::string& driverBuildDate, const std::string& appPackageName) { ATRACE_CALL(); @@ -166,13 +167,15 @@ void GraphicsEnv::setGpuStats(const std::string& driverPackageName, "\tdriverPackageName[%s]\n" "\tdriverVersionName[%s]\n" "\tdriverVersionCode[%llu]\n" + "\tdriverBuildDate[%s]\n" "\tappPackageName[%s]\n", driverPackageName.c_str(), driverVersionName.c_str(), - (unsigned long long)driverVersionCode, appPackageName.c_str()); + (unsigned long long)driverVersionCode, driverBuildDate.c_str(), appPackageName.c_str()); mGpuStats.driverPackageName = driverPackageName; mGpuStats.driverVersionName = driverVersionName; mGpuStats.driverVersionCode = driverVersionCode; + mGpuStats.driverBuildDate = driverBuildDate; mGpuStats.appPackageName = appPackageName; } @@ -262,19 +265,22 @@ void GraphicsEnv::sendGpuStatsLocked(GraphicsEnv::Driver driver, bool isDriverLo "\tdriverPackageName[%s]\n" "\tdriverVersionName[%s]\n" "\tdriverVersionCode[%llu]\n" + "\tdriverBuildDate[%s]\n" "\tappPackageName[%s]\n" "\tdriver[%d]\n" "\tisDriverLoaded[%d]\n" "\tdriverLoadingTime[%lld]", mGpuStats.driverPackageName.c_str(), mGpuStats.driverVersionName.c_str(), - (unsigned long long)mGpuStats.driverVersionCode, mGpuStats.appPackageName.c_str(), - static_cast<int32_t>(driver), isDriverLoaded, (long long)driverLoadingTime); + (unsigned long long)mGpuStats.driverVersionCode, mGpuStats.driverBuildDate.c_str(), + mGpuStats.appPackageName.c_str(), static_cast<int32_t>(driver), isDriverLoaded, + (long long)driverLoadingTime); const sp<IGpuService> gpuService = getGpuService(); if (gpuService) { gpuService->setGpuStats(mGpuStats.driverPackageName, mGpuStats.driverVersionName, - mGpuStats.driverVersionCode, mGpuStats.appPackageName, driver, - isDriverLoaded, driverLoadingTime); + mGpuStats.driverVersionCode, mGpuStats.driverBuildDate, + mGpuStats.appPackageName, driver, isDriverLoaded, + driverLoadingTime); } } |