Loading cmds/statsd/src/atoms.proto +3 −0 Original line number Diff line number Diff line Loading @@ -6184,6 +6184,9 @@ message GpuStatsAppInfo { // Angle driver loading time info. optional GpuDriverLoadingTime angle_driver_loading_time = 5 [(android.os.statsd.log_mode) = MODE_BYTES]; // CPU Vulkan implementation is in use. optional bool cpu_vulkan_in_use = 6; } /* Loading cmds/statsd/src/external/GpuStatsPuller.cpp +1 −0 Original line number Diff line number Diff line Loading @@ -95,6 +95,7 @@ static bool pullGpuStatsAppInfo(const sp<IGpuService>& gpuService, if (!event->write(int64VectorToProtoByteString(info.glDriverLoadingTime))) return false; if (!event->write(int64VectorToProtoByteString(info.vkDriverLoadingTime))) return false; if (!event->write(int64VectorToProtoByteString(info.angleDriverLoadingTime))) return false; if (!event->write(info.cpuVulkanInUse)) return false; event->init(); data->emplace_back(event); } Loading cmds/statsd/tests/external/GpuStatsPuller_test.cpp +4 −1 Original line number Diff line number Diff line Loading @@ -55,8 +55,9 @@ static const int64_t ANGLE_DRIVER_LOADING_TIME_1 = 1111; static const int32_t VULKAN_VERSION = 1; static const int32_t CPU_VULKAN_VERSION = 2; static const int32_t GLES_VERSION = 3; static const bool CPU_VULKAN_IN_USE = true; static const size_t NUMBER_OF_VALUES_GLOBAL = 13; static const size_t NUMBER_OF_VALUES_APP = 5; static const size_t NUMBER_OF_VALUES_APP = 6; // clang-format on class MockGpuStatsPuller : public GpuStatsPuller { Loading Loading @@ -148,6 +149,7 @@ TEST_F(GpuStatsPuller_test, PullGpuStatsAppInfo) { EXPECT_TRUE(event->write(int64VectorToProtoByteString(glDriverLoadingTime))); EXPECT_TRUE(event->write(int64VectorToProtoByteString(vkDriverLoadingTime))); EXPECT_TRUE(event->write(int64VectorToProtoByteString(angleDriverLoadingTime))); EXPECT_TRUE(event->write(CPU_VULKAN_IN_USE)); event->init(); inData.emplace_back(event); MockGpuStatsPuller mockPuller(android::util::GPU_STATS_APP_INFO, &inData); Loading @@ -165,6 +167,7 @@ TEST_F(GpuStatsPuller_test, PullGpuStatsAppInfo) { outData[0]->getValues()[3].mValue.str_value); EXPECT_EQ(int64VectorToProtoByteString(angleDriverLoadingTime), outData[0]->getValues()[4].mValue.str_value); EXPECT_EQ(CPU_VULKAN_IN_USE, outData[0]->getValues()[5].mValue.int_value); } } // namespace statsd Loading Loading
cmds/statsd/src/atoms.proto +3 −0 Original line number Diff line number Diff line Loading @@ -6184,6 +6184,9 @@ message GpuStatsAppInfo { // Angle driver loading time info. optional GpuDriverLoadingTime angle_driver_loading_time = 5 [(android.os.statsd.log_mode) = MODE_BYTES]; // CPU Vulkan implementation is in use. optional bool cpu_vulkan_in_use = 6; } /* Loading
cmds/statsd/src/external/GpuStatsPuller.cpp +1 −0 Original line number Diff line number Diff line Loading @@ -95,6 +95,7 @@ static bool pullGpuStatsAppInfo(const sp<IGpuService>& gpuService, if (!event->write(int64VectorToProtoByteString(info.glDriverLoadingTime))) return false; if (!event->write(int64VectorToProtoByteString(info.vkDriverLoadingTime))) return false; if (!event->write(int64VectorToProtoByteString(info.angleDriverLoadingTime))) return false; if (!event->write(info.cpuVulkanInUse)) return false; event->init(); data->emplace_back(event); } Loading
cmds/statsd/tests/external/GpuStatsPuller_test.cpp +4 −1 Original line number Diff line number Diff line Loading @@ -55,8 +55,9 @@ static const int64_t ANGLE_DRIVER_LOADING_TIME_1 = 1111; static const int32_t VULKAN_VERSION = 1; static const int32_t CPU_VULKAN_VERSION = 2; static const int32_t GLES_VERSION = 3; static const bool CPU_VULKAN_IN_USE = true; static const size_t NUMBER_OF_VALUES_GLOBAL = 13; static const size_t NUMBER_OF_VALUES_APP = 5; static const size_t NUMBER_OF_VALUES_APP = 6; // clang-format on class MockGpuStatsPuller : public GpuStatsPuller { Loading Loading @@ -148,6 +149,7 @@ TEST_F(GpuStatsPuller_test, PullGpuStatsAppInfo) { EXPECT_TRUE(event->write(int64VectorToProtoByteString(glDriverLoadingTime))); EXPECT_TRUE(event->write(int64VectorToProtoByteString(vkDriverLoadingTime))); EXPECT_TRUE(event->write(int64VectorToProtoByteString(angleDriverLoadingTime))); EXPECT_TRUE(event->write(CPU_VULKAN_IN_USE)); event->init(); inData.emplace_back(event); MockGpuStatsPuller mockPuller(android::util::GPU_STATS_APP_INFO, &inData); Loading @@ -165,6 +167,7 @@ TEST_F(GpuStatsPuller_test, PullGpuStatsAppInfo) { outData[0]->getValues()[3].mValue.str_value); EXPECT_EQ(int64VectorToProtoByteString(angleDriverLoadingTime), outData[0]->getValues()[4].mValue.str_value); EXPECT_EQ(CPU_VULKAN_IN_USE, outData[0]->getValues()[5].mValue.int_value); } } // namespace statsd Loading