gfxstream: use process name based virtio-gpu protocol
The virtio-gpu protocol already provides a way to name
a process (known as a "context" in it's nomenclature").
Use that. That'll allow use to delete the extra
renderControl side channel in the VK encoder while
still retaining this functionality.
BUG=297245651
TEST=launch_cvd --gpu_mode=gfxstream_guest_angle
Change-Id: I3cc4f4a497c438ed1c8bdea83a1c1180bb20f5ed
diff --git a/host/RenderThread.cpp b/host/RenderThread.cpp
index c0241cc..ffddb50 100644
--- a/host/RenderThread.cpp
+++ b/host/RenderThread.cpp
@@ -429,16 +429,16 @@
std::unique_ptr<EventHangMetadata::HangAnnotations> renderThreadData =
std::make_unique<EventHangMetadata::HangAnnotations>();
- const char* processName = nullptr;
- if (tInfo.m_processName) {
- processName = tInfo.m_processName.value().c_str();
+ const char* contextName = nullptr;
+ if (mNameOpt) {
+ contextName = (*mNameOpt).c_str();
}
auto* healthMonitor = FrameBuffer::getFB()->getHealthMonitor();
if (healthMonitor) {
- if (processName) {
+ if (contextName) {
renderThreadData->insert(
- {{"renderthread_guest_process", processName}});
+ {{"renderthread_guest_process", contextName}});
}
if (readBuf.validData() >= 4) {
renderThreadData->insert(
@@ -472,7 +472,7 @@
if (tInfo.m_vkInfo) {
tInfo.m_vkInfo->ctx_id = mContextId;
VkDecoderContext context = {
- .processName = processName,
+ .processName = contextName,
.gfxApiLogger = &gfxLogger,
.healthMonitor = FrameBuffer::getFB()->getHealthMonitor(),
.metricsLogger = &metricsLogger,