From 512a723aaec6df4d4520637670c317a16a48b20f Mon Sep 17 00:00:00 2001 From: Yiwei Zhang Date: Fri, 15 Feb 2019 16:04:41 -0800 Subject: 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 --- libs/graphicsenv/GraphicsEnv.cpp | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) (limited to 'libs/graphicsenv/GraphicsEnv.cpp') 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(driver), isDriverLoaded, (long long)driverLoadingTime); + (unsigned long long)mGpuStats.driverVersionCode, mGpuStats.driverBuildDate.c_str(), + mGpuStats.appPackageName.c_str(), static_cast(driver), isDriverLoaded, + (long long)driverLoadingTime); const sp 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); } } -- cgit v1.2.3-59-g8ed1b