diff --git a/system/vulkan_enc/VkEncoder.cpp b/system/vulkan_enc/VkEncoder.cpp
index eaeb08f..874d248 100644
--- a/system/vulkan_enc/VkEncoder.cpp
+++ b/system/vulkan_enc/VkEncoder.cpp
@@ -29,7 +29,7 @@
 #include "Resources.h"
 #include "ResourceTracker.h"
 #include "Validation.h"
-#include "VulkanStream.h"
+#include "VulkanStreamGuest.h"
 
 #include "android/base/AlignedBuf.h"
 #include "android/base/Pool.h"
@@ -63,7 +63,7 @@
         }
     }
     VulkanCountingStream* countingStream() { return &m_countingStream; }
-    VulkanStream* stream() { return &m_stream; }
+    VulkanStreamGuest* stream() { return &m_stream; }
     Pool* pool() { return &m_pool; }
     ResourceTracker* resources() { return ResourceTracker::get(); }
     Validation* validation() { return &m_validation; }
@@ -74,7 +74,7 @@
     }
 private:
     VulkanCountingStream m_countingStream;
-    VulkanStream m_stream;
+    VulkanStreamGuest m_stream;
     Pool m_pool { 8, 4096, 64 };
 
     Validation m_validation;
@@ -98,6 +98,7 @@
     const VkAllocationCallbacks* pAllocator,
     VkInstance* pInstance)
 {
+    AEMU_SCOPED_TRACE("vkCreateInstance encode");
     mImpl->log("start vkCreateInstance");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -159,11 +160,13 @@
     stream->handleMapping()->mapHandles_VkInstance_u64(pInstance, &cgen_var_3, 1);
     stream->write((uint64_t*)&cgen_var_3, 8);
     stream->setHandleMapping(resources->unwrapMapping());
+    AEMU_SCOPED_TRACE("vkCreateInstance readParams");
     stream->setHandleMapping(resources->createMapping());
     uint64_t cgen_var_4;
     stream->read((uint64_t*)&cgen_var_4, 8);
     stream->handleMapping()->mapHandles_u64_VkInstance(&cgen_var_4, (VkInstance*)pInstance, 1);
     stream->unsetHandleMapping();
+    AEMU_SCOPED_TRACE("vkCreateInstance returnUnmarshal");
     VkResult vkCreateInstance_VkResult_return = (VkResult)0;
     stream->read(&vkCreateInstance_VkResult_return, sizeof(VkResult));
     countingStream->clearPool();
@@ -178,6 +181,7 @@
     VkInstance instance,
     const VkAllocationCallbacks* pAllocator)
 {
+    AEMU_SCOPED_TRACE("vkDestroyInstance encode");
     mImpl->log("start vkDestroyInstance");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -226,6 +230,8 @@
     {
         marshal_VkAllocationCallbacks(stream, (VkAllocationCallbacks*)(local_pAllocator));
     }
+    AEMU_SCOPED_TRACE("vkDestroyInstance readParams");
+    AEMU_SCOPED_TRACE("vkDestroyInstance returnUnmarshal");
     resources->destroyMapping()->mapHandles_VkInstance((VkInstance*)&instance);
     mImpl->log("finish vkDestroyInstance");;
 }
@@ -235,6 +241,7 @@
     uint32_t* pPhysicalDeviceCount,
     VkPhysicalDevice* pPhysicalDevices)
 {
+    AEMU_SCOPED_TRACE("vkEnumeratePhysicalDevices encode");
     mImpl->log("start vkEnumeratePhysicalDevices");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -299,6 +306,7 @@
         }
     }
     stream->setHandleMapping(resources->unwrapMapping());
+    AEMU_SCOPED_TRACE("vkEnumeratePhysicalDevices readParams");
     // WARNING PTR CHECK
     uint32_t* check_pPhysicalDeviceCount;
     check_pPhysicalDeviceCount = (uint32_t*)(uintptr_t)stream->getBe64();
@@ -329,6 +337,7 @@
         }
     }
     stream->unsetHandleMapping();
+    AEMU_SCOPED_TRACE("vkEnumeratePhysicalDevices returnUnmarshal");
     VkResult vkEnumeratePhysicalDevices_VkResult_return = (VkResult)0;
     stream->read(&vkEnumeratePhysicalDevices_VkResult_return, sizeof(VkResult));
     countingStream->clearPool();
@@ -342,6 +351,7 @@
     VkPhysicalDevice physicalDevice,
     VkPhysicalDeviceFeatures* pFeatures)
 {
+    AEMU_SCOPED_TRACE("vkGetPhysicalDeviceFeatures encode");
     mImpl->log("start vkGetPhysicalDeviceFeatures");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -366,11 +376,13 @@
     stream->handleMapping()->mapHandles_VkPhysicalDevice_u64(&local_physicalDevice, &cgen_var_21, 1);
     stream->write((uint64_t*)&cgen_var_21, 1 * 8);
     marshal_VkPhysicalDeviceFeatures(stream, (VkPhysicalDeviceFeatures*)(pFeatures));
+    AEMU_SCOPED_TRACE("vkGetPhysicalDeviceFeatures readParams");
     unmarshal_VkPhysicalDeviceFeatures(stream, (VkPhysicalDeviceFeatures*)(pFeatures));
     if (pFeatures)
     {
         transform_fromhost_VkPhysicalDeviceFeatures(mImpl->resources(), (VkPhysicalDeviceFeatures*)(pFeatures));
     }
+    AEMU_SCOPED_TRACE("vkGetPhysicalDeviceFeatures returnUnmarshal");
     mImpl->log("finish vkGetPhysicalDeviceFeatures");;
 }
 
@@ -379,6 +391,7 @@
     VkFormat format,
     VkFormatProperties* pFormatProperties)
 {
+    AEMU_SCOPED_TRACE("vkGetPhysicalDeviceFormatProperties encode");
     mImpl->log("start vkGetPhysicalDeviceFormatProperties");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -407,11 +420,13 @@
     stream->write((uint64_t*)&cgen_var_23, 1 * 8);
     stream->write((VkFormat*)&local_format, sizeof(VkFormat));
     marshal_VkFormatProperties(stream, (VkFormatProperties*)(pFormatProperties));
+    AEMU_SCOPED_TRACE("vkGetPhysicalDeviceFormatProperties readParams");
     unmarshal_VkFormatProperties(stream, (VkFormatProperties*)(pFormatProperties));
     if (pFormatProperties)
     {
         transform_fromhost_VkFormatProperties(mImpl->resources(), (VkFormatProperties*)(pFormatProperties));
     }
+    AEMU_SCOPED_TRACE("vkGetPhysicalDeviceFormatProperties returnUnmarshal");
     mImpl->log("finish vkGetPhysicalDeviceFormatProperties");;
 }
 
@@ -424,6 +439,7 @@
     VkImageCreateFlags flags,
     VkImageFormatProperties* pImageFormatProperties)
 {
+    AEMU_SCOPED_TRACE("vkGetPhysicalDeviceImageFormatProperties encode");
     mImpl->log("start vkGetPhysicalDeviceImageFormatProperties");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -468,11 +484,13 @@
     stream->write((VkImageUsageFlags*)&local_usage, sizeof(VkImageUsageFlags));
     stream->write((VkImageCreateFlags*)&local_flags, sizeof(VkImageCreateFlags));
     marshal_VkImageFormatProperties(stream, (VkImageFormatProperties*)(pImageFormatProperties));
+    AEMU_SCOPED_TRACE("vkGetPhysicalDeviceImageFormatProperties readParams");
     unmarshal_VkImageFormatProperties(stream, (VkImageFormatProperties*)(pImageFormatProperties));
     if (pImageFormatProperties)
     {
         transform_fromhost_VkImageFormatProperties(mImpl->resources(), (VkImageFormatProperties*)(pImageFormatProperties));
     }
+    AEMU_SCOPED_TRACE("vkGetPhysicalDeviceImageFormatProperties returnUnmarshal");
     VkResult vkGetPhysicalDeviceImageFormatProperties_VkResult_return = (VkResult)0;
     stream->read(&vkGetPhysicalDeviceImageFormatProperties_VkResult_return, sizeof(VkResult));
     countingStream->clearPool();
@@ -486,6 +504,7 @@
     VkPhysicalDevice physicalDevice,
     VkPhysicalDeviceProperties* pProperties)
 {
+    AEMU_SCOPED_TRACE("vkGetPhysicalDeviceProperties encode");
     mImpl->log("start vkGetPhysicalDeviceProperties");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -510,11 +529,13 @@
     stream->handleMapping()->mapHandles_VkPhysicalDevice_u64(&local_physicalDevice, &cgen_var_27, 1);
     stream->write((uint64_t*)&cgen_var_27, 1 * 8);
     marshal_VkPhysicalDeviceProperties(stream, (VkPhysicalDeviceProperties*)(pProperties));
+    AEMU_SCOPED_TRACE("vkGetPhysicalDeviceProperties readParams");
     unmarshal_VkPhysicalDeviceProperties(stream, (VkPhysicalDeviceProperties*)(pProperties));
     if (pProperties)
     {
         transform_fromhost_VkPhysicalDeviceProperties(mImpl->resources(), (VkPhysicalDeviceProperties*)(pProperties));
     }
+    AEMU_SCOPED_TRACE("vkGetPhysicalDeviceProperties returnUnmarshal");
     mImpl->log("finish vkGetPhysicalDeviceProperties");;
 }
 
@@ -523,6 +544,7 @@
     uint32_t* pQueueFamilyPropertyCount,
     VkQueueFamilyProperties* pQueueFamilyProperties)
 {
+    AEMU_SCOPED_TRACE("vkGetPhysicalDeviceQueueFamilyProperties encode");
     mImpl->log("start vkGetPhysicalDeviceQueueFamilyProperties");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -579,6 +601,7 @@
             marshal_VkQueueFamilyProperties(stream, (VkQueueFamilyProperties*)(pQueueFamilyProperties + i));
         }
     }
+    AEMU_SCOPED_TRACE("vkGetPhysicalDeviceQueueFamilyProperties readParams");
     // WARNING PTR CHECK
     uint32_t* check_pQueueFamilyPropertyCount;
     check_pQueueFamilyPropertyCount = (uint32_t*)(uintptr_t)stream->getBe64();
@@ -611,6 +634,7 @@
             transform_fromhost_VkQueueFamilyProperties(mImpl->resources(), (VkQueueFamilyProperties*)(pQueueFamilyProperties + i));
         }
     }
+    AEMU_SCOPED_TRACE("vkGetPhysicalDeviceQueueFamilyProperties returnUnmarshal");
     mImpl->log("finish vkGetPhysicalDeviceQueueFamilyProperties");;
 }
 
@@ -618,6 +642,7 @@
     VkPhysicalDevice physicalDevice,
     VkPhysicalDeviceMemoryProperties* pMemoryProperties)
 {
+    AEMU_SCOPED_TRACE("vkGetPhysicalDeviceMemoryProperties encode");
     mImpl->log("start vkGetPhysicalDeviceMemoryProperties");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -642,11 +667,13 @@
     stream->handleMapping()->mapHandles_VkPhysicalDevice_u64(&local_physicalDevice, &cgen_var_37, 1);
     stream->write((uint64_t*)&cgen_var_37, 1 * 8);
     marshal_VkPhysicalDeviceMemoryProperties(stream, (VkPhysicalDeviceMemoryProperties*)(pMemoryProperties));
+    AEMU_SCOPED_TRACE("vkGetPhysicalDeviceMemoryProperties readParams");
     unmarshal_VkPhysicalDeviceMemoryProperties(stream, (VkPhysicalDeviceMemoryProperties*)(pMemoryProperties));
     if (pMemoryProperties)
     {
         transform_fromhost_VkPhysicalDeviceMemoryProperties(mImpl->resources(), (VkPhysicalDeviceMemoryProperties*)(pMemoryProperties));
     }
+    AEMU_SCOPED_TRACE("vkGetPhysicalDeviceMemoryProperties returnUnmarshal");
     mImpl->resources()->on_vkGetPhysicalDeviceMemoryProperties(this, physicalDevice, pMemoryProperties);
     mImpl->log("finish vkGetPhysicalDeviceMemoryProperties");;
 }
@@ -655,6 +682,7 @@
     VkInstance instance,
     const char* pName)
 {
+    AEMU_SCOPED_TRACE("vkGetInstanceProcAddr encode");
     mImpl->log("start vkGetInstanceProcAddr");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -685,6 +713,8 @@
     stream->handleMapping()->mapHandles_VkInstance_u64(&local_instance, &cgen_var_39, 1);
     stream->write((uint64_t*)&cgen_var_39, 1 * 8);
     stream->putString(local_pName);
+    AEMU_SCOPED_TRACE("vkGetInstanceProcAddr readParams");
+    AEMU_SCOPED_TRACE("vkGetInstanceProcAddr returnUnmarshal");
     PFN_vkVoidFunction vkGetInstanceProcAddr_PFN_vkVoidFunction_return = (PFN_vkVoidFunction)0;
     stream->read(&vkGetInstanceProcAddr_PFN_vkVoidFunction_return, sizeof(PFN_vkVoidFunction));
     countingStream->clearPool();
@@ -698,6 +728,7 @@
     VkDevice device,
     const char* pName)
 {
+    AEMU_SCOPED_TRACE("vkGetDeviceProcAddr encode");
     mImpl->log("start vkGetDeviceProcAddr");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -728,6 +759,8 @@
     stream->handleMapping()->mapHandles_VkDevice_u64(&local_device, &cgen_var_41, 1);
     stream->write((uint64_t*)&cgen_var_41, 1 * 8);
     stream->putString(local_pName);
+    AEMU_SCOPED_TRACE("vkGetDeviceProcAddr readParams");
+    AEMU_SCOPED_TRACE("vkGetDeviceProcAddr returnUnmarshal");
     PFN_vkVoidFunction vkGetDeviceProcAddr_PFN_vkVoidFunction_return = (PFN_vkVoidFunction)0;
     stream->read(&vkGetDeviceProcAddr_PFN_vkVoidFunction_return, sizeof(PFN_vkVoidFunction));
     countingStream->clearPool();
@@ -743,6 +776,7 @@
     const VkAllocationCallbacks* pAllocator,
     VkDevice* pDevice)
 {
+    AEMU_SCOPED_TRACE("vkCreateDevice encode");
     mImpl->log("start vkCreateDevice");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -812,11 +846,13 @@
     stream->handleMapping()->mapHandles_VkDevice_u64(pDevice, &cgen_var_47, 1);
     stream->write((uint64_t*)&cgen_var_47, 8);
     stream->setHandleMapping(resources->unwrapMapping());
+    AEMU_SCOPED_TRACE("vkCreateDevice readParams");
     stream->setHandleMapping(resources->createMapping());
     uint64_t cgen_var_48;
     stream->read((uint64_t*)&cgen_var_48, 8);
     stream->handleMapping()->mapHandles_u64_VkDevice(&cgen_var_48, (VkDevice*)pDevice, 1);
     stream->unsetHandleMapping();
+    AEMU_SCOPED_TRACE("vkCreateDevice returnUnmarshal");
     VkResult vkCreateDevice_VkResult_return = (VkResult)0;
     stream->read(&vkCreateDevice_VkResult_return, sizeof(VkResult));
     countingStream->clearPool();
@@ -831,6 +867,7 @@
     VkDevice device,
     const VkAllocationCallbacks* pAllocator)
 {
+    AEMU_SCOPED_TRACE("vkDestroyDevice encode");
     mImpl->log("start vkDestroyDevice");
     mImpl->resources()->on_vkDestroyDevice_pre(this, device, pAllocator);
     auto stream = mImpl->stream();
@@ -880,6 +917,8 @@
     {
         marshal_VkAllocationCallbacks(stream, (VkAllocationCallbacks*)(local_pAllocator));
     }
+    AEMU_SCOPED_TRACE("vkDestroyDevice readParams");
+    AEMU_SCOPED_TRACE("vkDestroyDevice returnUnmarshal");
     resources->destroyMapping()->mapHandles_VkDevice((VkDevice*)&device);
     stream->flush();
     mImpl->log("finish vkDestroyDevice");;
@@ -890,6 +929,7 @@
     uint32_t* pPropertyCount,
     VkExtensionProperties* pProperties)
 {
+    AEMU_SCOPED_TRACE("vkEnumerateInstanceExtensionProperties encode");
     mImpl->log("start vkEnumerateInstanceExtensionProperties");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -946,6 +986,7 @@
             marshal_VkExtensionProperties(stream, (VkExtensionProperties*)(pProperties + i));
         }
     }
+    AEMU_SCOPED_TRACE("vkEnumerateInstanceExtensionProperties readParams");
     // WARNING PTR CHECK
     uint32_t* check_pPropertyCount;
     check_pPropertyCount = (uint32_t*)(uintptr_t)stream->getBe64();
@@ -978,6 +1019,7 @@
             transform_fromhost_VkExtensionProperties(mImpl->resources(), (VkExtensionProperties*)(pProperties + i));
         }
     }
+    AEMU_SCOPED_TRACE("vkEnumerateInstanceExtensionProperties returnUnmarshal");
     VkResult vkEnumerateInstanceExtensionProperties_VkResult_return = (VkResult)0;
     stream->read(&vkEnumerateInstanceExtensionProperties_VkResult_return, sizeof(VkResult));
     countingStream->clearPool();
@@ -993,6 +1035,7 @@
     uint32_t* pPropertyCount,
     VkExtensionProperties* pProperties)
 {
+    AEMU_SCOPED_TRACE("vkEnumerateDeviceExtensionProperties encode");
     mImpl->log("start vkEnumerateDeviceExtensionProperties");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -1057,6 +1100,7 @@
             marshal_VkExtensionProperties(stream, (VkExtensionProperties*)(pProperties + i));
         }
     }
+    AEMU_SCOPED_TRACE("vkEnumerateDeviceExtensionProperties readParams");
     // WARNING PTR CHECK
     uint32_t* check_pPropertyCount;
     check_pPropertyCount = (uint32_t*)(uintptr_t)stream->getBe64();
@@ -1089,6 +1133,7 @@
             transform_fromhost_VkExtensionProperties(mImpl->resources(), (VkExtensionProperties*)(pProperties + i));
         }
     }
+    AEMU_SCOPED_TRACE("vkEnumerateDeviceExtensionProperties returnUnmarshal");
     VkResult vkEnumerateDeviceExtensionProperties_VkResult_return = (VkResult)0;
     stream->read(&vkEnumerateDeviceExtensionProperties_VkResult_return, sizeof(VkResult));
     countingStream->clearPool();
@@ -1102,6 +1147,7 @@
     uint32_t* pPropertyCount,
     VkLayerProperties* pProperties)
 {
+    AEMU_SCOPED_TRACE("vkEnumerateInstanceLayerProperties encode");
     mImpl->log("start vkEnumerateInstanceLayerProperties");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -1150,6 +1196,7 @@
             marshal_VkLayerProperties(stream, (VkLayerProperties*)(pProperties + i));
         }
     }
+    AEMU_SCOPED_TRACE("vkEnumerateInstanceLayerProperties readParams");
     // WARNING PTR CHECK
     uint32_t* check_pPropertyCount;
     check_pPropertyCount = (uint32_t*)(uintptr_t)stream->getBe64();
@@ -1182,6 +1229,7 @@
             transform_fromhost_VkLayerProperties(mImpl->resources(), (VkLayerProperties*)(pProperties + i));
         }
     }
+    AEMU_SCOPED_TRACE("vkEnumerateInstanceLayerProperties returnUnmarshal");
     VkResult vkEnumerateInstanceLayerProperties_VkResult_return = (VkResult)0;
     stream->read(&vkEnumerateInstanceLayerProperties_VkResult_return, sizeof(VkResult));
     countingStream->clearPool();
@@ -1196,6 +1244,7 @@
     uint32_t* pPropertyCount,
     VkLayerProperties* pProperties)
 {
+    AEMU_SCOPED_TRACE("vkEnumerateDeviceLayerProperties encode");
     mImpl->log("start vkEnumerateDeviceLayerProperties");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -1252,6 +1301,7 @@
             marshal_VkLayerProperties(stream, (VkLayerProperties*)(pProperties + i));
         }
     }
+    AEMU_SCOPED_TRACE("vkEnumerateDeviceLayerProperties readParams");
     // WARNING PTR CHECK
     uint32_t* check_pPropertyCount;
     check_pPropertyCount = (uint32_t*)(uintptr_t)stream->getBe64();
@@ -1284,6 +1334,7 @@
             transform_fromhost_VkLayerProperties(mImpl->resources(), (VkLayerProperties*)(pProperties + i));
         }
     }
+    AEMU_SCOPED_TRACE("vkEnumerateDeviceLayerProperties returnUnmarshal");
     VkResult vkEnumerateDeviceLayerProperties_VkResult_return = (VkResult)0;
     stream->read(&vkEnumerateDeviceLayerProperties_VkResult_return, sizeof(VkResult));
     countingStream->clearPool();
@@ -1299,6 +1350,7 @@
     uint32_t queueIndex,
     VkQueue* pQueue)
 {
+    AEMU_SCOPED_TRACE("vkGetDeviceQueue encode");
     mImpl->log("start vkGetDeviceQueue");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -1337,11 +1389,13 @@
     stream->handleMapping()->mapHandles_VkQueue_u64(pQueue, &cgen_var_84, 1);
     stream->write((uint64_t*)&cgen_var_84, 8);
     stream->setHandleMapping(resources->unwrapMapping());
+    AEMU_SCOPED_TRACE("vkGetDeviceQueue readParams");
     stream->setHandleMapping(resources->createMapping());
     uint64_t cgen_var_85;
     stream->read((uint64_t*)&cgen_var_85, 8);
     stream->handleMapping()->mapHandles_u64_VkQueue(&cgen_var_85, (VkQueue*)pQueue, 1);
     stream->unsetHandleMapping();
+    AEMU_SCOPED_TRACE("vkGetDeviceQueue returnUnmarshal");
     mImpl->log("finish vkGetDeviceQueue");;
 }
 
@@ -1351,6 +1405,7 @@
     const VkSubmitInfo* pSubmits,
     VkFence fence)
 {
+    AEMU_SCOPED_TRACE("vkQueueSubmit encode");
     mImpl->log("start vkQueueSubmit");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -1411,6 +1466,8 @@
     uint64_t cgen_var_89;
     stream->handleMapping()->mapHandles_VkFence_u64(&local_fence, &cgen_var_89, 1);
     stream->write((uint64_t*)&cgen_var_89, 1 * 8);
+    AEMU_SCOPED_TRACE("vkQueueSubmit readParams");
+    AEMU_SCOPED_TRACE("vkQueueSubmit returnUnmarshal");
     VkResult vkQueueSubmit_VkResult_return = (VkResult)0;
     stream->read(&vkQueueSubmit_VkResult_return, sizeof(VkResult));
     countingStream->clearPool();
@@ -1423,6 +1480,7 @@
 VkResult VkEncoder::vkQueueWaitIdle(
     VkQueue queue)
 {
+    AEMU_SCOPED_TRACE("vkQueueWaitIdle encode");
     mImpl->log("start vkQueueWaitIdle");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -1445,6 +1503,8 @@
     uint64_t cgen_var_91;
     stream->handleMapping()->mapHandles_VkQueue_u64(&local_queue, &cgen_var_91, 1);
     stream->write((uint64_t*)&cgen_var_91, 1 * 8);
+    AEMU_SCOPED_TRACE("vkQueueWaitIdle readParams");
+    AEMU_SCOPED_TRACE("vkQueueWaitIdle returnUnmarshal");
     VkResult vkQueueWaitIdle_VkResult_return = (VkResult)0;
     stream->read(&vkQueueWaitIdle_VkResult_return, sizeof(VkResult));
     countingStream->clearPool();
@@ -1457,6 +1517,7 @@
 VkResult VkEncoder::vkDeviceWaitIdle(
     VkDevice device)
 {
+    AEMU_SCOPED_TRACE("vkDeviceWaitIdle encode");
     mImpl->log("start vkDeviceWaitIdle");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -1479,6 +1540,8 @@
     uint64_t cgen_var_93;
     stream->handleMapping()->mapHandles_VkDevice_u64(&local_device, &cgen_var_93, 1);
     stream->write((uint64_t*)&cgen_var_93, 1 * 8);
+    AEMU_SCOPED_TRACE("vkDeviceWaitIdle readParams");
+    AEMU_SCOPED_TRACE("vkDeviceWaitIdle returnUnmarshal");
     VkResult vkDeviceWaitIdle_VkResult_return = (VkResult)0;
     stream->read(&vkDeviceWaitIdle_VkResult_return, sizeof(VkResult));
     countingStream->clearPool();
@@ -1494,6 +1557,7 @@
     const VkAllocationCallbacks* pAllocator,
     VkDeviceMemory* pMemory)
 {
+    AEMU_SCOPED_TRACE("vkAllocateMemory encode");
     mImpl->log("start vkAllocateMemory");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -1563,11 +1627,13 @@
     stream->handleMapping()->mapHandles_VkDeviceMemory_u64(pMemory, &cgen_var_99, 1);
     stream->write((uint64_t*)&cgen_var_99, 8);
     stream->setHandleMapping(resources->unwrapMapping());
+    AEMU_SCOPED_TRACE("vkAllocateMemory readParams");
     stream->setHandleMapping(resources->createMapping());
     uint64_t cgen_var_100;
     stream->read((uint64_t*)&cgen_var_100, 8);
     stream->handleMapping()->mapHandles_u64_VkDeviceMemory(&cgen_var_100, (VkDeviceMemory*)pMemory, 1);
     stream->unsetHandleMapping();
+    AEMU_SCOPED_TRACE("vkAllocateMemory returnUnmarshal");
     VkResult vkAllocateMemory_VkResult_return = (VkResult)0;
     stream->read(&vkAllocateMemory_VkResult_return, sizeof(VkResult));
     countingStream->clearPool();
@@ -1582,6 +1648,7 @@
     VkDeviceMemory memory,
     const VkAllocationCallbacks* pAllocator)
 {
+    AEMU_SCOPED_TRACE("vkFreeMemory encode");
     mImpl->log("start vkFreeMemory");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -1635,6 +1702,8 @@
     {
         marshal_VkAllocationCallbacks(stream, (VkAllocationCallbacks*)(local_pAllocator));
     }
+    AEMU_SCOPED_TRACE("vkFreeMemory readParams");
+    AEMU_SCOPED_TRACE("vkFreeMemory returnUnmarshal");
     resources->destroyMapping()->mapHandles_VkDeviceMemory((VkDeviceMemory*)&memory);
     mImpl->log("finish vkFreeMemory");;
 }
@@ -1647,6 +1716,7 @@
     VkMemoryMapFlags flags,
     void** ppData)
 {
+    AEMU_SCOPED_TRACE("vkMapMemory resourceEvent");
     VkResult vkMapMemory_VkResult_return = (VkResult)0;
     vkMapMemory_VkResult_return = mImpl->resources()->on_vkMapMemory(this, VK_SUCCESS, device, memory, offset, size, flags, ppData);
     mImpl->log("finish vkMapMemory");;
@@ -1657,6 +1727,7 @@
     VkDevice device,
     VkDeviceMemory memory)
 {
+    AEMU_SCOPED_TRACE("vkUnmapMemory resourceEvent");
     mImpl->resources()->on_vkUnmapMemory(this, device, memory);
 }
 
@@ -1665,6 +1736,7 @@
     uint32_t memoryRangeCount,
     const VkMappedMemoryRange* pMemoryRanges)
 {
+    AEMU_SCOPED_TRACE("vkFlushMappedMemoryRanges encode");
     mImpl->log("start vkFlushMappedMemoryRanges");
     VALIDATE_RET(VkResult, VK_SUCCESS, mImpl->validation()->on_vkFlushMappedMemoryRanges(this, VK_SUCCESS, device, memoryRangeCount, pMemoryRanges));
     auto stream = mImpl->stream();
@@ -1755,6 +1827,8 @@
             stream->write(targetRange, actualSize);
         }
     }
+    AEMU_SCOPED_TRACE("vkFlushMappedMemoryRanges readParams");
+    AEMU_SCOPED_TRACE("vkFlushMappedMemoryRanges returnUnmarshal");
     VkResult vkFlushMappedMemoryRanges_VkResult_return = (VkResult)0;
     stream->read(&vkFlushMappedMemoryRanges_VkResult_return, sizeof(VkResult));
     countingStream->clearPool();
@@ -1769,6 +1843,7 @@
     uint32_t memoryRangeCount,
     const VkMappedMemoryRange* pMemoryRanges)
 {
+    AEMU_SCOPED_TRACE("vkInvalidateMappedMemoryRanges encode");
     mImpl->log("start vkInvalidateMappedMemoryRanges");
     VALIDATE_RET(VkResult, VK_SUCCESS, mImpl->validation()->on_vkInvalidateMappedMemoryRanges(this, VK_SUCCESS, device, memoryRangeCount, pMemoryRanges));
     auto stream = mImpl->stream();
@@ -1821,6 +1896,8 @@
     {
         marshal_VkMappedMemoryRange(stream, (VkMappedMemoryRange*)(local_pMemoryRanges + i));
     }
+    AEMU_SCOPED_TRACE("vkInvalidateMappedMemoryRanges readParams");
+    AEMU_SCOPED_TRACE("vkInvalidateMappedMemoryRanges returnUnmarshal");
     VkResult vkInvalidateMappedMemoryRanges_VkResult_return = (VkResult)0;
     stream->read(&vkInvalidateMappedMemoryRanges_VkResult_return, sizeof(VkResult));
     countingStream->clearPool();
@@ -1854,6 +1931,7 @@
     VkDeviceMemory memory,
     VkDeviceSize* pCommittedMemoryInBytes)
 {
+    AEMU_SCOPED_TRACE("vkGetDeviceMemoryCommitment encode");
     mImpl->log("start vkGetDeviceMemoryCommitment");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -1887,7 +1965,9 @@
     stream->handleMapping()->mapHandles_VkDeviceMemory_u64(&local_memory, &cgen_var_114, 1);
     stream->write((uint64_t*)&cgen_var_114, 1 * 8);
     stream->write((VkDeviceSize*)pCommittedMemoryInBytes, sizeof(VkDeviceSize));
+    AEMU_SCOPED_TRACE("vkGetDeviceMemoryCommitment readParams");
     stream->read((VkDeviceSize*)pCommittedMemoryInBytes, sizeof(VkDeviceSize));
+    AEMU_SCOPED_TRACE("vkGetDeviceMemoryCommitment returnUnmarshal");
     mImpl->log("finish vkGetDeviceMemoryCommitment");;
 }
 
@@ -1897,6 +1977,7 @@
     VkDeviceMemory memory,
     VkDeviceSize memoryOffset)
 {
+    AEMU_SCOPED_TRACE("vkBindBufferMemory encode");
     mImpl->log("start vkBindBufferMemory");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -1940,6 +2021,8 @@
     stream->handleMapping()->mapHandles_VkDeviceMemory_u64(&local_memory, &cgen_var_120, 1);
     stream->write((uint64_t*)&cgen_var_120, 1 * 8);
     stream->write((VkDeviceSize*)&local_memoryOffset, sizeof(VkDeviceSize));
+    AEMU_SCOPED_TRACE("vkBindBufferMemory readParams");
+    AEMU_SCOPED_TRACE("vkBindBufferMemory returnUnmarshal");
     VkResult vkBindBufferMemory_VkResult_return = (VkResult)0;
     stream->read(&vkBindBufferMemory_VkResult_return, sizeof(VkResult));
     countingStream->clearPool();
@@ -1955,6 +2038,7 @@
     VkDeviceMemory memory,
     VkDeviceSize memoryOffset)
 {
+    AEMU_SCOPED_TRACE("vkBindImageMemory encode");
     mImpl->log("start vkBindImageMemory");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -1998,6 +2082,8 @@
     stream->handleMapping()->mapHandles_VkDeviceMemory_u64(&local_memory, &cgen_var_126, 1);
     stream->write((uint64_t*)&cgen_var_126, 1 * 8);
     stream->write((VkDeviceSize*)&local_memoryOffset, sizeof(VkDeviceSize));
+    AEMU_SCOPED_TRACE("vkBindImageMemory readParams");
+    AEMU_SCOPED_TRACE("vkBindImageMemory returnUnmarshal");
     VkResult vkBindImageMemory_VkResult_return = (VkResult)0;
     stream->read(&vkBindImageMemory_VkResult_return, sizeof(VkResult));
     countingStream->clearPool();
@@ -2012,6 +2098,7 @@
     VkBuffer buffer,
     VkMemoryRequirements* pMemoryRequirements)
 {
+    AEMU_SCOPED_TRACE("vkGetBufferMemoryRequirements encode");
     mImpl->log("start vkGetBufferMemoryRequirements");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -2044,11 +2131,13 @@
     stream->handleMapping()->mapHandles_VkBuffer_u64(&local_buffer, &cgen_var_130, 1);
     stream->write((uint64_t*)&cgen_var_130, 1 * 8);
     marshal_VkMemoryRequirements(stream, (VkMemoryRequirements*)(pMemoryRequirements));
+    AEMU_SCOPED_TRACE("vkGetBufferMemoryRequirements readParams");
     unmarshal_VkMemoryRequirements(stream, (VkMemoryRequirements*)(pMemoryRequirements));
     if (pMemoryRequirements)
     {
         transform_fromhost_VkMemoryRequirements(mImpl->resources(), (VkMemoryRequirements*)(pMemoryRequirements));
     }
+    AEMU_SCOPED_TRACE("vkGetBufferMemoryRequirements returnUnmarshal");
     mImpl->log("finish vkGetBufferMemoryRequirements");;
 }
 
@@ -2057,6 +2146,7 @@
     VkImage image,
     VkMemoryRequirements* pMemoryRequirements)
 {
+    AEMU_SCOPED_TRACE("vkGetImageMemoryRequirements encode");
     mImpl->log("start vkGetImageMemoryRequirements");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -2089,11 +2179,13 @@
     stream->handleMapping()->mapHandles_VkImage_u64(&local_image, &cgen_var_134, 1);
     stream->write((uint64_t*)&cgen_var_134, 1 * 8);
     marshal_VkMemoryRequirements(stream, (VkMemoryRequirements*)(pMemoryRequirements));
+    AEMU_SCOPED_TRACE("vkGetImageMemoryRequirements readParams");
     unmarshal_VkMemoryRequirements(stream, (VkMemoryRequirements*)(pMemoryRequirements));
     if (pMemoryRequirements)
     {
         transform_fromhost_VkMemoryRequirements(mImpl->resources(), (VkMemoryRequirements*)(pMemoryRequirements));
     }
+    AEMU_SCOPED_TRACE("vkGetImageMemoryRequirements returnUnmarshal");
     mImpl->log("finish vkGetImageMemoryRequirements");;
 }
 
@@ -2103,6 +2195,7 @@
     uint32_t* pSparseMemoryRequirementCount,
     VkSparseImageMemoryRequirements* pSparseMemoryRequirements)
 {
+    AEMU_SCOPED_TRACE("vkGetImageSparseMemoryRequirements encode");
     mImpl->log("start vkGetImageSparseMemoryRequirements");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -2167,6 +2260,7 @@
             marshal_VkSparseImageMemoryRequirements(stream, (VkSparseImageMemoryRequirements*)(pSparseMemoryRequirements + i));
         }
     }
+    AEMU_SCOPED_TRACE("vkGetImageSparseMemoryRequirements readParams");
     // WARNING PTR CHECK
     uint32_t* check_pSparseMemoryRequirementCount;
     check_pSparseMemoryRequirementCount = (uint32_t*)(uintptr_t)stream->getBe64();
@@ -2199,6 +2293,7 @@
             transform_fromhost_VkSparseImageMemoryRequirements(mImpl->resources(), (VkSparseImageMemoryRequirements*)(pSparseMemoryRequirements + i));
         }
     }
+    AEMU_SCOPED_TRACE("vkGetImageSparseMemoryRequirements returnUnmarshal");
     mImpl->log("finish vkGetImageSparseMemoryRequirements");;
 }
 
@@ -2212,6 +2307,7 @@
     uint32_t* pPropertyCount,
     VkSparseImageFormatProperties* pProperties)
 {
+    AEMU_SCOPED_TRACE("vkGetPhysicalDeviceSparseImageFormatProperties encode");
     mImpl->log("start vkGetPhysicalDeviceSparseImageFormatProperties");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -2288,6 +2384,7 @@
             marshal_VkSparseImageFormatProperties(stream, (VkSparseImageFormatProperties*)(pProperties + i));
         }
     }
+    AEMU_SCOPED_TRACE("vkGetPhysicalDeviceSparseImageFormatProperties readParams");
     // WARNING PTR CHECK
     uint32_t* check_pPropertyCount;
     check_pPropertyCount = (uint32_t*)(uintptr_t)stream->getBe64();
@@ -2320,6 +2417,7 @@
             transform_fromhost_VkSparseImageFormatProperties(mImpl->resources(), (VkSparseImageFormatProperties*)(pProperties + i));
         }
     }
+    AEMU_SCOPED_TRACE("vkGetPhysicalDeviceSparseImageFormatProperties returnUnmarshal");
     mImpl->log("finish vkGetPhysicalDeviceSparseImageFormatProperties");;
 }
 
@@ -2329,6 +2427,7 @@
     const VkBindSparseInfo* pBindInfo,
     VkFence fence)
 {
+    AEMU_SCOPED_TRACE("vkQueueBindSparse encode");
     mImpl->log("start vkQueueBindSparse");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -2388,6 +2487,8 @@
     uint64_t cgen_var_156;
     stream->handleMapping()->mapHandles_VkFence_u64(&local_fence, &cgen_var_156, 1);
     stream->write((uint64_t*)&cgen_var_156, 1 * 8);
+    AEMU_SCOPED_TRACE("vkQueueBindSparse readParams");
+    AEMU_SCOPED_TRACE("vkQueueBindSparse returnUnmarshal");
     VkResult vkQueueBindSparse_VkResult_return = (VkResult)0;
     stream->read(&vkQueueBindSparse_VkResult_return, sizeof(VkResult));
     countingStream->clearPool();
@@ -2403,6 +2504,7 @@
     const VkAllocationCallbacks* pAllocator,
     VkFence* pFence)
 {
+    AEMU_SCOPED_TRACE("vkCreateFence encode");
     mImpl->log("start vkCreateFence");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -2472,11 +2574,13 @@
     stream->handleMapping()->mapHandles_VkFence_u64(pFence, &cgen_var_162, 1);
     stream->write((uint64_t*)&cgen_var_162, 8);
     stream->setHandleMapping(resources->unwrapMapping());
+    AEMU_SCOPED_TRACE("vkCreateFence readParams");
     stream->setHandleMapping(resources->createMapping());
     uint64_t cgen_var_163;
     stream->read((uint64_t*)&cgen_var_163, 8);
     stream->handleMapping()->mapHandles_u64_VkFence(&cgen_var_163, (VkFence*)pFence, 1);
     stream->unsetHandleMapping();
+    AEMU_SCOPED_TRACE("vkCreateFence returnUnmarshal");
     VkResult vkCreateFence_VkResult_return = (VkResult)0;
     stream->read(&vkCreateFence_VkResult_return, sizeof(VkResult));
     countingStream->clearPool();
@@ -2491,6 +2595,7 @@
     VkFence fence,
     const VkAllocationCallbacks* pAllocator)
 {
+    AEMU_SCOPED_TRACE("vkDestroyFence encode");
     mImpl->log("start vkDestroyFence");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -2547,6 +2652,8 @@
     {
         marshal_VkAllocationCallbacks(stream, (VkAllocationCallbacks*)(local_pAllocator));
     }
+    AEMU_SCOPED_TRACE("vkDestroyFence readParams");
+    AEMU_SCOPED_TRACE("vkDestroyFence returnUnmarshal");
     resources->destroyMapping()->mapHandles_VkFence((VkFence*)&fence);
     mImpl->log("finish vkDestroyFence");;
 }
@@ -2556,6 +2663,7 @@
     uint32_t fenceCount,
     const VkFence* pFences)
 {
+    AEMU_SCOPED_TRACE("vkResetFences encode");
     mImpl->log("start vkResetFences");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -2602,6 +2710,8 @@
         stream->handleMapping()->mapHandles_VkFence_u64(local_pFences, cgen_var_173, ((fenceCount)));
         stream->write((uint64_t*)cgen_var_173, ((fenceCount)) * 8);
     }
+    AEMU_SCOPED_TRACE("vkResetFences readParams");
+    AEMU_SCOPED_TRACE("vkResetFences returnUnmarshal");
     VkResult vkResetFences_VkResult_return = (VkResult)0;
     stream->read(&vkResetFences_VkResult_return, sizeof(VkResult));
     countingStream->clearPool();
@@ -2615,6 +2725,7 @@
     VkDevice device,
     VkFence fence)
 {
+    AEMU_SCOPED_TRACE("vkGetFenceStatus encode");
     mImpl->log("start vkGetFenceStatus");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -2645,6 +2756,8 @@
     uint64_t cgen_var_177;
     stream->handleMapping()->mapHandles_VkFence_u64(&local_fence, &cgen_var_177, 1);
     stream->write((uint64_t*)&cgen_var_177, 1 * 8);
+    AEMU_SCOPED_TRACE("vkGetFenceStatus readParams");
+    AEMU_SCOPED_TRACE("vkGetFenceStatus returnUnmarshal");
     VkResult vkGetFenceStatus_VkResult_return = (VkResult)0;
     stream->read(&vkGetFenceStatus_VkResult_return, sizeof(VkResult));
     countingStream->clearPool();
@@ -2661,6 +2774,7 @@
     VkBool32 waitAll,
     uint64_t timeout)
 {
+    AEMU_SCOPED_TRACE("vkWaitForFences encode");
     mImpl->log("start vkWaitForFences");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -2715,6 +2829,8 @@
     }
     stream->write((VkBool32*)&local_waitAll, sizeof(VkBool32));
     stream->write((uint64_t*)&local_timeout, sizeof(uint64_t));
+    AEMU_SCOPED_TRACE("vkWaitForFences readParams");
+    AEMU_SCOPED_TRACE("vkWaitForFences returnUnmarshal");
     VkResult vkWaitForFences_VkResult_return = (VkResult)0;
     stream->read(&vkWaitForFences_VkResult_return, sizeof(VkResult));
     countingStream->clearPool();
@@ -2730,6 +2846,7 @@
     const VkAllocationCallbacks* pAllocator,
     VkSemaphore* pSemaphore)
 {
+    AEMU_SCOPED_TRACE("vkCreateSemaphore encode");
     mImpl->log("start vkCreateSemaphore");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -2799,11 +2916,13 @@
     stream->handleMapping()->mapHandles_VkSemaphore_u64(pSemaphore, &cgen_var_187, 1);
     stream->write((uint64_t*)&cgen_var_187, 8);
     stream->setHandleMapping(resources->unwrapMapping());
+    AEMU_SCOPED_TRACE("vkCreateSemaphore readParams");
     stream->setHandleMapping(resources->createMapping());
     uint64_t cgen_var_188;
     stream->read((uint64_t*)&cgen_var_188, 8);
     stream->handleMapping()->mapHandles_u64_VkSemaphore(&cgen_var_188, (VkSemaphore*)pSemaphore, 1);
     stream->unsetHandleMapping();
+    AEMU_SCOPED_TRACE("vkCreateSemaphore returnUnmarshal");
     VkResult vkCreateSemaphore_VkResult_return = (VkResult)0;
     stream->read(&vkCreateSemaphore_VkResult_return, sizeof(VkResult));
     countingStream->clearPool();
@@ -2818,6 +2937,7 @@
     VkSemaphore semaphore,
     const VkAllocationCallbacks* pAllocator)
 {
+    AEMU_SCOPED_TRACE("vkDestroySemaphore encode");
     mImpl->log("start vkDestroySemaphore");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -2874,6 +2994,8 @@
     {
         marshal_VkAllocationCallbacks(stream, (VkAllocationCallbacks*)(local_pAllocator));
     }
+    AEMU_SCOPED_TRACE("vkDestroySemaphore readParams");
+    AEMU_SCOPED_TRACE("vkDestroySemaphore returnUnmarshal");
     resources->destroyMapping()->mapHandles_VkSemaphore((VkSemaphore*)&semaphore);
     mImpl->log("finish vkDestroySemaphore");;
 }
@@ -2884,6 +3006,7 @@
     const VkAllocationCallbacks* pAllocator,
     VkEvent* pEvent)
 {
+    AEMU_SCOPED_TRACE("vkCreateEvent encode");
     mImpl->log("start vkCreateEvent");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -2953,11 +3076,13 @@
     stream->handleMapping()->mapHandles_VkEvent_u64(pEvent, &cgen_var_200, 1);
     stream->write((uint64_t*)&cgen_var_200, 8);
     stream->setHandleMapping(resources->unwrapMapping());
+    AEMU_SCOPED_TRACE("vkCreateEvent readParams");
     stream->setHandleMapping(resources->createMapping());
     uint64_t cgen_var_201;
     stream->read((uint64_t*)&cgen_var_201, 8);
     stream->handleMapping()->mapHandles_u64_VkEvent(&cgen_var_201, (VkEvent*)pEvent, 1);
     stream->unsetHandleMapping();
+    AEMU_SCOPED_TRACE("vkCreateEvent returnUnmarshal");
     VkResult vkCreateEvent_VkResult_return = (VkResult)0;
     stream->read(&vkCreateEvent_VkResult_return, sizeof(VkResult));
     countingStream->clearPool();
@@ -2972,6 +3097,7 @@
     VkEvent event,
     const VkAllocationCallbacks* pAllocator)
 {
+    AEMU_SCOPED_TRACE("vkDestroyEvent encode");
     mImpl->log("start vkDestroyEvent");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -3028,6 +3154,8 @@
     {
         marshal_VkAllocationCallbacks(stream, (VkAllocationCallbacks*)(local_pAllocator));
     }
+    AEMU_SCOPED_TRACE("vkDestroyEvent readParams");
+    AEMU_SCOPED_TRACE("vkDestroyEvent returnUnmarshal");
     resources->destroyMapping()->mapHandles_VkEvent((VkEvent*)&event);
     mImpl->log("finish vkDestroyEvent");;
 }
@@ -3036,6 +3164,7 @@
     VkDevice device,
     VkEvent event)
 {
+    AEMU_SCOPED_TRACE("vkGetEventStatus encode");
     mImpl->log("start vkGetEventStatus");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -3066,6 +3195,8 @@
     uint64_t cgen_var_211;
     stream->handleMapping()->mapHandles_VkEvent_u64(&local_event, &cgen_var_211, 1);
     stream->write((uint64_t*)&cgen_var_211, 1 * 8);
+    AEMU_SCOPED_TRACE("vkGetEventStatus readParams");
+    AEMU_SCOPED_TRACE("vkGetEventStatus returnUnmarshal");
     VkResult vkGetEventStatus_VkResult_return = (VkResult)0;
     stream->read(&vkGetEventStatus_VkResult_return, sizeof(VkResult));
     countingStream->clearPool();
@@ -3079,6 +3210,7 @@
     VkDevice device,
     VkEvent event)
 {
+    AEMU_SCOPED_TRACE("vkSetEvent encode");
     mImpl->log("start vkSetEvent");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -3109,6 +3241,8 @@
     uint64_t cgen_var_215;
     stream->handleMapping()->mapHandles_VkEvent_u64(&local_event, &cgen_var_215, 1);
     stream->write((uint64_t*)&cgen_var_215, 1 * 8);
+    AEMU_SCOPED_TRACE("vkSetEvent readParams");
+    AEMU_SCOPED_TRACE("vkSetEvent returnUnmarshal");
     VkResult vkSetEvent_VkResult_return = (VkResult)0;
     stream->read(&vkSetEvent_VkResult_return, sizeof(VkResult));
     countingStream->clearPool();
@@ -3122,6 +3256,7 @@
     VkDevice device,
     VkEvent event)
 {
+    AEMU_SCOPED_TRACE("vkResetEvent encode");
     mImpl->log("start vkResetEvent");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -3152,6 +3287,8 @@
     uint64_t cgen_var_219;
     stream->handleMapping()->mapHandles_VkEvent_u64(&local_event, &cgen_var_219, 1);
     stream->write((uint64_t*)&cgen_var_219, 1 * 8);
+    AEMU_SCOPED_TRACE("vkResetEvent readParams");
+    AEMU_SCOPED_TRACE("vkResetEvent returnUnmarshal");
     VkResult vkResetEvent_VkResult_return = (VkResult)0;
     stream->read(&vkResetEvent_VkResult_return, sizeof(VkResult));
     countingStream->clearPool();
@@ -3167,6 +3304,7 @@
     const VkAllocationCallbacks* pAllocator,
     VkQueryPool* pQueryPool)
 {
+    AEMU_SCOPED_TRACE("vkCreateQueryPool encode");
     mImpl->log("start vkCreateQueryPool");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -3236,11 +3374,13 @@
     stream->handleMapping()->mapHandles_VkQueryPool_u64(pQueryPool, &cgen_var_225, 1);
     stream->write((uint64_t*)&cgen_var_225, 8);
     stream->setHandleMapping(resources->unwrapMapping());
+    AEMU_SCOPED_TRACE("vkCreateQueryPool readParams");
     stream->setHandleMapping(resources->createMapping());
     uint64_t cgen_var_226;
     stream->read((uint64_t*)&cgen_var_226, 8);
     stream->handleMapping()->mapHandles_u64_VkQueryPool(&cgen_var_226, (VkQueryPool*)pQueryPool, 1);
     stream->unsetHandleMapping();
+    AEMU_SCOPED_TRACE("vkCreateQueryPool returnUnmarshal");
     VkResult vkCreateQueryPool_VkResult_return = (VkResult)0;
     stream->read(&vkCreateQueryPool_VkResult_return, sizeof(VkResult));
     countingStream->clearPool();
@@ -3255,6 +3395,7 @@
     VkQueryPool queryPool,
     const VkAllocationCallbacks* pAllocator)
 {
+    AEMU_SCOPED_TRACE("vkDestroyQueryPool encode");
     mImpl->log("start vkDestroyQueryPool");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -3311,6 +3452,8 @@
     {
         marshal_VkAllocationCallbacks(stream, (VkAllocationCallbacks*)(local_pAllocator));
     }
+    AEMU_SCOPED_TRACE("vkDestroyQueryPool readParams");
+    AEMU_SCOPED_TRACE("vkDestroyQueryPool returnUnmarshal");
     resources->destroyMapping()->mapHandles_VkQueryPool((VkQueryPool*)&queryPool);
     mImpl->log("finish vkDestroyQueryPool");;
 }
@@ -3325,6 +3468,7 @@
     VkDeviceSize stride,
     VkQueryResultFlags flags)
 {
+    AEMU_SCOPED_TRACE("vkGetQueryPoolResults encode");
     mImpl->log("start vkGetQueryPoolResults");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -3379,7 +3523,9 @@
     stream->write((void*)pData, ((dataSize)) * sizeof(uint8_t));
     stream->write((VkDeviceSize*)&local_stride, sizeof(VkDeviceSize));
     stream->write((VkQueryResultFlags*)&local_flags, sizeof(VkQueryResultFlags));
+    AEMU_SCOPED_TRACE("vkGetQueryPoolResults readParams");
     stream->read((void*)pData, ((dataSize)) * sizeof(uint8_t));
+    AEMU_SCOPED_TRACE("vkGetQueryPoolResults returnUnmarshal");
     VkResult vkGetQueryPoolResults_VkResult_return = (VkResult)0;
     stream->read(&vkGetQueryPoolResults_VkResult_return, sizeof(VkResult));
     countingStream->clearPool();
@@ -3395,6 +3541,7 @@
     const VkAllocationCallbacks* pAllocator,
     VkBuffer* pBuffer)
 {
+    AEMU_SCOPED_TRACE("vkCreateBuffer encode");
     mImpl->log("start vkCreateBuffer");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -3464,11 +3611,13 @@
     stream->handleMapping()->mapHandles_VkBuffer_u64(pBuffer, &cgen_var_244, 1);
     stream->write((uint64_t*)&cgen_var_244, 8);
     stream->setHandleMapping(resources->unwrapMapping());
+    AEMU_SCOPED_TRACE("vkCreateBuffer readParams");
     stream->setHandleMapping(resources->createMapping());
     uint64_t cgen_var_245;
     stream->read((uint64_t*)&cgen_var_245, 8);
     stream->handleMapping()->mapHandles_u64_VkBuffer(&cgen_var_245, (VkBuffer*)pBuffer, 1);
     stream->unsetHandleMapping();
+    AEMU_SCOPED_TRACE("vkCreateBuffer returnUnmarshal");
     VkResult vkCreateBuffer_VkResult_return = (VkResult)0;
     stream->read(&vkCreateBuffer_VkResult_return, sizeof(VkResult));
     countingStream->clearPool();
@@ -3483,6 +3632,7 @@
     VkBuffer buffer,
     const VkAllocationCallbacks* pAllocator)
 {
+    AEMU_SCOPED_TRACE("vkDestroyBuffer encode");
     mImpl->log("start vkDestroyBuffer");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -3539,6 +3689,8 @@
     {
         marshal_VkAllocationCallbacks(stream, (VkAllocationCallbacks*)(local_pAllocator));
     }
+    AEMU_SCOPED_TRACE("vkDestroyBuffer readParams");
+    AEMU_SCOPED_TRACE("vkDestroyBuffer returnUnmarshal");
     resources->destroyMapping()->mapHandles_VkBuffer((VkBuffer*)&buffer);
     mImpl->log("finish vkDestroyBuffer");;
 }
@@ -3549,6 +3701,7 @@
     const VkAllocationCallbacks* pAllocator,
     VkBufferView* pView)
 {
+    AEMU_SCOPED_TRACE("vkCreateBufferView encode");
     mImpl->log("start vkCreateBufferView");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -3618,11 +3771,13 @@
     stream->handleMapping()->mapHandles_VkBufferView_u64(pView, &cgen_var_257, 1);
     stream->write((uint64_t*)&cgen_var_257, 8);
     stream->setHandleMapping(resources->unwrapMapping());
+    AEMU_SCOPED_TRACE("vkCreateBufferView readParams");
     stream->setHandleMapping(resources->createMapping());
     uint64_t cgen_var_258;
     stream->read((uint64_t*)&cgen_var_258, 8);
     stream->handleMapping()->mapHandles_u64_VkBufferView(&cgen_var_258, (VkBufferView*)pView, 1);
     stream->unsetHandleMapping();
+    AEMU_SCOPED_TRACE("vkCreateBufferView returnUnmarshal");
     VkResult vkCreateBufferView_VkResult_return = (VkResult)0;
     stream->read(&vkCreateBufferView_VkResult_return, sizeof(VkResult));
     countingStream->clearPool();
@@ -3637,6 +3792,7 @@
     VkBufferView bufferView,
     const VkAllocationCallbacks* pAllocator)
 {
+    AEMU_SCOPED_TRACE("vkDestroyBufferView encode");
     mImpl->log("start vkDestroyBufferView");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -3693,6 +3849,8 @@
     {
         marshal_VkAllocationCallbacks(stream, (VkAllocationCallbacks*)(local_pAllocator));
     }
+    AEMU_SCOPED_TRACE("vkDestroyBufferView readParams");
+    AEMU_SCOPED_TRACE("vkDestroyBufferView returnUnmarshal");
     resources->destroyMapping()->mapHandles_VkBufferView((VkBufferView*)&bufferView);
     mImpl->log("finish vkDestroyBufferView");;
 }
@@ -3703,6 +3861,7 @@
     const VkAllocationCallbacks* pAllocator,
     VkImage* pImage)
 {
+    AEMU_SCOPED_TRACE("vkCreateImage encode");
     mImpl->log("start vkCreateImage");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -3773,11 +3932,13 @@
     stream->handleMapping()->mapHandles_VkImage_u64(pImage, &cgen_var_270, 1);
     stream->write((uint64_t*)&cgen_var_270, 8);
     stream->setHandleMapping(resources->unwrapMapping());
+    AEMU_SCOPED_TRACE("vkCreateImage readParams");
     stream->setHandleMapping(resources->createMapping());
     uint64_t cgen_var_271;
     stream->read((uint64_t*)&cgen_var_271, 8);
     stream->handleMapping()->mapHandles_u64_VkImage(&cgen_var_271, (VkImage*)pImage, 1);
     stream->unsetHandleMapping();
+    AEMU_SCOPED_TRACE("vkCreateImage returnUnmarshal");
     VkResult vkCreateImage_VkResult_return = (VkResult)0;
     stream->read(&vkCreateImage_VkResult_return, sizeof(VkResult));
     countingStream->clearPool();
@@ -3792,6 +3953,7 @@
     VkImage image,
     const VkAllocationCallbacks* pAllocator)
 {
+    AEMU_SCOPED_TRACE("vkDestroyImage encode");
     mImpl->log("start vkDestroyImage");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -3848,6 +4010,8 @@
     {
         marshal_VkAllocationCallbacks(stream, (VkAllocationCallbacks*)(local_pAllocator));
     }
+    AEMU_SCOPED_TRACE("vkDestroyImage readParams");
+    AEMU_SCOPED_TRACE("vkDestroyImage returnUnmarshal");
     resources->destroyMapping()->mapHandles_VkImage((VkImage*)&image);
     mImpl->log("finish vkDestroyImage");;
 }
@@ -3858,6 +4022,7 @@
     const VkImageSubresource* pSubresource,
     VkSubresourceLayout* pLayout)
 {
+    AEMU_SCOPED_TRACE("vkGetImageSubresourceLayout encode");
     mImpl->log("start vkGetImageSubresourceLayout");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -3903,11 +4068,13 @@
     stream->write((uint64_t*)&cgen_var_281, 1 * 8);
     marshal_VkImageSubresource(stream, (VkImageSubresource*)(local_pSubresource));
     marshal_VkSubresourceLayout(stream, (VkSubresourceLayout*)(pLayout));
+    AEMU_SCOPED_TRACE("vkGetImageSubresourceLayout readParams");
     unmarshal_VkSubresourceLayout(stream, (VkSubresourceLayout*)(pLayout));
     if (pLayout)
     {
         transform_fromhost_VkSubresourceLayout(mImpl->resources(), (VkSubresourceLayout*)(pLayout));
     }
+    AEMU_SCOPED_TRACE("vkGetImageSubresourceLayout returnUnmarshal");
     mImpl->log("finish vkGetImageSubresourceLayout");;
 }
 
@@ -3917,6 +4084,7 @@
     const VkAllocationCallbacks* pAllocator,
     VkImageView* pView)
 {
+    AEMU_SCOPED_TRACE("vkCreateImageView encode");
     mImpl->log("start vkCreateImageView");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -3986,11 +4154,13 @@
     stream->handleMapping()->mapHandles_VkImageView_u64(pView, &cgen_var_287, 1);
     stream->write((uint64_t*)&cgen_var_287, 8);
     stream->setHandleMapping(resources->unwrapMapping());
+    AEMU_SCOPED_TRACE("vkCreateImageView readParams");
     stream->setHandleMapping(resources->createMapping());
     uint64_t cgen_var_288;
     stream->read((uint64_t*)&cgen_var_288, 8);
     stream->handleMapping()->mapHandles_u64_VkImageView(&cgen_var_288, (VkImageView*)pView, 1);
     stream->unsetHandleMapping();
+    AEMU_SCOPED_TRACE("vkCreateImageView returnUnmarshal");
     VkResult vkCreateImageView_VkResult_return = (VkResult)0;
     stream->read(&vkCreateImageView_VkResult_return, sizeof(VkResult));
     countingStream->clearPool();
@@ -4005,6 +4175,7 @@
     VkImageView imageView,
     const VkAllocationCallbacks* pAllocator)
 {
+    AEMU_SCOPED_TRACE("vkDestroyImageView encode");
     mImpl->log("start vkDestroyImageView");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -4061,6 +4232,8 @@
     {
         marshal_VkAllocationCallbacks(stream, (VkAllocationCallbacks*)(local_pAllocator));
     }
+    AEMU_SCOPED_TRACE("vkDestroyImageView readParams");
+    AEMU_SCOPED_TRACE("vkDestroyImageView returnUnmarshal");
     resources->destroyMapping()->mapHandles_VkImageView((VkImageView*)&imageView);
     mImpl->log("finish vkDestroyImageView");;
 }
@@ -4071,6 +4244,7 @@
     const VkAllocationCallbacks* pAllocator,
     VkShaderModule* pShaderModule)
 {
+    AEMU_SCOPED_TRACE("vkCreateShaderModule encode");
     mImpl->log("start vkCreateShaderModule");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -4140,11 +4314,13 @@
     stream->handleMapping()->mapHandles_VkShaderModule_u64(pShaderModule, &cgen_var_300, 1);
     stream->write((uint64_t*)&cgen_var_300, 8);
     stream->setHandleMapping(resources->unwrapMapping());
+    AEMU_SCOPED_TRACE("vkCreateShaderModule readParams");
     stream->setHandleMapping(resources->createMapping());
     uint64_t cgen_var_301;
     stream->read((uint64_t*)&cgen_var_301, 8);
     stream->handleMapping()->mapHandles_u64_VkShaderModule(&cgen_var_301, (VkShaderModule*)pShaderModule, 1);
     stream->unsetHandleMapping();
+    AEMU_SCOPED_TRACE("vkCreateShaderModule returnUnmarshal");
     VkResult vkCreateShaderModule_VkResult_return = (VkResult)0;
     stream->read(&vkCreateShaderModule_VkResult_return, sizeof(VkResult));
     countingStream->clearPool();
@@ -4159,6 +4335,7 @@
     VkShaderModule shaderModule,
     const VkAllocationCallbacks* pAllocator)
 {
+    AEMU_SCOPED_TRACE("vkDestroyShaderModule encode");
     mImpl->log("start vkDestroyShaderModule");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -4215,6 +4392,8 @@
     {
         marshal_VkAllocationCallbacks(stream, (VkAllocationCallbacks*)(local_pAllocator));
     }
+    AEMU_SCOPED_TRACE("vkDestroyShaderModule readParams");
+    AEMU_SCOPED_TRACE("vkDestroyShaderModule returnUnmarshal");
     resources->destroyMapping()->mapHandles_VkShaderModule((VkShaderModule*)&shaderModule);
     mImpl->log("finish vkDestroyShaderModule");;
 }
@@ -4225,6 +4404,7 @@
     const VkAllocationCallbacks* pAllocator,
     VkPipelineCache* pPipelineCache)
 {
+    AEMU_SCOPED_TRACE("vkCreatePipelineCache encode");
     mImpl->log("start vkCreatePipelineCache");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -4294,11 +4474,13 @@
     stream->handleMapping()->mapHandles_VkPipelineCache_u64(pPipelineCache, &cgen_var_313, 1);
     stream->write((uint64_t*)&cgen_var_313, 8);
     stream->setHandleMapping(resources->unwrapMapping());
+    AEMU_SCOPED_TRACE("vkCreatePipelineCache readParams");
     stream->setHandleMapping(resources->createMapping());
     uint64_t cgen_var_314;
     stream->read((uint64_t*)&cgen_var_314, 8);
     stream->handleMapping()->mapHandles_u64_VkPipelineCache(&cgen_var_314, (VkPipelineCache*)pPipelineCache, 1);
     stream->unsetHandleMapping();
+    AEMU_SCOPED_TRACE("vkCreatePipelineCache returnUnmarshal");
     VkResult vkCreatePipelineCache_VkResult_return = (VkResult)0;
     stream->read(&vkCreatePipelineCache_VkResult_return, sizeof(VkResult));
     countingStream->clearPool();
@@ -4313,6 +4495,7 @@
     VkPipelineCache pipelineCache,
     const VkAllocationCallbacks* pAllocator)
 {
+    AEMU_SCOPED_TRACE("vkDestroyPipelineCache encode");
     mImpl->log("start vkDestroyPipelineCache");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -4369,6 +4552,8 @@
     {
         marshal_VkAllocationCallbacks(stream, (VkAllocationCallbacks*)(local_pAllocator));
     }
+    AEMU_SCOPED_TRACE("vkDestroyPipelineCache readParams");
+    AEMU_SCOPED_TRACE("vkDestroyPipelineCache returnUnmarshal");
     resources->destroyMapping()->mapHandles_VkPipelineCache((VkPipelineCache*)&pipelineCache);
     mImpl->log("finish vkDestroyPipelineCache");;
 }
@@ -4379,6 +4564,7 @@
     size_t* pDataSize,
     void* pData)
 {
+    AEMU_SCOPED_TRACE("vkGetPipelineCacheData encode");
     mImpl->log("start vkGetPipelineCacheData");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -4439,6 +4625,7 @@
     {
         stream->write((void*)pData, (*(pDataSize)) * sizeof(uint8_t));
     }
+    AEMU_SCOPED_TRACE("vkGetPipelineCacheData readParams");
     // WARNING PTR CHECK
     size_t* check_pDataSize;
     check_pDataSize = (size_t*)(uintptr_t)stream->getBe64();
@@ -4461,6 +4648,7 @@
         }
         stream->read((void*)pData, (*(pDataSize)) * sizeof(uint8_t));
     }
+    AEMU_SCOPED_TRACE("vkGetPipelineCacheData returnUnmarshal");
     VkResult vkGetPipelineCacheData_VkResult_return = (VkResult)0;
     stream->read(&vkGetPipelineCacheData_VkResult_return, sizeof(VkResult));
     countingStream->clearPool();
@@ -4476,6 +4664,7 @@
     uint32_t srcCacheCount,
     const VkPipelineCache* pSrcCaches)
 {
+    AEMU_SCOPED_TRACE("vkMergePipelineCaches encode");
     mImpl->log("start vkMergePipelineCaches");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -4530,6 +4719,8 @@
         stream->handleMapping()->mapHandles_VkPipelineCache_u64(local_pSrcCaches, cgen_var_339, ((srcCacheCount)));
         stream->write((uint64_t*)cgen_var_339, ((srcCacheCount)) * 8);
     }
+    AEMU_SCOPED_TRACE("vkMergePipelineCaches readParams");
+    AEMU_SCOPED_TRACE("vkMergePipelineCaches returnUnmarshal");
     VkResult vkMergePipelineCaches_VkResult_return = (VkResult)0;
     stream->read(&vkMergePipelineCaches_VkResult_return, sizeof(VkResult));
     countingStream->clearPool();
@@ -4547,6 +4738,7 @@
     const VkAllocationCallbacks* pAllocator,
     VkPipeline* pPipelines)
 {
+    AEMU_SCOPED_TRACE("vkCreateGraphicsPipelines encode");
     mImpl->log("start vkCreateGraphicsPipelines");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -4648,6 +4840,7 @@
         stream->write((uint64_t*)cgen_var_347, ((createInfoCount)) * 8);
     }
     stream->setHandleMapping(resources->unwrapMapping());
+    AEMU_SCOPED_TRACE("vkCreateGraphicsPipelines readParams");
     stream->setHandleMapping(resources->createMapping());
     if (((createInfoCount)))
     {
@@ -4657,6 +4850,7 @@
         stream->handleMapping()->mapHandles_u64_VkPipeline(cgen_var_348, (VkPipeline*)pPipelines, ((createInfoCount)));
     }
     stream->unsetHandleMapping();
+    AEMU_SCOPED_TRACE("vkCreateGraphicsPipelines returnUnmarshal");
     VkResult vkCreateGraphicsPipelines_VkResult_return = (VkResult)0;
     stream->read(&vkCreateGraphicsPipelines_VkResult_return, sizeof(VkResult));
     countingStream->clearPool();
@@ -4674,6 +4868,7 @@
     const VkAllocationCallbacks* pAllocator,
     VkPipeline* pPipelines)
 {
+    AEMU_SCOPED_TRACE("vkCreateComputePipelines encode");
     mImpl->log("start vkCreateComputePipelines");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -4775,6 +4970,7 @@
         stream->write((uint64_t*)cgen_var_356, ((createInfoCount)) * 8);
     }
     stream->setHandleMapping(resources->unwrapMapping());
+    AEMU_SCOPED_TRACE("vkCreateComputePipelines readParams");
     stream->setHandleMapping(resources->createMapping());
     if (((createInfoCount)))
     {
@@ -4784,6 +4980,7 @@
         stream->handleMapping()->mapHandles_u64_VkPipeline(cgen_var_357, (VkPipeline*)pPipelines, ((createInfoCount)));
     }
     stream->unsetHandleMapping();
+    AEMU_SCOPED_TRACE("vkCreateComputePipelines returnUnmarshal");
     VkResult vkCreateComputePipelines_VkResult_return = (VkResult)0;
     stream->read(&vkCreateComputePipelines_VkResult_return, sizeof(VkResult));
     countingStream->clearPool();
@@ -4798,6 +4995,7 @@
     VkPipeline pipeline,
     const VkAllocationCallbacks* pAllocator)
 {
+    AEMU_SCOPED_TRACE("vkDestroyPipeline encode");
     mImpl->log("start vkDestroyPipeline");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -4854,6 +5052,8 @@
     {
         marshal_VkAllocationCallbacks(stream, (VkAllocationCallbacks*)(local_pAllocator));
     }
+    AEMU_SCOPED_TRACE("vkDestroyPipeline readParams");
+    AEMU_SCOPED_TRACE("vkDestroyPipeline returnUnmarshal");
     resources->destroyMapping()->mapHandles_VkPipeline((VkPipeline*)&pipeline);
     mImpl->log("finish vkDestroyPipeline");;
 }
@@ -4864,6 +5064,7 @@
     const VkAllocationCallbacks* pAllocator,
     VkPipelineLayout* pPipelineLayout)
 {
+    AEMU_SCOPED_TRACE("vkCreatePipelineLayout encode");
     mImpl->log("start vkCreatePipelineLayout");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -4933,11 +5134,13 @@
     stream->handleMapping()->mapHandles_VkPipelineLayout_u64(pPipelineLayout, &cgen_var_369, 1);
     stream->write((uint64_t*)&cgen_var_369, 8);
     stream->setHandleMapping(resources->unwrapMapping());
+    AEMU_SCOPED_TRACE("vkCreatePipelineLayout readParams");
     stream->setHandleMapping(resources->createMapping());
     uint64_t cgen_var_370;
     stream->read((uint64_t*)&cgen_var_370, 8);
     stream->handleMapping()->mapHandles_u64_VkPipelineLayout(&cgen_var_370, (VkPipelineLayout*)pPipelineLayout, 1);
     stream->unsetHandleMapping();
+    AEMU_SCOPED_TRACE("vkCreatePipelineLayout returnUnmarshal");
     VkResult vkCreatePipelineLayout_VkResult_return = (VkResult)0;
     stream->read(&vkCreatePipelineLayout_VkResult_return, sizeof(VkResult));
     countingStream->clearPool();
@@ -4952,6 +5155,7 @@
     VkPipelineLayout pipelineLayout,
     const VkAllocationCallbacks* pAllocator)
 {
+    AEMU_SCOPED_TRACE("vkDestroyPipelineLayout encode");
     mImpl->log("start vkDestroyPipelineLayout");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -5008,6 +5212,8 @@
     {
         marshal_VkAllocationCallbacks(stream, (VkAllocationCallbacks*)(local_pAllocator));
     }
+    AEMU_SCOPED_TRACE("vkDestroyPipelineLayout readParams");
+    AEMU_SCOPED_TRACE("vkDestroyPipelineLayout returnUnmarshal");
     resources->destroyMapping()->mapHandles_VkPipelineLayout((VkPipelineLayout*)&pipelineLayout);
     mImpl->log("finish vkDestroyPipelineLayout");;
 }
@@ -5018,6 +5224,7 @@
     const VkAllocationCallbacks* pAllocator,
     VkSampler* pSampler)
 {
+    AEMU_SCOPED_TRACE("vkCreateSampler encode");
     mImpl->log("start vkCreateSampler");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -5087,11 +5294,13 @@
     stream->handleMapping()->mapHandles_VkSampler_u64(pSampler, &cgen_var_382, 1);
     stream->write((uint64_t*)&cgen_var_382, 8);
     stream->setHandleMapping(resources->unwrapMapping());
+    AEMU_SCOPED_TRACE("vkCreateSampler readParams");
     stream->setHandleMapping(resources->createMapping());
     uint64_t cgen_var_383;
     stream->read((uint64_t*)&cgen_var_383, 8);
     stream->handleMapping()->mapHandles_u64_VkSampler(&cgen_var_383, (VkSampler*)pSampler, 1);
     stream->unsetHandleMapping();
+    AEMU_SCOPED_TRACE("vkCreateSampler returnUnmarshal");
     VkResult vkCreateSampler_VkResult_return = (VkResult)0;
     stream->read(&vkCreateSampler_VkResult_return, sizeof(VkResult));
     countingStream->clearPool();
@@ -5106,6 +5315,7 @@
     VkSampler sampler,
     const VkAllocationCallbacks* pAllocator)
 {
+    AEMU_SCOPED_TRACE("vkDestroySampler encode");
     mImpl->log("start vkDestroySampler");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -5162,6 +5372,8 @@
     {
         marshal_VkAllocationCallbacks(stream, (VkAllocationCallbacks*)(local_pAllocator));
     }
+    AEMU_SCOPED_TRACE("vkDestroySampler readParams");
+    AEMU_SCOPED_TRACE("vkDestroySampler returnUnmarshal");
     resources->destroyMapping()->mapHandles_VkSampler((VkSampler*)&sampler);
     mImpl->log("finish vkDestroySampler");;
 }
@@ -5172,6 +5384,7 @@
     const VkAllocationCallbacks* pAllocator,
     VkDescriptorSetLayout* pSetLayout)
 {
+    AEMU_SCOPED_TRACE("vkCreateDescriptorSetLayout encode");
     mImpl->log("start vkCreateDescriptorSetLayout");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -5241,11 +5454,13 @@
     stream->handleMapping()->mapHandles_VkDescriptorSetLayout_u64(pSetLayout, &cgen_var_395, 1);
     stream->write((uint64_t*)&cgen_var_395, 8);
     stream->setHandleMapping(resources->unwrapMapping());
+    AEMU_SCOPED_TRACE("vkCreateDescriptorSetLayout readParams");
     stream->setHandleMapping(resources->createMapping());
     uint64_t cgen_var_396;
     stream->read((uint64_t*)&cgen_var_396, 8);
     stream->handleMapping()->mapHandles_u64_VkDescriptorSetLayout(&cgen_var_396, (VkDescriptorSetLayout*)pSetLayout, 1);
     stream->unsetHandleMapping();
+    AEMU_SCOPED_TRACE("vkCreateDescriptorSetLayout returnUnmarshal");
     VkResult vkCreateDescriptorSetLayout_VkResult_return = (VkResult)0;
     stream->read(&vkCreateDescriptorSetLayout_VkResult_return, sizeof(VkResult));
     countingStream->clearPool();
@@ -5260,6 +5475,7 @@
     VkDescriptorSetLayout descriptorSetLayout,
     const VkAllocationCallbacks* pAllocator)
 {
+    AEMU_SCOPED_TRACE("vkDestroyDescriptorSetLayout encode");
     mImpl->log("start vkDestroyDescriptorSetLayout");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -5316,6 +5532,8 @@
     {
         marshal_VkAllocationCallbacks(stream, (VkAllocationCallbacks*)(local_pAllocator));
     }
+    AEMU_SCOPED_TRACE("vkDestroyDescriptorSetLayout readParams");
+    AEMU_SCOPED_TRACE("vkDestroyDescriptorSetLayout returnUnmarshal");
     resources->destroyMapping()->mapHandles_VkDescriptorSetLayout((VkDescriptorSetLayout*)&descriptorSetLayout);
     mImpl->log("finish vkDestroyDescriptorSetLayout");;
 }
@@ -5326,6 +5544,7 @@
     const VkAllocationCallbacks* pAllocator,
     VkDescriptorPool* pDescriptorPool)
 {
+    AEMU_SCOPED_TRACE("vkCreateDescriptorPool encode");
     mImpl->log("start vkCreateDescriptorPool");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -5395,11 +5614,13 @@
     stream->handleMapping()->mapHandles_VkDescriptorPool_u64(pDescriptorPool, &cgen_var_408, 1);
     stream->write((uint64_t*)&cgen_var_408, 8);
     stream->setHandleMapping(resources->unwrapMapping());
+    AEMU_SCOPED_TRACE("vkCreateDescriptorPool readParams");
     stream->setHandleMapping(resources->createMapping());
     uint64_t cgen_var_409;
     stream->read((uint64_t*)&cgen_var_409, 8);
     stream->handleMapping()->mapHandles_u64_VkDescriptorPool(&cgen_var_409, (VkDescriptorPool*)pDescriptorPool, 1);
     stream->unsetHandleMapping();
+    AEMU_SCOPED_TRACE("vkCreateDescriptorPool returnUnmarshal");
     VkResult vkCreateDescriptorPool_VkResult_return = (VkResult)0;
     stream->read(&vkCreateDescriptorPool_VkResult_return, sizeof(VkResult));
     countingStream->clearPool();
@@ -5414,6 +5635,7 @@
     VkDescriptorPool descriptorPool,
     const VkAllocationCallbacks* pAllocator)
 {
+    AEMU_SCOPED_TRACE("vkDestroyDescriptorPool encode");
     mImpl->log("start vkDestroyDescriptorPool");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -5470,6 +5692,8 @@
     {
         marshal_VkAllocationCallbacks(stream, (VkAllocationCallbacks*)(local_pAllocator));
     }
+    AEMU_SCOPED_TRACE("vkDestroyDescriptorPool readParams");
+    AEMU_SCOPED_TRACE("vkDestroyDescriptorPool returnUnmarshal");
     resources->destroyMapping()->mapHandles_VkDescriptorPool((VkDescriptorPool*)&descriptorPool);
     mImpl->log("finish vkDestroyDescriptorPool");;
 }
@@ -5479,6 +5703,7 @@
     VkDescriptorPool descriptorPool,
     VkDescriptorPoolResetFlags flags)
 {
+    AEMU_SCOPED_TRACE("vkResetDescriptorPool encode");
     mImpl->log("start vkResetDescriptorPool");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -5513,6 +5738,8 @@
     stream->handleMapping()->mapHandles_VkDescriptorPool_u64(&local_descriptorPool, &cgen_var_419, 1);
     stream->write((uint64_t*)&cgen_var_419, 1 * 8);
     stream->write((VkDescriptorPoolResetFlags*)&local_flags, sizeof(VkDescriptorPoolResetFlags));
+    AEMU_SCOPED_TRACE("vkResetDescriptorPool readParams");
+    AEMU_SCOPED_TRACE("vkResetDescriptorPool returnUnmarshal");
     VkResult vkResetDescriptorPool_VkResult_return = (VkResult)0;
     stream->read(&vkResetDescriptorPool_VkResult_return, sizeof(VkResult));
     countingStream->clearPool();
@@ -5527,6 +5754,7 @@
     const VkDescriptorSetAllocateInfo* pAllocateInfo,
     VkDescriptorSet* pDescriptorSets)
 {
+    AEMU_SCOPED_TRACE("vkAllocateDescriptorSets encode");
     mImpl->log("start vkAllocateDescriptorSets");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -5578,6 +5806,7 @@
         stream->write((uint64_t*)cgen_var_423, pAllocateInfo->descriptorSetCount * 8);
     }
     stream->setHandleMapping(resources->unwrapMapping());
+    AEMU_SCOPED_TRACE("vkAllocateDescriptorSets readParams");
     stream->setHandleMapping(resources->createMapping());
     if (pAllocateInfo->descriptorSetCount)
     {
@@ -5587,6 +5816,7 @@
         stream->handleMapping()->mapHandles_u64_VkDescriptorSet(cgen_var_424, (VkDescriptorSet*)pDescriptorSets, pAllocateInfo->descriptorSetCount);
     }
     stream->unsetHandleMapping();
+    AEMU_SCOPED_TRACE("vkAllocateDescriptorSets returnUnmarshal");
     VkResult vkAllocateDescriptorSets_VkResult_return = (VkResult)0;
     stream->read(&vkAllocateDescriptorSets_VkResult_return, sizeof(VkResult));
     countingStream->clearPool();
@@ -5602,6 +5832,7 @@
     uint32_t descriptorSetCount,
     const VkDescriptorSet* pDescriptorSets)
 {
+    AEMU_SCOPED_TRACE("vkFreeDescriptorSets encode");
     mImpl->log("start vkFreeDescriptorSets");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -5668,6 +5899,8 @@
             stream->write((uint64_t*)cgen_var_432, ((descriptorSetCount)) * 8);
         }
     }
+    AEMU_SCOPED_TRACE("vkFreeDescriptorSets readParams");
+    AEMU_SCOPED_TRACE("vkFreeDescriptorSets returnUnmarshal");
     VkResult vkFreeDescriptorSets_VkResult_return = (VkResult)0;
     stream->read(&vkFreeDescriptorSets_VkResult_return, sizeof(VkResult));
     countingStream->clearPool();
@@ -5688,6 +5921,7 @@
     uint32_t descriptorCopyCount,
     const VkCopyDescriptorSet* pDescriptorCopies)
 {
+    AEMU_SCOPED_TRACE("vkUpdateDescriptorSets encode");
     mImpl->log("start vkUpdateDescriptorSets");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -5768,6 +6002,8 @@
     {
         marshal_VkCopyDescriptorSet(stream, (VkCopyDescriptorSet*)(local_pDescriptorCopies + i));
     }
+    AEMU_SCOPED_TRACE("vkUpdateDescriptorSets readParams");
+    AEMU_SCOPED_TRACE("vkUpdateDescriptorSets returnUnmarshal");
     mImpl->log("finish vkUpdateDescriptorSets");;
 }
 
@@ -5777,6 +6013,7 @@
     const VkAllocationCallbacks* pAllocator,
     VkFramebuffer* pFramebuffer)
 {
+    AEMU_SCOPED_TRACE("vkCreateFramebuffer encode");
     mImpl->log("start vkCreateFramebuffer");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -5846,11 +6083,13 @@
     stream->handleMapping()->mapHandles_VkFramebuffer_u64(pFramebuffer, &cgen_var_440, 1);
     stream->write((uint64_t*)&cgen_var_440, 8);
     stream->setHandleMapping(resources->unwrapMapping());
+    AEMU_SCOPED_TRACE("vkCreateFramebuffer readParams");
     stream->setHandleMapping(resources->createMapping());
     uint64_t cgen_var_441;
     stream->read((uint64_t*)&cgen_var_441, 8);
     stream->handleMapping()->mapHandles_u64_VkFramebuffer(&cgen_var_441, (VkFramebuffer*)pFramebuffer, 1);
     stream->unsetHandleMapping();
+    AEMU_SCOPED_TRACE("vkCreateFramebuffer returnUnmarshal");
     VkResult vkCreateFramebuffer_VkResult_return = (VkResult)0;
     stream->read(&vkCreateFramebuffer_VkResult_return, sizeof(VkResult));
     countingStream->clearPool();
@@ -5865,6 +6104,7 @@
     VkFramebuffer framebuffer,
     const VkAllocationCallbacks* pAllocator)
 {
+    AEMU_SCOPED_TRACE("vkDestroyFramebuffer encode");
     mImpl->log("start vkDestroyFramebuffer");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -5921,6 +6161,8 @@
     {
         marshal_VkAllocationCallbacks(stream, (VkAllocationCallbacks*)(local_pAllocator));
     }
+    AEMU_SCOPED_TRACE("vkDestroyFramebuffer readParams");
+    AEMU_SCOPED_TRACE("vkDestroyFramebuffer returnUnmarshal");
     resources->destroyMapping()->mapHandles_VkFramebuffer((VkFramebuffer*)&framebuffer);
     mImpl->log("finish vkDestroyFramebuffer");;
 }
@@ -5931,6 +6173,7 @@
     const VkAllocationCallbacks* pAllocator,
     VkRenderPass* pRenderPass)
 {
+    AEMU_SCOPED_TRACE("vkCreateRenderPass encode");
     mImpl->log("start vkCreateRenderPass");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -6000,11 +6243,13 @@
     stream->handleMapping()->mapHandles_VkRenderPass_u64(pRenderPass, &cgen_var_453, 1);
     stream->write((uint64_t*)&cgen_var_453, 8);
     stream->setHandleMapping(resources->unwrapMapping());
+    AEMU_SCOPED_TRACE("vkCreateRenderPass readParams");
     stream->setHandleMapping(resources->createMapping());
     uint64_t cgen_var_454;
     stream->read((uint64_t*)&cgen_var_454, 8);
     stream->handleMapping()->mapHandles_u64_VkRenderPass(&cgen_var_454, (VkRenderPass*)pRenderPass, 1);
     stream->unsetHandleMapping();
+    AEMU_SCOPED_TRACE("vkCreateRenderPass returnUnmarshal");
     VkResult vkCreateRenderPass_VkResult_return = (VkResult)0;
     stream->read(&vkCreateRenderPass_VkResult_return, sizeof(VkResult));
     countingStream->clearPool();
@@ -6019,6 +6264,7 @@
     VkRenderPass renderPass,
     const VkAllocationCallbacks* pAllocator)
 {
+    AEMU_SCOPED_TRACE("vkDestroyRenderPass encode");
     mImpl->log("start vkDestroyRenderPass");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -6075,6 +6321,8 @@
     {
         marshal_VkAllocationCallbacks(stream, (VkAllocationCallbacks*)(local_pAllocator));
     }
+    AEMU_SCOPED_TRACE("vkDestroyRenderPass readParams");
+    AEMU_SCOPED_TRACE("vkDestroyRenderPass returnUnmarshal");
     resources->destroyMapping()->mapHandles_VkRenderPass((VkRenderPass*)&renderPass);
     mImpl->log("finish vkDestroyRenderPass");;
 }
@@ -6084,6 +6332,7 @@
     VkRenderPass renderPass,
     VkExtent2D* pGranularity)
 {
+    AEMU_SCOPED_TRACE("vkGetRenderAreaGranularity encode");
     mImpl->log("start vkGetRenderAreaGranularity");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -6116,11 +6365,13 @@
     stream->handleMapping()->mapHandles_VkRenderPass_u64(&local_renderPass, &cgen_var_464, 1);
     stream->write((uint64_t*)&cgen_var_464, 1 * 8);
     marshal_VkExtent2D(stream, (VkExtent2D*)(pGranularity));
+    AEMU_SCOPED_TRACE("vkGetRenderAreaGranularity readParams");
     unmarshal_VkExtent2D(stream, (VkExtent2D*)(pGranularity));
     if (pGranularity)
     {
         transform_fromhost_VkExtent2D(mImpl->resources(), (VkExtent2D*)(pGranularity));
     }
+    AEMU_SCOPED_TRACE("vkGetRenderAreaGranularity returnUnmarshal");
     mImpl->log("finish vkGetRenderAreaGranularity");;
 }
 
@@ -6130,6 +6381,7 @@
     const VkAllocationCallbacks* pAllocator,
     VkCommandPool* pCommandPool)
 {
+    AEMU_SCOPED_TRACE("vkCreateCommandPool encode");
     mImpl->log("start vkCreateCommandPool");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -6199,11 +6451,13 @@
     stream->handleMapping()->mapHandles_VkCommandPool_u64(pCommandPool, &cgen_var_470, 1);
     stream->write((uint64_t*)&cgen_var_470, 8);
     stream->setHandleMapping(resources->unwrapMapping());
+    AEMU_SCOPED_TRACE("vkCreateCommandPool readParams");
     stream->setHandleMapping(resources->createMapping());
     uint64_t cgen_var_471;
     stream->read((uint64_t*)&cgen_var_471, 8);
     stream->handleMapping()->mapHandles_u64_VkCommandPool(&cgen_var_471, (VkCommandPool*)pCommandPool, 1);
     stream->unsetHandleMapping();
+    AEMU_SCOPED_TRACE("vkCreateCommandPool returnUnmarshal");
     VkResult vkCreateCommandPool_VkResult_return = (VkResult)0;
     stream->read(&vkCreateCommandPool_VkResult_return, sizeof(VkResult));
     countingStream->clearPool();
@@ -6218,6 +6472,7 @@
     VkCommandPool commandPool,
     const VkAllocationCallbacks* pAllocator)
 {
+    AEMU_SCOPED_TRACE("vkDestroyCommandPool encode");
     mImpl->log("start vkDestroyCommandPool");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -6274,6 +6529,8 @@
     {
         marshal_VkAllocationCallbacks(stream, (VkAllocationCallbacks*)(local_pAllocator));
     }
+    AEMU_SCOPED_TRACE("vkDestroyCommandPool readParams");
+    AEMU_SCOPED_TRACE("vkDestroyCommandPool returnUnmarshal");
     resources->destroyMapping()->mapHandles_VkCommandPool((VkCommandPool*)&commandPool);
     mImpl->log("finish vkDestroyCommandPool");;
 }
@@ -6283,6 +6540,7 @@
     VkCommandPool commandPool,
     VkCommandPoolResetFlags flags)
 {
+    AEMU_SCOPED_TRACE("vkResetCommandPool encode");
     mImpl->log("start vkResetCommandPool");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -6317,6 +6575,8 @@
     stream->handleMapping()->mapHandles_VkCommandPool_u64(&local_commandPool, &cgen_var_481, 1);
     stream->write((uint64_t*)&cgen_var_481, 1 * 8);
     stream->write((VkCommandPoolResetFlags*)&local_flags, sizeof(VkCommandPoolResetFlags));
+    AEMU_SCOPED_TRACE("vkResetCommandPool readParams");
+    AEMU_SCOPED_TRACE("vkResetCommandPool returnUnmarshal");
     VkResult vkResetCommandPool_VkResult_return = (VkResult)0;
     stream->read(&vkResetCommandPool_VkResult_return, sizeof(VkResult));
     countingStream->clearPool();
@@ -6331,6 +6591,7 @@
     const VkCommandBufferAllocateInfo* pAllocateInfo,
     VkCommandBuffer* pCommandBuffers)
 {
+    AEMU_SCOPED_TRACE("vkAllocateCommandBuffers encode");
     mImpl->log("start vkAllocateCommandBuffers");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -6382,6 +6643,7 @@
         stream->write((uint64_t*)cgen_var_485, pAllocateInfo->commandBufferCount * 8);
     }
     stream->setHandleMapping(resources->unwrapMapping());
+    AEMU_SCOPED_TRACE("vkAllocateCommandBuffers readParams");
     stream->setHandleMapping(resources->createMapping());
     if (pAllocateInfo->commandBufferCount)
     {
@@ -6391,6 +6653,7 @@
         stream->handleMapping()->mapHandles_u64_VkCommandBuffer(cgen_var_486, (VkCommandBuffer*)pCommandBuffers, pAllocateInfo->commandBufferCount);
     }
     stream->unsetHandleMapping();
+    AEMU_SCOPED_TRACE("vkAllocateCommandBuffers returnUnmarshal");
     VkResult vkAllocateCommandBuffers_VkResult_return = (VkResult)0;
     stream->read(&vkAllocateCommandBuffers_VkResult_return, sizeof(VkResult));
     countingStream->clearPool();
@@ -6406,6 +6669,7 @@
     uint32_t commandBufferCount,
     const VkCommandBuffer* pCommandBuffers)
 {
+    AEMU_SCOPED_TRACE("vkFreeCommandBuffers encode");
     mImpl->log("start vkFreeCommandBuffers");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -6472,6 +6736,8 @@
             stream->write((uint64_t*)cgen_var_494, ((commandBufferCount)) * 8);
         }
     }
+    AEMU_SCOPED_TRACE("vkFreeCommandBuffers readParams");
+    AEMU_SCOPED_TRACE("vkFreeCommandBuffers returnUnmarshal");
     if (pCommandBuffers)
     {
         resources->destroyMapping()->mapHandles_VkCommandBuffer((VkCommandBuffer*)pCommandBuffers, ((commandBufferCount)));
@@ -6483,6 +6749,7 @@
     VkCommandBuffer commandBuffer,
     const VkCommandBufferBeginInfo* pBeginInfo)
 {
+    AEMU_SCOPED_TRACE("vkBeginCommandBuffer encode");
     mImpl->log("start vkBeginCommandBuffer");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -6518,6 +6785,8 @@
     stream->handleMapping()->mapHandles_VkCommandBuffer_u64(&local_commandBuffer, &cgen_var_496, 1);
     stream->write((uint64_t*)&cgen_var_496, 1 * 8);
     marshal_VkCommandBufferBeginInfo(stream, (VkCommandBufferBeginInfo*)(local_pBeginInfo));
+    AEMU_SCOPED_TRACE("vkBeginCommandBuffer readParams");
+    AEMU_SCOPED_TRACE("vkBeginCommandBuffer returnUnmarshal");
     VkResult vkBeginCommandBuffer_VkResult_return = (VkResult)0;
     stream->read(&vkBeginCommandBuffer_VkResult_return, sizeof(VkResult));
     countingStream->clearPool();
@@ -6530,6 +6799,7 @@
 VkResult VkEncoder::vkEndCommandBuffer(
     VkCommandBuffer commandBuffer)
 {
+    AEMU_SCOPED_TRACE("vkEndCommandBuffer encode");
     mImpl->log("start vkEndCommandBuffer");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -6552,6 +6822,8 @@
     uint64_t cgen_var_498;
     stream->handleMapping()->mapHandles_VkCommandBuffer_u64(&local_commandBuffer, &cgen_var_498, 1);
     stream->write((uint64_t*)&cgen_var_498, 1 * 8);
+    AEMU_SCOPED_TRACE("vkEndCommandBuffer readParams");
+    AEMU_SCOPED_TRACE("vkEndCommandBuffer returnUnmarshal");
     VkResult vkEndCommandBuffer_VkResult_return = (VkResult)0;
     stream->read(&vkEndCommandBuffer_VkResult_return, sizeof(VkResult));
     countingStream->clearPool();
@@ -6565,6 +6837,7 @@
     VkCommandBuffer commandBuffer,
     VkCommandBufferResetFlags flags)
 {
+    AEMU_SCOPED_TRACE("vkResetCommandBuffer encode");
     mImpl->log("start vkResetCommandBuffer");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -6591,6 +6864,8 @@
     stream->handleMapping()->mapHandles_VkCommandBuffer_u64(&local_commandBuffer, &cgen_var_500, 1);
     stream->write((uint64_t*)&cgen_var_500, 1 * 8);
     stream->write((VkCommandBufferResetFlags*)&local_flags, sizeof(VkCommandBufferResetFlags));
+    AEMU_SCOPED_TRACE("vkResetCommandBuffer readParams");
+    AEMU_SCOPED_TRACE("vkResetCommandBuffer returnUnmarshal");
     VkResult vkResetCommandBuffer_VkResult_return = (VkResult)0;
     stream->read(&vkResetCommandBuffer_VkResult_return, sizeof(VkResult));
     countingStream->clearPool();
@@ -6605,6 +6880,7 @@
     VkPipelineBindPoint pipelineBindPoint,
     VkPipeline pipeline)
 {
+    AEMU_SCOPED_TRACE("vkCmdBindPipeline encode");
     mImpl->log("start vkCmdBindPipeline");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -6639,6 +6915,8 @@
     uint64_t cgen_var_504;
     stream->handleMapping()->mapHandles_VkPipeline_u64(&local_pipeline, &cgen_var_504, 1);
     stream->write((uint64_t*)&cgen_var_504, 1 * 8);
+    AEMU_SCOPED_TRACE("vkCmdBindPipeline readParams");
+    AEMU_SCOPED_TRACE("vkCmdBindPipeline returnUnmarshal");
     mImpl->log("finish vkCmdBindPipeline");;
 }
 
@@ -6648,6 +6926,7 @@
     uint32_t viewportCount,
     const VkViewport* pViewports)
 {
+    AEMU_SCOPED_TRACE("vkCmdSetViewport encode");
     mImpl->log("start vkCmdSetViewport");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -6703,6 +6982,8 @@
     {
         marshal_VkViewport(stream, (VkViewport*)(local_pViewports + i));
     }
+    AEMU_SCOPED_TRACE("vkCmdSetViewport readParams");
+    AEMU_SCOPED_TRACE("vkCmdSetViewport returnUnmarshal");
     mImpl->log("finish vkCmdSetViewport");;
 }
 
@@ -6712,6 +6993,7 @@
     uint32_t scissorCount,
     const VkRect2D* pScissors)
 {
+    AEMU_SCOPED_TRACE("vkCmdSetScissor encode");
     mImpl->log("start vkCmdSetScissor");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -6767,6 +7049,8 @@
     {
         marshal_VkRect2D(stream, (VkRect2D*)(local_pScissors + i));
     }
+    AEMU_SCOPED_TRACE("vkCmdSetScissor readParams");
+    AEMU_SCOPED_TRACE("vkCmdSetScissor returnUnmarshal");
     mImpl->log("finish vkCmdSetScissor");;
 }
 
@@ -6774,6 +7058,7 @@
     VkCommandBuffer commandBuffer,
     float lineWidth)
 {
+    AEMU_SCOPED_TRACE("vkCmdSetLineWidth encode");
     mImpl->log("start vkCmdSetLineWidth");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -6800,6 +7085,8 @@
     stream->handleMapping()->mapHandles_VkCommandBuffer_u64(&local_commandBuffer, &cgen_var_510, 1);
     stream->write((uint64_t*)&cgen_var_510, 1 * 8);
     stream->write((float*)&local_lineWidth, sizeof(float));
+    AEMU_SCOPED_TRACE("vkCmdSetLineWidth readParams");
+    AEMU_SCOPED_TRACE("vkCmdSetLineWidth returnUnmarshal");
     mImpl->log("finish vkCmdSetLineWidth");;
 }
 
@@ -6809,6 +7096,7 @@
     float depthBiasClamp,
     float depthBiasSlopeFactor)
 {
+    AEMU_SCOPED_TRACE("vkCmdSetDepthBias encode");
     mImpl->log("start vkCmdSetDepthBias");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -6843,6 +7131,8 @@
     stream->write((float*)&local_depthBiasConstantFactor, sizeof(float));
     stream->write((float*)&local_depthBiasClamp, sizeof(float));
     stream->write((float*)&local_depthBiasSlopeFactor, sizeof(float));
+    AEMU_SCOPED_TRACE("vkCmdSetDepthBias readParams");
+    AEMU_SCOPED_TRACE("vkCmdSetDepthBias returnUnmarshal");
     mImpl->log("finish vkCmdSetDepthBias");;
 }
 
@@ -6850,6 +7140,7 @@
     VkCommandBuffer commandBuffer,
     const float blendConstants)
 {
+    AEMU_SCOPED_TRACE("vkCmdSetBlendConstants encode");
     mImpl->log("start vkCmdSetBlendConstants");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -6876,6 +7167,8 @@
     stream->handleMapping()->mapHandles_VkCommandBuffer_u64(&local_commandBuffer, &cgen_var_514, 1);
     stream->write((uint64_t*)&cgen_var_514, 1 * 8);
     stream->write((float*)&local_blendConstants, 4 * sizeof(float));
+    AEMU_SCOPED_TRACE("vkCmdSetBlendConstants readParams");
+    AEMU_SCOPED_TRACE("vkCmdSetBlendConstants returnUnmarshal");
     mImpl->log("finish vkCmdSetBlendConstants");;
 }
 
@@ -6884,6 +7177,7 @@
     float minDepthBounds,
     float maxDepthBounds)
 {
+    AEMU_SCOPED_TRACE("vkCmdSetDepthBounds encode");
     mImpl->log("start vkCmdSetDepthBounds");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -6914,6 +7208,8 @@
     stream->write((uint64_t*)&cgen_var_516, 1 * 8);
     stream->write((float*)&local_minDepthBounds, sizeof(float));
     stream->write((float*)&local_maxDepthBounds, sizeof(float));
+    AEMU_SCOPED_TRACE("vkCmdSetDepthBounds readParams");
+    AEMU_SCOPED_TRACE("vkCmdSetDepthBounds returnUnmarshal");
     mImpl->log("finish vkCmdSetDepthBounds");;
 }
 
@@ -6922,6 +7218,7 @@
     VkStencilFaceFlags faceMask,
     uint32_t compareMask)
 {
+    AEMU_SCOPED_TRACE("vkCmdSetStencilCompareMask encode");
     mImpl->log("start vkCmdSetStencilCompareMask");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -6952,6 +7249,8 @@
     stream->write((uint64_t*)&cgen_var_518, 1 * 8);
     stream->write((VkStencilFaceFlags*)&local_faceMask, sizeof(VkStencilFaceFlags));
     stream->write((uint32_t*)&local_compareMask, sizeof(uint32_t));
+    AEMU_SCOPED_TRACE("vkCmdSetStencilCompareMask readParams");
+    AEMU_SCOPED_TRACE("vkCmdSetStencilCompareMask returnUnmarshal");
     mImpl->log("finish vkCmdSetStencilCompareMask");;
 }
 
@@ -6960,6 +7259,7 @@
     VkStencilFaceFlags faceMask,
     uint32_t writeMask)
 {
+    AEMU_SCOPED_TRACE("vkCmdSetStencilWriteMask encode");
     mImpl->log("start vkCmdSetStencilWriteMask");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -6990,6 +7290,8 @@
     stream->write((uint64_t*)&cgen_var_520, 1 * 8);
     stream->write((VkStencilFaceFlags*)&local_faceMask, sizeof(VkStencilFaceFlags));
     stream->write((uint32_t*)&local_writeMask, sizeof(uint32_t));
+    AEMU_SCOPED_TRACE("vkCmdSetStencilWriteMask readParams");
+    AEMU_SCOPED_TRACE("vkCmdSetStencilWriteMask returnUnmarshal");
     mImpl->log("finish vkCmdSetStencilWriteMask");;
 }
 
@@ -6998,6 +7300,7 @@
     VkStencilFaceFlags faceMask,
     uint32_t reference)
 {
+    AEMU_SCOPED_TRACE("vkCmdSetStencilReference encode");
     mImpl->log("start vkCmdSetStencilReference");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -7028,6 +7331,8 @@
     stream->write((uint64_t*)&cgen_var_522, 1 * 8);
     stream->write((VkStencilFaceFlags*)&local_faceMask, sizeof(VkStencilFaceFlags));
     stream->write((uint32_t*)&local_reference, sizeof(uint32_t));
+    AEMU_SCOPED_TRACE("vkCmdSetStencilReference readParams");
+    AEMU_SCOPED_TRACE("vkCmdSetStencilReference returnUnmarshal");
     mImpl->log("finish vkCmdSetStencilReference");;
 }
 
@@ -7041,6 +7346,7 @@
     uint32_t dynamicOffsetCount,
     const uint32_t* pDynamicOffsets)
 {
+    AEMU_SCOPED_TRACE("vkCmdBindDescriptorSets encode");
     mImpl->log("start vkCmdBindDescriptorSets");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -7115,6 +7421,8 @@
     }
     stream->write((uint32_t*)&local_dynamicOffsetCount, sizeof(uint32_t));
     stream->write((uint32_t*)local_pDynamicOffsets, ((dynamicOffsetCount)) * sizeof(uint32_t));
+    AEMU_SCOPED_TRACE("vkCmdBindDescriptorSets readParams");
+    AEMU_SCOPED_TRACE("vkCmdBindDescriptorSets returnUnmarshal");
     mImpl->log("finish vkCmdBindDescriptorSets");;
 }
 
@@ -7124,6 +7432,7 @@
     VkDeviceSize offset,
     VkIndexType indexType)
 {
+    AEMU_SCOPED_TRACE("vkCmdBindIndexBuffer encode");
     mImpl->log("start vkCmdBindIndexBuffer");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -7162,6 +7471,8 @@
     stream->write((uint64_t*)&cgen_var_532, 1 * 8);
     stream->write((VkDeviceSize*)&local_offset, sizeof(VkDeviceSize));
     stream->write((VkIndexType*)&local_indexType, sizeof(VkIndexType));
+    AEMU_SCOPED_TRACE("vkCmdBindIndexBuffer readParams");
+    AEMU_SCOPED_TRACE("vkCmdBindIndexBuffer returnUnmarshal");
     mImpl->log("finish vkCmdBindIndexBuffer");;
 }
 
@@ -7172,6 +7483,7 @@
     const VkBuffer* pBuffers,
     const VkDeviceSize* pOffsets)
 {
+    AEMU_SCOPED_TRACE("vkCmdBindVertexBuffers encode");
     mImpl->log("start vkCmdBindVertexBuffers");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -7230,6 +7542,8 @@
         stream->write((uint64_t*)cgen_var_536, ((bindingCount)) * 8);
     }
     stream->write((VkDeviceSize*)local_pOffsets, ((bindingCount)) * sizeof(VkDeviceSize));
+    AEMU_SCOPED_TRACE("vkCmdBindVertexBuffers readParams");
+    AEMU_SCOPED_TRACE("vkCmdBindVertexBuffers returnUnmarshal");
     mImpl->log("finish vkCmdBindVertexBuffers");;
 }
 
@@ -7240,6 +7554,7 @@
     uint32_t firstVertex,
     uint32_t firstInstance)
 {
+    AEMU_SCOPED_TRACE("vkCmdDraw encode");
     mImpl->log("start vkCmdDraw");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -7278,6 +7593,8 @@
     stream->write((uint32_t*)&local_instanceCount, sizeof(uint32_t));
     stream->write((uint32_t*)&local_firstVertex, sizeof(uint32_t));
     stream->write((uint32_t*)&local_firstInstance, sizeof(uint32_t));
+    AEMU_SCOPED_TRACE("vkCmdDraw readParams");
+    AEMU_SCOPED_TRACE("vkCmdDraw returnUnmarshal");
     mImpl->log("finish vkCmdDraw");;
 }
 
@@ -7289,6 +7606,7 @@
     int32_t vertexOffset,
     uint32_t firstInstance)
 {
+    AEMU_SCOPED_TRACE("vkCmdDrawIndexed encode");
     mImpl->log("start vkCmdDrawIndexed");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -7331,6 +7649,8 @@
     stream->write((uint32_t*)&local_firstIndex, sizeof(uint32_t));
     stream->write((int32_t*)&local_vertexOffset, sizeof(int32_t));
     stream->write((uint32_t*)&local_firstInstance, sizeof(uint32_t));
+    AEMU_SCOPED_TRACE("vkCmdDrawIndexed readParams");
+    AEMU_SCOPED_TRACE("vkCmdDrawIndexed returnUnmarshal");
     mImpl->log("finish vkCmdDrawIndexed");;
 }
 
@@ -7341,6 +7661,7 @@
     uint32_t drawCount,
     uint32_t stride)
 {
+    AEMU_SCOPED_TRACE("vkCmdDrawIndirect encode");
     mImpl->log("start vkCmdDrawIndirect");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -7383,6 +7704,8 @@
     stream->write((VkDeviceSize*)&local_offset, sizeof(VkDeviceSize));
     stream->write((uint32_t*)&local_drawCount, sizeof(uint32_t));
     stream->write((uint32_t*)&local_stride, sizeof(uint32_t));
+    AEMU_SCOPED_TRACE("vkCmdDrawIndirect readParams");
+    AEMU_SCOPED_TRACE("vkCmdDrawIndirect returnUnmarshal");
     mImpl->log("finish vkCmdDrawIndirect");;
 }
 
@@ -7393,6 +7716,7 @@
     uint32_t drawCount,
     uint32_t stride)
 {
+    AEMU_SCOPED_TRACE("vkCmdDrawIndexedIndirect encode");
     mImpl->log("start vkCmdDrawIndexedIndirect");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -7435,6 +7759,8 @@
     stream->write((VkDeviceSize*)&local_offset, sizeof(VkDeviceSize));
     stream->write((uint32_t*)&local_drawCount, sizeof(uint32_t));
     stream->write((uint32_t*)&local_stride, sizeof(uint32_t));
+    AEMU_SCOPED_TRACE("vkCmdDrawIndexedIndirect readParams");
+    AEMU_SCOPED_TRACE("vkCmdDrawIndexedIndirect returnUnmarshal");
     mImpl->log("finish vkCmdDrawIndexedIndirect");;
 }
 
@@ -7444,6 +7770,7 @@
     uint32_t groupCountY,
     uint32_t groupCountZ)
 {
+    AEMU_SCOPED_TRACE("vkCmdDispatch encode");
     mImpl->log("start vkCmdDispatch");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -7478,6 +7805,8 @@
     stream->write((uint32_t*)&local_groupCountX, sizeof(uint32_t));
     stream->write((uint32_t*)&local_groupCountY, sizeof(uint32_t));
     stream->write((uint32_t*)&local_groupCountZ, sizeof(uint32_t));
+    AEMU_SCOPED_TRACE("vkCmdDispatch readParams");
+    AEMU_SCOPED_TRACE("vkCmdDispatch returnUnmarshal");
     mImpl->log("finish vkCmdDispatch");;
 }
 
@@ -7486,6 +7815,7 @@
     VkBuffer buffer,
     VkDeviceSize offset)
 {
+    AEMU_SCOPED_TRACE("vkCmdDispatchIndirect encode");
     mImpl->log("start vkCmdDispatchIndirect");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -7520,6 +7850,8 @@
     stream->handleMapping()->mapHandles_VkBuffer_u64(&local_buffer, &cgen_var_554, 1);
     stream->write((uint64_t*)&cgen_var_554, 1 * 8);
     stream->write((VkDeviceSize*)&local_offset, sizeof(VkDeviceSize));
+    AEMU_SCOPED_TRACE("vkCmdDispatchIndirect readParams");
+    AEMU_SCOPED_TRACE("vkCmdDispatchIndirect returnUnmarshal");
     mImpl->log("finish vkCmdDispatchIndirect");;
 }
 
@@ -7530,6 +7862,7 @@
     uint32_t regionCount,
     const VkBufferCopy* pRegions)
 {
+    AEMU_SCOPED_TRACE("vkCmdCopyBuffer encode");
     mImpl->log("start vkCmdCopyBuffer");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -7597,6 +7930,8 @@
     {
         marshal_VkBufferCopy(stream, (VkBufferCopy*)(local_pRegions + i));
     }
+    AEMU_SCOPED_TRACE("vkCmdCopyBuffer readParams");
+    AEMU_SCOPED_TRACE("vkCmdCopyBuffer returnUnmarshal");
     mImpl->log("finish vkCmdCopyBuffer");;
 }
 
@@ -7609,6 +7944,7 @@
     uint32_t regionCount,
     const VkImageCopy* pRegions)
 {
+    AEMU_SCOPED_TRACE("vkCmdCopyImage encode");
     mImpl->log("start vkCmdCopyImage");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -7684,6 +8020,8 @@
     {
         marshal_VkImageCopy(stream, (VkImageCopy*)(local_pRegions + i));
     }
+    AEMU_SCOPED_TRACE("vkCmdCopyImage readParams");
+    AEMU_SCOPED_TRACE("vkCmdCopyImage returnUnmarshal");
     mImpl->log("finish vkCmdCopyImage");;
 }
 
@@ -7697,6 +8035,7 @@
     const VkImageBlit* pRegions,
     VkFilter filter)
 {
+    AEMU_SCOPED_TRACE("vkCmdBlitImage encode");
     mImpl->log("start vkCmdBlitImage");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -7776,6 +8115,8 @@
         marshal_VkImageBlit(stream, (VkImageBlit*)(local_pRegions + i));
     }
     stream->write((VkFilter*)&local_filter, sizeof(VkFilter));
+    AEMU_SCOPED_TRACE("vkCmdBlitImage readParams");
+    AEMU_SCOPED_TRACE("vkCmdBlitImage returnUnmarshal");
     mImpl->log("finish vkCmdBlitImage");;
 }
 
@@ -7787,6 +8128,7 @@
     uint32_t regionCount,
     const VkBufferImageCopy* pRegions)
 {
+    AEMU_SCOPED_TRACE("vkCmdCopyBufferToImage encode");
     mImpl->log("start vkCmdCopyBufferToImage");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -7858,6 +8200,8 @@
     {
         marshal_VkBufferImageCopy(stream, (VkBufferImageCopy*)(local_pRegions + i));
     }
+    AEMU_SCOPED_TRACE("vkCmdCopyBufferToImage readParams");
+    AEMU_SCOPED_TRACE("vkCmdCopyBufferToImage returnUnmarshal");
     mImpl->log("finish vkCmdCopyBufferToImage");;
 }
 
@@ -7869,6 +8213,7 @@
     uint32_t regionCount,
     const VkBufferImageCopy* pRegions)
 {
+    AEMU_SCOPED_TRACE("vkCmdCopyImageToBuffer encode");
     mImpl->log("start vkCmdCopyImageToBuffer");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -7940,6 +8285,8 @@
     {
         marshal_VkBufferImageCopy(stream, (VkBufferImageCopy*)(local_pRegions + i));
     }
+    AEMU_SCOPED_TRACE("vkCmdCopyImageToBuffer readParams");
+    AEMU_SCOPED_TRACE("vkCmdCopyImageToBuffer returnUnmarshal");
     mImpl->log("finish vkCmdCopyImageToBuffer");;
 }
 
@@ -7950,6 +8297,7 @@
     VkDeviceSize dataSize,
     const void* pData)
 {
+    AEMU_SCOPED_TRACE("vkCmdUpdateBuffer encode");
     mImpl->log("start vkCmdUpdateBuffer");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -7996,6 +8344,8 @@
     stream->write((VkDeviceSize*)&local_dstOffset, sizeof(VkDeviceSize));
     stream->write((VkDeviceSize*)&local_dataSize, sizeof(VkDeviceSize));
     stream->write((void*)local_pData, ((dataSize)) * sizeof(uint8_t));
+    AEMU_SCOPED_TRACE("vkCmdUpdateBuffer readParams");
+    AEMU_SCOPED_TRACE("vkCmdUpdateBuffer returnUnmarshal");
     mImpl->log("finish vkCmdUpdateBuffer");;
 }
 
@@ -8006,6 +8356,7 @@
     VkDeviceSize size,
     uint32_t data)
 {
+    AEMU_SCOPED_TRACE("vkCmdFillBuffer encode");
     mImpl->log("start vkCmdFillBuffer");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -8048,6 +8399,8 @@
     stream->write((VkDeviceSize*)&local_dstOffset, sizeof(VkDeviceSize));
     stream->write((VkDeviceSize*)&local_size, sizeof(VkDeviceSize));
     stream->write((uint32_t*)&local_data, sizeof(uint32_t));
+    AEMU_SCOPED_TRACE("vkCmdFillBuffer readParams");
+    AEMU_SCOPED_TRACE("vkCmdFillBuffer returnUnmarshal");
     mImpl->log("finish vkCmdFillBuffer");;
 }
 
@@ -8059,6 +8412,7 @@
     uint32_t rangeCount,
     const VkImageSubresourceRange* pRanges)
 {
+    AEMU_SCOPED_TRACE("vkCmdClearColorImage encode");
     mImpl->log("start vkCmdClearColorImage");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -8135,6 +8489,8 @@
     {
         marshal_VkImageSubresourceRange(stream, (VkImageSubresourceRange*)(local_pRanges + i));
     }
+    AEMU_SCOPED_TRACE("vkCmdClearColorImage readParams");
+    AEMU_SCOPED_TRACE("vkCmdClearColorImage returnUnmarshal");
     mImpl->log("finish vkCmdClearColorImage");;
 }
 
@@ -8146,6 +8502,7 @@
     uint32_t rangeCount,
     const VkImageSubresourceRange* pRanges)
 {
+    AEMU_SCOPED_TRACE("vkCmdClearDepthStencilImage encode");
     mImpl->log("start vkCmdClearDepthStencilImage");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -8222,6 +8579,8 @@
     {
         marshal_VkImageSubresourceRange(stream, (VkImageSubresourceRange*)(local_pRanges + i));
     }
+    AEMU_SCOPED_TRACE("vkCmdClearDepthStencilImage readParams");
+    AEMU_SCOPED_TRACE("vkCmdClearDepthStencilImage returnUnmarshal");
     mImpl->log("finish vkCmdClearDepthStencilImage");;
 }
 
@@ -8232,6 +8591,7 @@
     uint32_t rectCount,
     const VkClearRect* pRects)
 {
+    AEMU_SCOPED_TRACE("vkCmdClearAttachments encode");
     mImpl->log("start vkCmdClearAttachments");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -8312,6 +8672,8 @@
     {
         marshal_VkClearRect(stream, (VkClearRect*)(local_pRects + i));
     }
+    AEMU_SCOPED_TRACE("vkCmdClearAttachments readParams");
+    AEMU_SCOPED_TRACE("vkCmdClearAttachments returnUnmarshal");
     mImpl->log("finish vkCmdClearAttachments");;
 }
 
@@ -8324,6 +8686,7 @@
     uint32_t regionCount,
     const VkImageResolve* pRegions)
 {
+    AEMU_SCOPED_TRACE("vkCmdResolveImage encode");
     mImpl->log("start vkCmdResolveImage");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -8399,6 +8762,8 @@
     {
         marshal_VkImageResolve(stream, (VkImageResolve*)(local_pRegions + i));
     }
+    AEMU_SCOPED_TRACE("vkCmdResolveImage readParams");
+    AEMU_SCOPED_TRACE("vkCmdResolveImage returnUnmarshal");
     mImpl->log("finish vkCmdResolveImage");;
 }
 
@@ -8407,6 +8772,7 @@
     VkEvent event,
     VkPipelineStageFlags stageMask)
 {
+    AEMU_SCOPED_TRACE("vkCmdSetEvent encode");
     mImpl->log("start vkCmdSetEvent");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -8441,6 +8807,8 @@
     stream->handleMapping()->mapHandles_VkEvent_u64(&local_event, &cgen_var_612, 1);
     stream->write((uint64_t*)&cgen_var_612, 1 * 8);
     stream->write((VkPipelineStageFlags*)&local_stageMask, sizeof(VkPipelineStageFlags));
+    AEMU_SCOPED_TRACE("vkCmdSetEvent readParams");
+    AEMU_SCOPED_TRACE("vkCmdSetEvent returnUnmarshal");
     mImpl->log("finish vkCmdSetEvent");;
 }
 
@@ -8449,6 +8817,7 @@
     VkEvent event,
     VkPipelineStageFlags stageMask)
 {
+    AEMU_SCOPED_TRACE("vkCmdResetEvent encode");
     mImpl->log("start vkCmdResetEvent");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -8483,6 +8852,8 @@
     stream->handleMapping()->mapHandles_VkEvent_u64(&local_event, &cgen_var_616, 1);
     stream->write((uint64_t*)&cgen_var_616, 1 * 8);
     stream->write((VkPipelineStageFlags*)&local_stageMask, sizeof(VkPipelineStageFlags));
+    AEMU_SCOPED_TRACE("vkCmdResetEvent readParams");
+    AEMU_SCOPED_TRACE("vkCmdResetEvent returnUnmarshal");
     mImpl->log("finish vkCmdResetEvent");;
 }
 
@@ -8499,6 +8870,7 @@
     uint32_t imageMemoryBarrierCount,
     const VkImageMemoryBarrier* pImageMemoryBarriers)
 {
+    AEMU_SCOPED_TRACE("vkCmdWaitEvents encode");
     mImpl->log("start vkCmdWaitEvents");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -8640,6 +9012,8 @@
     {
         marshal_VkImageMemoryBarrier(stream, (VkImageMemoryBarrier*)(local_pImageMemoryBarriers + i));
     }
+    AEMU_SCOPED_TRACE("vkCmdWaitEvents readParams");
+    AEMU_SCOPED_TRACE("vkCmdWaitEvents returnUnmarshal");
     mImpl->log("finish vkCmdWaitEvents");;
 }
 
@@ -8655,6 +9029,7 @@
     uint32_t imageMemoryBarrierCount,
     const VkImageMemoryBarrier* pImageMemoryBarriers)
 {
+    AEMU_SCOPED_TRACE("vkCmdPipelineBarrier encode");
     mImpl->log("start vkCmdPipelineBarrier");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -8776,6 +9151,8 @@
     {
         marshal_VkImageMemoryBarrier(stream, (VkImageMemoryBarrier*)(local_pImageMemoryBarriers + i));
     }
+    AEMU_SCOPED_TRACE("vkCmdPipelineBarrier readParams");
+    AEMU_SCOPED_TRACE("vkCmdPipelineBarrier returnUnmarshal");
     mImpl->log("finish vkCmdPipelineBarrier");;
 }
 
@@ -8785,6 +9162,7 @@
     uint32_t query,
     VkQueryControlFlags flags)
 {
+    AEMU_SCOPED_TRACE("vkCmdBeginQuery encode");
     mImpl->log("start vkCmdBeginQuery");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -8823,6 +9201,8 @@
     stream->write((uint64_t*)&cgen_var_626, 1 * 8);
     stream->write((uint32_t*)&local_query, sizeof(uint32_t));
     stream->write((VkQueryControlFlags*)&local_flags, sizeof(VkQueryControlFlags));
+    AEMU_SCOPED_TRACE("vkCmdBeginQuery readParams");
+    AEMU_SCOPED_TRACE("vkCmdBeginQuery returnUnmarshal");
     mImpl->log("finish vkCmdBeginQuery");;
 }
 
@@ -8831,6 +9211,7 @@
     VkQueryPool queryPool,
     uint32_t query)
 {
+    AEMU_SCOPED_TRACE("vkCmdEndQuery encode");
     mImpl->log("start vkCmdEndQuery");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -8865,6 +9246,8 @@
     stream->handleMapping()->mapHandles_VkQueryPool_u64(&local_queryPool, &cgen_var_630, 1);
     stream->write((uint64_t*)&cgen_var_630, 1 * 8);
     stream->write((uint32_t*)&local_query, sizeof(uint32_t));
+    AEMU_SCOPED_TRACE("vkCmdEndQuery readParams");
+    AEMU_SCOPED_TRACE("vkCmdEndQuery returnUnmarshal");
     mImpl->log("finish vkCmdEndQuery");;
 }
 
@@ -8874,6 +9257,7 @@
     uint32_t firstQuery,
     uint32_t queryCount)
 {
+    AEMU_SCOPED_TRACE("vkCmdResetQueryPool encode");
     mImpl->log("start vkCmdResetQueryPool");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -8912,6 +9296,8 @@
     stream->write((uint64_t*)&cgen_var_634, 1 * 8);
     stream->write((uint32_t*)&local_firstQuery, sizeof(uint32_t));
     stream->write((uint32_t*)&local_queryCount, sizeof(uint32_t));
+    AEMU_SCOPED_TRACE("vkCmdResetQueryPool readParams");
+    AEMU_SCOPED_TRACE("vkCmdResetQueryPool returnUnmarshal");
     mImpl->log("finish vkCmdResetQueryPool");;
 }
 
@@ -8921,6 +9307,7 @@
     VkQueryPool queryPool,
     uint32_t query)
 {
+    AEMU_SCOPED_TRACE("vkCmdWriteTimestamp encode");
     mImpl->log("start vkCmdWriteTimestamp");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -8959,6 +9346,8 @@
     stream->handleMapping()->mapHandles_VkQueryPool_u64(&local_queryPool, &cgen_var_638, 1);
     stream->write((uint64_t*)&cgen_var_638, 1 * 8);
     stream->write((uint32_t*)&local_query, sizeof(uint32_t));
+    AEMU_SCOPED_TRACE("vkCmdWriteTimestamp readParams");
+    AEMU_SCOPED_TRACE("vkCmdWriteTimestamp returnUnmarshal");
     mImpl->log("finish vkCmdWriteTimestamp");;
 }
 
@@ -8972,6 +9361,7 @@
     VkDeviceSize stride,
     VkQueryResultFlags flags)
 {
+    AEMU_SCOPED_TRACE("vkCmdCopyQueryPoolResults encode");
     mImpl->log("start vkCmdCopyQueryPoolResults");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -9030,6 +9420,8 @@
     stream->write((VkDeviceSize*)&local_dstOffset, sizeof(VkDeviceSize));
     stream->write((VkDeviceSize*)&local_stride, sizeof(VkDeviceSize));
     stream->write((VkQueryResultFlags*)&local_flags, sizeof(VkQueryResultFlags));
+    AEMU_SCOPED_TRACE("vkCmdCopyQueryPoolResults readParams");
+    AEMU_SCOPED_TRACE("vkCmdCopyQueryPoolResults returnUnmarshal");
     mImpl->log("finish vkCmdCopyQueryPoolResults");;
 }
 
@@ -9041,6 +9433,7 @@
     uint32_t size,
     const void* pValues)
 {
+    AEMU_SCOPED_TRACE("vkCmdPushConstants encode");
     mImpl->log("start vkCmdPushConstants");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -9091,6 +9484,8 @@
     stream->write((uint32_t*)&local_offset, sizeof(uint32_t));
     stream->write((uint32_t*)&local_size, sizeof(uint32_t));
     stream->write((void*)local_pValues, ((size)) * sizeof(uint8_t));
+    AEMU_SCOPED_TRACE("vkCmdPushConstants readParams");
+    AEMU_SCOPED_TRACE("vkCmdPushConstants returnUnmarshal");
     mImpl->log("finish vkCmdPushConstants");;
 }
 
@@ -9099,6 +9494,7 @@
     const VkRenderPassBeginInfo* pRenderPassBegin,
     VkSubpassContents contents)
 {
+    AEMU_SCOPED_TRACE("vkCmdBeginRenderPass encode");
     mImpl->log("start vkCmdBeginRenderPass");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -9138,6 +9534,8 @@
     stream->write((uint64_t*)&cgen_var_650, 1 * 8);
     marshal_VkRenderPassBeginInfo(stream, (VkRenderPassBeginInfo*)(local_pRenderPassBegin));
     stream->write((VkSubpassContents*)&local_contents, sizeof(VkSubpassContents));
+    AEMU_SCOPED_TRACE("vkCmdBeginRenderPass readParams");
+    AEMU_SCOPED_TRACE("vkCmdBeginRenderPass returnUnmarshal");
     mImpl->log("finish vkCmdBeginRenderPass");;
 }
 
@@ -9145,6 +9543,7 @@
     VkCommandBuffer commandBuffer,
     VkSubpassContents contents)
 {
+    AEMU_SCOPED_TRACE("vkCmdNextSubpass encode");
     mImpl->log("start vkCmdNextSubpass");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -9171,12 +9570,15 @@
     stream->handleMapping()->mapHandles_VkCommandBuffer_u64(&local_commandBuffer, &cgen_var_652, 1);
     stream->write((uint64_t*)&cgen_var_652, 1 * 8);
     stream->write((VkSubpassContents*)&local_contents, sizeof(VkSubpassContents));
+    AEMU_SCOPED_TRACE("vkCmdNextSubpass readParams");
+    AEMU_SCOPED_TRACE("vkCmdNextSubpass returnUnmarshal");
     mImpl->log("finish vkCmdNextSubpass");;
 }
 
 void VkEncoder::vkCmdEndRenderPass(
     VkCommandBuffer commandBuffer)
 {
+    AEMU_SCOPED_TRACE("vkCmdEndRenderPass encode");
     mImpl->log("start vkCmdEndRenderPass");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -9199,6 +9601,8 @@
     uint64_t cgen_var_654;
     stream->handleMapping()->mapHandles_VkCommandBuffer_u64(&local_commandBuffer, &cgen_var_654, 1);
     stream->write((uint64_t*)&cgen_var_654, 1 * 8);
+    AEMU_SCOPED_TRACE("vkCmdEndRenderPass readParams");
+    AEMU_SCOPED_TRACE("vkCmdEndRenderPass returnUnmarshal");
     mImpl->log("finish vkCmdEndRenderPass");;
 }
 
@@ -9207,6 +9611,7 @@
     uint32_t commandBufferCount,
     const VkCommandBuffer* pCommandBuffers)
 {
+    AEMU_SCOPED_TRACE("vkCmdExecuteCommands encode");
     mImpl->log("start vkCmdExecuteCommands");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -9253,6 +9658,8 @@
         stream->handleMapping()->mapHandles_VkCommandBuffer_u64(local_pCommandBuffers, cgen_var_658, ((commandBufferCount)));
         stream->write((uint64_t*)cgen_var_658, ((commandBufferCount)) * 8);
     }
+    AEMU_SCOPED_TRACE("vkCmdExecuteCommands readParams");
+    AEMU_SCOPED_TRACE("vkCmdExecuteCommands returnUnmarshal");
     mImpl->log("finish vkCmdExecuteCommands");;
 }
 
@@ -9261,6 +9668,7 @@
 VkResult VkEncoder::vkEnumerateInstanceVersion(
     uint32_t* pApiVersion)
 {
+    AEMU_SCOPED_TRACE("vkEnumerateInstanceVersion resourceEvent");
     VkResult vkEnumerateInstanceVersion_VkResult_return = (VkResult)0;
     vkEnumerateInstanceVersion_VkResult_return = mImpl->resources()->on_vkEnumerateInstanceVersion(this, VK_SUCCESS, pApiVersion);
     mImpl->log("finish vkEnumerateInstanceVersion");;
@@ -9272,6 +9680,7 @@
     uint32_t bindInfoCount,
     const VkBindBufferMemoryInfo* pBindInfos)
 {
+    AEMU_SCOPED_TRACE("vkBindBufferMemory2 encode");
     mImpl->log("start vkBindBufferMemory2");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -9323,6 +9732,8 @@
     {
         marshal_VkBindBufferMemoryInfo(stream, (VkBindBufferMemoryInfo*)(local_pBindInfos + i));
     }
+    AEMU_SCOPED_TRACE("vkBindBufferMemory2 readParams");
+    AEMU_SCOPED_TRACE("vkBindBufferMemory2 returnUnmarshal");
     VkResult vkBindBufferMemory2_VkResult_return = (VkResult)0;
     stream->read(&vkBindBufferMemory2_VkResult_return, sizeof(VkResult));
     countingStream->clearPool();
@@ -9337,6 +9748,7 @@
     uint32_t bindInfoCount,
     const VkBindImageMemoryInfo* pBindInfos)
 {
+    AEMU_SCOPED_TRACE("vkBindImageMemory2 encode");
     mImpl->log("start vkBindImageMemory2");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -9388,6 +9800,8 @@
     {
         marshal_VkBindImageMemoryInfo(stream, (VkBindImageMemoryInfo*)(local_pBindInfos + i));
     }
+    AEMU_SCOPED_TRACE("vkBindImageMemory2 readParams");
+    AEMU_SCOPED_TRACE("vkBindImageMemory2 returnUnmarshal");
     VkResult vkBindImageMemory2_VkResult_return = (VkResult)0;
     stream->read(&vkBindImageMemory2_VkResult_return, sizeof(VkResult));
     countingStream->clearPool();
@@ -9404,6 +9818,7 @@
     uint32_t remoteDeviceIndex,
     VkPeerMemoryFeatureFlags* pPeerMemoryFeatures)
 {
+    AEMU_SCOPED_TRACE("vkGetDeviceGroupPeerMemoryFeatures encode");
     mImpl->log("start vkGetDeviceGroupPeerMemoryFeatures");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -9440,7 +9855,9 @@
     stream->write((uint32_t*)&local_localDeviceIndex, sizeof(uint32_t));
     stream->write((uint32_t*)&local_remoteDeviceIndex, sizeof(uint32_t));
     stream->write((VkPeerMemoryFeatureFlags*)pPeerMemoryFeatures, sizeof(VkPeerMemoryFeatureFlags));
+    AEMU_SCOPED_TRACE("vkGetDeviceGroupPeerMemoryFeatures readParams");
     stream->read((VkPeerMemoryFeatureFlags*)pPeerMemoryFeatures, sizeof(VkPeerMemoryFeatureFlags));
+    AEMU_SCOPED_TRACE("vkGetDeviceGroupPeerMemoryFeatures returnUnmarshal");
     mImpl->log("finish vkGetDeviceGroupPeerMemoryFeatures");;
 }
 
@@ -9448,6 +9865,7 @@
     VkCommandBuffer commandBuffer,
     uint32_t deviceMask)
 {
+    AEMU_SCOPED_TRACE("vkCmdSetDeviceMask encode");
     mImpl->log("start vkCmdSetDeviceMask");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -9474,6 +9892,8 @@
     stream->handleMapping()->mapHandles_VkCommandBuffer_u64(&local_commandBuffer, &cgen_var_666, 1);
     stream->write((uint64_t*)&cgen_var_666, 1 * 8);
     stream->write((uint32_t*)&local_deviceMask, sizeof(uint32_t));
+    AEMU_SCOPED_TRACE("vkCmdSetDeviceMask readParams");
+    AEMU_SCOPED_TRACE("vkCmdSetDeviceMask returnUnmarshal");
     mImpl->log("finish vkCmdSetDeviceMask");;
 }
 
@@ -9486,6 +9906,7 @@
     uint32_t groupCountY,
     uint32_t groupCountZ)
 {
+    AEMU_SCOPED_TRACE("vkCmdDispatchBase encode");
     mImpl->log("start vkCmdDispatchBase");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -9532,6 +9953,8 @@
     stream->write((uint32_t*)&local_groupCountX, sizeof(uint32_t));
     stream->write((uint32_t*)&local_groupCountY, sizeof(uint32_t));
     stream->write((uint32_t*)&local_groupCountZ, sizeof(uint32_t));
+    AEMU_SCOPED_TRACE("vkCmdDispatchBase readParams");
+    AEMU_SCOPED_TRACE("vkCmdDispatchBase returnUnmarshal");
     mImpl->log("finish vkCmdDispatchBase");;
 }
 
@@ -9540,6 +9963,7 @@
     uint32_t* pPhysicalDeviceGroupCount,
     VkPhysicalDeviceGroupProperties* pPhysicalDeviceGroupProperties)
 {
+    AEMU_SCOPED_TRACE("vkEnumeratePhysicalDeviceGroups encode");
     mImpl->log("start vkEnumeratePhysicalDeviceGroups");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -9596,6 +10020,7 @@
             marshal_VkPhysicalDeviceGroupProperties(stream, (VkPhysicalDeviceGroupProperties*)(pPhysicalDeviceGroupProperties + i));
         }
     }
+    AEMU_SCOPED_TRACE("vkEnumeratePhysicalDeviceGroups readParams");
     // WARNING PTR CHECK
     uint32_t* check_pPhysicalDeviceGroupCount;
     check_pPhysicalDeviceGroupCount = (uint32_t*)(uintptr_t)stream->getBe64();
@@ -9628,6 +10053,7 @@
             transform_fromhost_VkPhysicalDeviceGroupProperties(mImpl->resources(), (VkPhysicalDeviceGroupProperties*)(pPhysicalDeviceGroupProperties + i));
         }
     }
+    AEMU_SCOPED_TRACE("vkEnumeratePhysicalDeviceGroups returnUnmarshal");
     VkResult vkEnumeratePhysicalDeviceGroups_VkResult_return = (VkResult)0;
     stream->read(&vkEnumeratePhysicalDeviceGroups_VkResult_return, sizeof(VkResult));
     countingStream->clearPool();
@@ -9642,6 +10068,7 @@
     const VkImageMemoryRequirementsInfo2* pInfo,
     VkMemoryRequirements2* pMemoryRequirements)
 {
+    AEMU_SCOPED_TRACE("vkGetImageMemoryRequirements2 encode");
     mImpl->log("start vkGetImageMemoryRequirements2");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -9679,11 +10106,13 @@
     stream->write((uint64_t*)&cgen_var_678, 1 * 8);
     marshal_VkImageMemoryRequirementsInfo2(stream, (VkImageMemoryRequirementsInfo2*)(local_pInfo));
     marshal_VkMemoryRequirements2(stream, (VkMemoryRequirements2*)(pMemoryRequirements));
+    AEMU_SCOPED_TRACE("vkGetImageMemoryRequirements2 readParams");
     unmarshal_VkMemoryRequirements2(stream, (VkMemoryRequirements2*)(pMemoryRequirements));
     if (pMemoryRequirements)
     {
         transform_fromhost_VkMemoryRequirements2(mImpl->resources(), (VkMemoryRequirements2*)(pMemoryRequirements));
     }
+    AEMU_SCOPED_TRACE("vkGetImageMemoryRequirements2 returnUnmarshal");
     mImpl->log("finish vkGetImageMemoryRequirements2");;
 }
 
@@ -9692,6 +10121,7 @@
     const VkBufferMemoryRequirementsInfo2* pInfo,
     VkMemoryRequirements2* pMemoryRequirements)
 {
+    AEMU_SCOPED_TRACE("vkGetBufferMemoryRequirements2 encode");
     mImpl->log("start vkGetBufferMemoryRequirements2");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -9729,11 +10159,13 @@
     stream->write((uint64_t*)&cgen_var_680, 1 * 8);
     marshal_VkBufferMemoryRequirementsInfo2(stream, (VkBufferMemoryRequirementsInfo2*)(local_pInfo));
     marshal_VkMemoryRequirements2(stream, (VkMemoryRequirements2*)(pMemoryRequirements));
+    AEMU_SCOPED_TRACE("vkGetBufferMemoryRequirements2 readParams");
     unmarshal_VkMemoryRequirements2(stream, (VkMemoryRequirements2*)(pMemoryRequirements));
     if (pMemoryRequirements)
     {
         transform_fromhost_VkMemoryRequirements2(mImpl->resources(), (VkMemoryRequirements2*)(pMemoryRequirements));
     }
+    AEMU_SCOPED_TRACE("vkGetBufferMemoryRequirements2 returnUnmarshal");
     mImpl->log("finish vkGetBufferMemoryRequirements2");;
 }
 
@@ -9743,6 +10175,7 @@
     uint32_t* pSparseMemoryRequirementCount,
     VkSparseImageMemoryRequirements2* pSparseMemoryRequirements)
 {
+    AEMU_SCOPED_TRACE("vkGetImageSparseMemoryRequirements2 encode");
     mImpl->log("start vkGetImageSparseMemoryRequirements2");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -9812,6 +10245,7 @@
             marshal_VkSparseImageMemoryRequirements2(stream, (VkSparseImageMemoryRequirements2*)(pSparseMemoryRequirements + i));
         }
     }
+    AEMU_SCOPED_TRACE("vkGetImageSparseMemoryRequirements2 readParams");
     // WARNING PTR CHECK
     uint32_t* check_pSparseMemoryRequirementCount;
     check_pSparseMemoryRequirementCount = (uint32_t*)(uintptr_t)stream->getBe64();
@@ -9844,6 +10278,7 @@
             transform_fromhost_VkSparseImageMemoryRequirements2(mImpl->resources(), (VkSparseImageMemoryRequirements2*)(pSparseMemoryRequirements + i));
         }
     }
+    AEMU_SCOPED_TRACE("vkGetImageSparseMemoryRequirements2 returnUnmarshal");
     mImpl->log("finish vkGetImageSparseMemoryRequirements2");;
 }
 
@@ -9851,6 +10286,7 @@
     VkPhysicalDevice physicalDevice,
     VkPhysicalDeviceFeatures2* pFeatures)
 {
+    AEMU_SCOPED_TRACE("vkGetPhysicalDeviceFeatures2 encode");
     mImpl->log("start vkGetPhysicalDeviceFeatures2");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -9875,11 +10311,13 @@
     stream->handleMapping()->mapHandles_VkPhysicalDevice_u64(&local_physicalDevice, &cgen_var_690, 1);
     stream->write((uint64_t*)&cgen_var_690, 1 * 8);
     marshal_VkPhysicalDeviceFeatures2(stream, (VkPhysicalDeviceFeatures2*)(pFeatures));
+    AEMU_SCOPED_TRACE("vkGetPhysicalDeviceFeatures2 readParams");
     unmarshal_VkPhysicalDeviceFeatures2(stream, (VkPhysicalDeviceFeatures2*)(pFeatures));
     if (pFeatures)
     {
         transform_fromhost_VkPhysicalDeviceFeatures2(mImpl->resources(), (VkPhysicalDeviceFeatures2*)(pFeatures));
     }
+    AEMU_SCOPED_TRACE("vkGetPhysicalDeviceFeatures2 returnUnmarshal");
     mImpl->log("finish vkGetPhysicalDeviceFeatures2");;
 }
 
@@ -9887,6 +10325,7 @@
     VkPhysicalDevice physicalDevice,
     VkPhysicalDeviceProperties2* pProperties)
 {
+    AEMU_SCOPED_TRACE("vkGetPhysicalDeviceProperties2 encode");
     mImpl->log("start vkGetPhysicalDeviceProperties2");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -9911,11 +10350,13 @@
     stream->handleMapping()->mapHandles_VkPhysicalDevice_u64(&local_physicalDevice, &cgen_var_692, 1);
     stream->write((uint64_t*)&cgen_var_692, 1 * 8);
     marshal_VkPhysicalDeviceProperties2(stream, (VkPhysicalDeviceProperties2*)(pProperties));
+    AEMU_SCOPED_TRACE("vkGetPhysicalDeviceProperties2 readParams");
     unmarshal_VkPhysicalDeviceProperties2(stream, (VkPhysicalDeviceProperties2*)(pProperties));
     if (pProperties)
     {
         transform_fromhost_VkPhysicalDeviceProperties2(mImpl->resources(), (VkPhysicalDeviceProperties2*)(pProperties));
     }
+    AEMU_SCOPED_TRACE("vkGetPhysicalDeviceProperties2 returnUnmarshal");
     mImpl->log("finish vkGetPhysicalDeviceProperties2");;
 }
 
@@ -9924,6 +10365,7 @@
     VkFormat format,
     VkFormatProperties2* pFormatProperties)
 {
+    AEMU_SCOPED_TRACE("vkGetPhysicalDeviceFormatProperties2 encode");
     mImpl->log("start vkGetPhysicalDeviceFormatProperties2");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -9952,11 +10394,13 @@
     stream->write((uint64_t*)&cgen_var_694, 1 * 8);
     stream->write((VkFormat*)&local_format, sizeof(VkFormat));
     marshal_VkFormatProperties2(stream, (VkFormatProperties2*)(pFormatProperties));
+    AEMU_SCOPED_TRACE("vkGetPhysicalDeviceFormatProperties2 readParams");
     unmarshal_VkFormatProperties2(stream, (VkFormatProperties2*)(pFormatProperties));
     if (pFormatProperties)
     {
         transform_fromhost_VkFormatProperties2(mImpl->resources(), (VkFormatProperties2*)(pFormatProperties));
     }
+    AEMU_SCOPED_TRACE("vkGetPhysicalDeviceFormatProperties2 returnUnmarshal");
     mImpl->log("finish vkGetPhysicalDeviceFormatProperties2");;
 }
 
@@ -9965,6 +10409,7 @@
     const VkPhysicalDeviceImageFormatInfo2* pImageFormatInfo,
     VkImageFormatProperties2* pImageFormatProperties)
 {
+    AEMU_SCOPED_TRACE("vkGetPhysicalDeviceImageFormatProperties2 encode");
     mImpl->log("start vkGetPhysicalDeviceImageFormatProperties2");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -10002,11 +10447,13 @@
     stream->write((uint64_t*)&cgen_var_696, 1 * 8);
     marshal_VkPhysicalDeviceImageFormatInfo2(stream, (VkPhysicalDeviceImageFormatInfo2*)(local_pImageFormatInfo));
     marshal_VkImageFormatProperties2(stream, (VkImageFormatProperties2*)(pImageFormatProperties));
+    AEMU_SCOPED_TRACE("vkGetPhysicalDeviceImageFormatProperties2 readParams");
     unmarshal_VkImageFormatProperties2(stream, (VkImageFormatProperties2*)(pImageFormatProperties));
     if (pImageFormatProperties)
     {
         transform_fromhost_VkImageFormatProperties2(mImpl->resources(), (VkImageFormatProperties2*)(pImageFormatProperties));
     }
+    AEMU_SCOPED_TRACE("vkGetPhysicalDeviceImageFormatProperties2 returnUnmarshal");
     VkResult vkGetPhysicalDeviceImageFormatProperties2_VkResult_return = (VkResult)0;
     stream->read(&vkGetPhysicalDeviceImageFormatProperties2_VkResult_return, sizeof(VkResult));
     countingStream->clearPool();
@@ -10021,6 +10468,7 @@
     uint32_t* pQueueFamilyPropertyCount,
     VkQueueFamilyProperties2* pQueueFamilyProperties)
 {
+    AEMU_SCOPED_TRACE("vkGetPhysicalDeviceQueueFamilyProperties2 encode");
     mImpl->log("start vkGetPhysicalDeviceQueueFamilyProperties2");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -10077,6 +10525,7 @@
             marshal_VkQueueFamilyProperties2(stream, (VkQueueFamilyProperties2*)(pQueueFamilyProperties + i));
         }
     }
+    AEMU_SCOPED_TRACE("vkGetPhysicalDeviceQueueFamilyProperties2 readParams");
     // WARNING PTR CHECK
     uint32_t* check_pQueueFamilyPropertyCount;
     check_pQueueFamilyPropertyCount = (uint32_t*)(uintptr_t)stream->getBe64();
@@ -10109,6 +10558,7 @@
             transform_fromhost_VkQueueFamilyProperties2(mImpl->resources(), (VkQueueFamilyProperties2*)(pQueueFamilyProperties + i));
         }
     }
+    AEMU_SCOPED_TRACE("vkGetPhysicalDeviceQueueFamilyProperties2 returnUnmarshal");
     mImpl->log("finish vkGetPhysicalDeviceQueueFamilyProperties2");;
 }
 
@@ -10116,6 +10566,7 @@
     VkPhysicalDevice physicalDevice,
     VkPhysicalDeviceMemoryProperties2* pMemoryProperties)
 {
+    AEMU_SCOPED_TRACE("vkGetPhysicalDeviceMemoryProperties2 encode");
     mImpl->log("start vkGetPhysicalDeviceMemoryProperties2");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -10140,11 +10591,13 @@
     stream->handleMapping()->mapHandles_VkPhysicalDevice_u64(&local_physicalDevice, &cgen_var_706, 1);
     stream->write((uint64_t*)&cgen_var_706, 1 * 8);
     marshal_VkPhysicalDeviceMemoryProperties2(stream, (VkPhysicalDeviceMemoryProperties2*)(pMemoryProperties));
+    AEMU_SCOPED_TRACE("vkGetPhysicalDeviceMemoryProperties2 readParams");
     unmarshal_VkPhysicalDeviceMemoryProperties2(stream, (VkPhysicalDeviceMemoryProperties2*)(pMemoryProperties));
     if (pMemoryProperties)
     {
         transform_fromhost_VkPhysicalDeviceMemoryProperties2(mImpl->resources(), (VkPhysicalDeviceMemoryProperties2*)(pMemoryProperties));
     }
+    AEMU_SCOPED_TRACE("vkGetPhysicalDeviceMemoryProperties2 returnUnmarshal");
     mImpl->resources()->on_vkGetPhysicalDeviceMemoryProperties2(this, physicalDevice, pMemoryProperties);
     mImpl->log("finish vkGetPhysicalDeviceMemoryProperties2");;
 }
@@ -10155,6 +10608,7 @@
     uint32_t* pPropertyCount,
     VkSparseImageFormatProperties2* pProperties)
 {
+    AEMU_SCOPED_TRACE("vkGetPhysicalDeviceSparseImageFormatProperties2 encode");
     mImpl->log("start vkGetPhysicalDeviceSparseImageFormatProperties2");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -10224,6 +10678,7 @@
             marshal_VkSparseImageFormatProperties2(stream, (VkSparseImageFormatProperties2*)(pProperties + i));
         }
     }
+    AEMU_SCOPED_TRACE("vkGetPhysicalDeviceSparseImageFormatProperties2 readParams");
     // WARNING PTR CHECK
     uint32_t* check_pPropertyCount;
     check_pPropertyCount = (uint32_t*)(uintptr_t)stream->getBe64();
@@ -10256,6 +10711,7 @@
             transform_fromhost_VkSparseImageFormatProperties2(mImpl->resources(), (VkSparseImageFormatProperties2*)(pProperties + i));
         }
     }
+    AEMU_SCOPED_TRACE("vkGetPhysicalDeviceSparseImageFormatProperties2 returnUnmarshal");
     mImpl->log("finish vkGetPhysicalDeviceSparseImageFormatProperties2");;
 }
 
@@ -10264,6 +10720,7 @@
     VkCommandPool commandPool,
     VkCommandPoolTrimFlags flags)
 {
+    AEMU_SCOPED_TRACE("vkTrimCommandPool encode");
     mImpl->log("start vkTrimCommandPool");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -10298,6 +10755,8 @@
     stream->handleMapping()->mapHandles_VkCommandPool_u64(&local_commandPool, &cgen_var_718, 1);
     stream->write((uint64_t*)&cgen_var_718, 1 * 8);
     stream->write((VkCommandPoolTrimFlags*)&local_flags, sizeof(VkCommandPoolTrimFlags));
+    AEMU_SCOPED_TRACE("vkTrimCommandPool readParams");
+    AEMU_SCOPED_TRACE("vkTrimCommandPool returnUnmarshal");
     mImpl->log("finish vkTrimCommandPool");;
 }
 
@@ -10306,6 +10765,7 @@
     const VkDeviceQueueInfo2* pQueueInfo,
     VkQueue* pQueue)
 {
+    AEMU_SCOPED_TRACE("vkGetDeviceQueue2 encode");
     mImpl->log("start vkGetDeviceQueue2");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -10349,9 +10809,11 @@
     stream->handleMapping()->mapHandles_VkQueue_u64(pQueue, &cgen_var_722, 1);
     stream->write((uint64_t*)&cgen_var_722, 8);
     stream->setHandleMapping(resources->unwrapMapping());
+    AEMU_SCOPED_TRACE("vkGetDeviceQueue2 readParams");
     uint64_t cgen_var_723;
     stream->read((uint64_t*)&cgen_var_723, 8);
     stream->handleMapping()->mapHandles_u64_VkQueue(&cgen_var_723, (VkQueue*)pQueue, 1);
+    AEMU_SCOPED_TRACE("vkGetDeviceQueue2 returnUnmarshal");
     mImpl->log("finish vkGetDeviceQueue2");;
 }
 
@@ -10361,6 +10823,7 @@
     const VkAllocationCallbacks* pAllocator,
     VkSamplerYcbcrConversion* pYcbcrConversion)
 {
+    AEMU_SCOPED_TRACE("vkCreateSamplerYcbcrConversion encode");
     mImpl->log("start vkCreateSamplerYcbcrConversion");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -10430,11 +10893,13 @@
     stream->handleMapping()->mapHandles_VkSamplerYcbcrConversion_u64(pYcbcrConversion, &cgen_var_729, 1);
     stream->write((uint64_t*)&cgen_var_729, 8);
     stream->setHandleMapping(resources->unwrapMapping());
+    AEMU_SCOPED_TRACE("vkCreateSamplerYcbcrConversion readParams");
     stream->setHandleMapping(resources->createMapping());
     uint64_t cgen_var_730;
     stream->read((uint64_t*)&cgen_var_730, 8);
     stream->handleMapping()->mapHandles_u64_VkSamplerYcbcrConversion(&cgen_var_730, (VkSamplerYcbcrConversion*)pYcbcrConversion, 1);
     stream->unsetHandleMapping();
+    AEMU_SCOPED_TRACE("vkCreateSamplerYcbcrConversion returnUnmarshal");
     VkResult vkCreateSamplerYcbcrConversion_VkResult_return = (VkResult)0;
     stream->read(&vkCreateSamplerYcbcrConversion_VkResult_return, sizeof(VkResult));
     countingStream->clearPool();
@@ -10449,6 +10914,7 @@
     VkSamplerYcbcrConversion ycbcrConversion,
     const VkAllocationCallbacks* pAllocator)
 {
+    AEMU_SCOPED_TRACE("vkDestroySamplerYcbcrConversion encode");
     mImpl->log("start vkDestroySamplerYcbcrConversion");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -10505,6 +10971,8 @@
     {
         marshal_VkAllocationCallbacks(stream, (VkAllocationCallbacks*)(local_pAllocator));
     }
+    AEMU_SCOPED_TRACE("vkDestroySamplerYcbcrConversion readParams");
+    AEMU_SCOPED_TRACE("vkDestroySamplerYcbcrConversion returnUnmarshal");
     resources->destroyMapping()->mapHandles_VkSamplerYcbcrConversion((VkSamplerYcbcrConversion*)&ycbcrConversion);
     mImpl->log("finish vkDestroySamplerYcbcrConversion");;
 }
@@ -10515,6 +10983,7 @@
     const VkAllocationCallbacks* pAllocator,
     VkDescriptorUpdateTemplate* pDescriptorUpdateTemplate)
 {
+    AEMU_SCOPED_TRACE("vkCreateDescriptorUpdateTemplate encode");
     mImpl->log("start vkCreateDescriptorUpdateTemplate");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -10584,11 +11053,13 @@
     stream->handleMapping()->mapHandles_VkDescriptorUpdateTemplate_u64(pDescriptorUpdateTemplate, &cgen_var_742, 1);
     stream->write((uint64_t*)&cgen_var_742, 8);
     stream->setHandleMapping(resources->unwrapMapping());
+    AEMU_SCOPED_TRACE("vkCreateDescriptorUpdateTemplate readParams");
     stream->setHandleMapping(resources->createMapping());
     uint64_t cgen_var_743;
     stream->read((uint64_t*)&cgen_var_743, 8);
     stream->handleMapping()->mapHandles_u64_VkDescriptorUpdateTemplate(&cgen_var_743, (VkDescriptorUpdateTemplate*)pDescriptorUpdateTemplate, 1);
     stream->unsetHandleMapping();
+    AEMU_SCOPED_TRACE("vkCreateDescriptorUpdateTemplate returnUnmarshal");
     VkResult vkCreateDescriptorUpdateTemplate_VkResult_return = (VkResult)0;
     stream->read(&vkCreateDescriptorUpdateTemplate_VkResult_return, sizeof(VkResult));
     countingStream->clearPool();
@@ -10603,6 +11074,7 @@
     VkDescriptorUpdateTemplate descriptorUpdateTemplate,
     const VkAllocationCallbacks* pAllocator)
 {
+    AEMU_SCOPED_TRACE("vkDestroyDescriptorUpdateTemplate encode");
     mImpl->log("start vkDestroyDescriptorUpdateTemplate");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -10659,6 +11131,8 @@
     {
         marshal_VkAllocationCallbacks(stream, (VkAllocationCallbacks*)(local_pAllocator));
     }
+    AEMU_SCOPED_TRACE("vkDestroyDescriptorUpdateTemplate readParams");
+    AEMU_SCOPED_TRACE("vkDestroyDescriptorUpdateTemplate returnUnmarshal");
     resources->destroyMapping()->mapHandles_VkDescriptorUpdateTemplate((VkDescriptorUpdateTemplate*)&descriptorUpdateTemplate);
     mImpl->log("finish vkDestroyDescriptorUpdateTemplate");;
 }
@@ -10669,6 +11143,7 @@
     VkDescriptorUpdateTemplate descriptorUpdateTemplate,
     const void* pData)
 {
+    AEMU_SCOPED_TRACE("vkUpdateDescriptorSetWithTemplate encode");
     mImpl->log("start vkUpdateDescriptorSetWithTemplate");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -10727,6 +11202,8 @@
     {
         stream->write((void*)local_pData, sizeof(uint8_t));
     }
+    AEMU_SCOPED_TRACE("vkUpdateDescriptorSetWithTemplate readParams");
+    AEMU_SCOPED_TRACE("vkUpdateDescriptorSetWithTemplate returnUnmarshal");
     mImpl->log("finish vkUpdateDescriptorSetWithTemplate");;
 }
 
@@ -10735,6 +11212,7 @@
     const VkPhysicalDeviceExternalBufferInfo* pExternalBufferInfo,
     VkExternalBufferProperties* pExternalBufferProperties)
 {
+    AEMU_SCOPED_TRACE("vkGetPhysicalDeviceExternalBufferProperties encode");
     mImpl->log("start vkGetPhysicalDeviceExternalBufferProperties");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -10773,12 +11251,14 @@
     stream->write((uint64_t*)&cgen_var_759, 1 * 8);
     marshal_VkPhysicalDeviceExternalBufferInfo(stream, (VkPhysicalDeviceExternalBufferInfo*)(local_pExternalBufferInfo));
     marshal_VkExternalBufferProperties(stream, (VkExternalBufferProperties*)(pExternalBufferProperties));
+    AEMU_SCOPED_TRACE("vkGetPhysicalDeviceExternalBufferProperties readParams");
     unmarshal_VkExternalBufferProperties(stream, (VkExternalBufferProperties*)(pExternalBufferProperties));
     if (pExternalBufferProperties)
     {
         mImpl->resources()->transformImpl_VkExternalBufferProperties_fromhost(pExternalBufferProperties, 1);
         transform_fromhost_VkExternalBufferProperties(mImpl->resources(), (VkExternalBufferProperties*)(pExternalBufferProperties));
     }
+    AEMU_SCOPED_TRACE("vkGetPhysicalDeviceExternalBufferProperties returnUnmarshal");
     mImpl->log("finish vkGetPhysicalDeviceExternalBufferProperties");;
 }
 
@@ -10787,6 +11267,7 @@
     const VkPhysicalDeviceExternalFenceInfo* pExternalFenceInfo,
     VkExternalFenceProperties* pExternalFenceProperties)
 {
+    AEMU_SCOPED_TRACE("vkGetPhysicalDeviceExternalFenceProperties encode");
     mImpl->log("start vkGetPhysicalDeviceExternalFenceProperties");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -10824,11 +11305,13 @@
     stream->write((uint64_t*)&cgen_var_761, 1 * 8);
     marshal_VkPhysicalDeviceExternalFenceInfo(stream, (VkPhysicalDeviceExternalFenceInfo*)(local_pExternalFenceInfo));
     marshal_VkExternalFenceProperties(stream, (VkExternalFenceProperties*)(pExternalFenceProperties));
+    AEMU_SCOPED_TRACE("vkGetPhysicalDeviceExternalFenceProperties readParams");
     unmarshal_VkExternalFenceProperties(stream, (VkExternalFenceProperties*)(pExternalFenceProperties));
     if (pExternalFenceProperties)
     {
         transform_fromhost_VkExternalFenceProperties(mImpl->resources(), (VkExternalFenceProperties*)(pExternalFenceProperties));
     }
+    AEMU_SCOPED_TRACE("vkGetPhysicalDeviceExternalFenceProperties returnUnmarshal");
     mImpl->log("finish vkGetPhysicalDeviceExternalFenceProperties");;
 }
 
@@ -10837,6 +11320,7 @@
     const VkPhysicalDeviceExternalSemaphoreInfo* pExternalSemaphoreInfo,
     VkExternalSemaphoreProperties* pExternalSemaphoreProperties)
 {
+    AEMU_SCOPED_TRACE("vkGetPhysicalDeviceExternalSemaphoreProperties encode");
     mImpl->log("start vkGetPhysicalDeviceExternalSemaphoreProperties");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -10874,11 +11358,13 @@
     stream->write((uint64_t*)&cgen_var_763, 1 * 8);
     marshal_VkPhysicalDeviceExternalSemaphoreInfo(stream, (VkPhysicalDeviceExternalSemaphoreInfo*)(local_pExternalSemaphoreInfo));
     marshal_VkExternalSemaphoreProperties(stream, (VkExternalSemaphoreProperties*)(pExternalSemaphoreProperties));
+    AEMU_SCOPED_TRACE("vkGetPhysicalDeviceExternalSemaphoreProperties readParams");
     unmarshal_VkExternalSemaphoreProperties(stream, (VkExternalSemaphoreProperties*)(pExternalSemaphoreProperties));
     if (pExternalSemaphoreProperties)
     {
         transform_fromhost_VkExternalSemaphoreProperties(mImpl->resources(), (VkExternalSemaphoreProperties*)(pExternalSemaphoreProperties));
     }
+    AEMU_SCOPED_TRACE("vkGetPhysicalDeviceExternalSemaphoreProperties returnUnmarshal");
     mImpl->log("finish vkGetPhysicalDeviceExternalSemaphoreProperties");;
 }
 
@@ -10887,6 +11373,7 @@
     const VkDescriptorSetLayoutCreateInfo* pCreateInfo,
     VkDescriptorSetLayoutSupport* pSupport)
 {
+    AEMU_SCOPED_TRACE("vkGetDescriptorSetLayoutSupport encode");
     mImpl->log("start vkGetDescriptorSetLayoutSupport");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -10924,11 +11411,13 @@
     stream->write((uint64_t*)&cgen_var_765, 1 * 8);
     marshal_VkDescriptorSetLayoutCreateInfo(stream, (VkDescriptorSetLayoutCreateInfo*)(local_pCreateInfo));
     marshal_VkDescriptorSetLayoutSupport(stream, (VkDescriptorSetLayoutSupport*)(pSupport));
+    AEMU_SCOPED_TRACE("vkGetDescriptorSetLayoutSupport readParams");
     unmarshal_VkDescriptorSetLayoutSupport(stream, (VkDescriptorSetLayoutSupport*)(pSupport));
     if (pSupport)
     {
         transform_fromhost_VkDescriptorSetLayoutSupport(mImpl->resources(), (VkDescriptorSetLayoutSupport*)(pSupport));
     }
+    AEMU_SCOPED_TRACE("vkGetDescriptorSetLayoutSupport returnUnmarshal");
     mImpl->log("finish vkGetDescriptorSetLayoutSupport");;
 }
 
@@ -10939,6 +11428,7 @@
     VkSurfaceKHR surface,
     const VkAllocationCallbacks* pAllocator)
 {
+    AEMU_SCOPED_TRACE("vkDestroySurfaceKHR encode");
     mImpl->log("start vkDestroySurfaceKHR");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -10995,6 +11485,8 @@
     {
         marshal_VkAllocationCallbacks(stream, (VkAllocationCallbacks*)(local_pAllocator));
     }
+    AEMU_SCOPED_TRACE("vkDestroySurfaceKHR readParams");
+    AEMU_SCOPED_TRACE("vkDestroySurfaceKHR returnUnmarshal");
     resources->destroyMapping()->mapHandles_VkSurfaceKHR((VkSurfaceKHR*)&surface);
     mImpl->log("finish vkDestroySurfaceKHR");;
 }
@@ -11005,6 +11497,7 @@
     VkSurfaceKHR surface,
     VkBool32* pSupported)
 {
+    AEMU_SCOPED_TRACE("vkGetPhysicalDeviceSurfaceSupportKHR encode");
     mImpl->log("start vkGetPhysicalDeviceSurfaceSupportKHR");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -11041,7 +11534,9 @@
     stream->handleMapping()->mapHandles_VkSurfaceKHR_u64(&local_surface, &cgen_var_775, 1);
     stream->write((uint64_t*)&cgen_var_775, 1 * 8);
     stream->write((VkBool32*)pSupported, sizeof(VkBool32));
+    AEMU_SCOPED_TRACE("vkGetPhysicalDeviceSurfaceSupportKHR readParams");
     stream->read((VkBool32*)pSupported, sizeof(VkBool32));
+    AEMU_SCOPED_TRACE("vkGetPhysicalDeviceSurfaceSupportKHR returnUnmarshal");
     VkResult vkGetPhysicalDeviceSurfaceSupportKHR_VkResult_return = (VkResult)0;
     stream->read(&vkGetPhysicalDeviceSurfaceSupportKHR_VkResult_return, sizeof(VkResult));
     countingStream->clearPool();
@@ -11056,6 +11551,7 @@
     VkSurfaceKHR surface,
     VkSurfaceCapabilitiesKHR* pSurfaceCapabilities)
 {
+    AEMU_SCOPED_TRACE("vkGetPhysicalDeviceSurfaceCapabilitiesKHR encode");
     mImpl->log("start vkGetPhysicalDeviceSurfaceCapabilitiesKHR");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -11088,11 +11584,13 @@
     stream->handleMapping()->mapHandles_VkSurfaceKHR_u64(&local_surface, &cgen_var_779, 1);
     stream->write((uint64_t*)&cgen_var_779, 1 * 8);
     marshal_VkSurfaceCapabilitiesKHR(stream, (VkSurfaceCapabilitiesKHR*)(pSurfaceCapabilities));
+    AEMU_SCOPED_TRACE("vkGetPhysicalDeviceSurfaceCapabilitiesKHR readParams");
     unmarshal_VkSurfaceCapabilitiesKHR(stream, (VkSurfaceCapabilitiesKHR*)(pSurfaceCapabilities));
     if (pSurfaceCapabilities)
     {
         transform_fromhost_VkSurfaceCapabilitiesKHR(mImpl->resources(), (VkSurfaceCapabilitiesKHR*)(pSurfaceCapabilities));
     }
+    AEMU_SCOPED_TRACE("vkGetPhysicalDeviceSurfaceCapabilitiesKHR returnUnmarshal");
     VkResult vkGetPhysicalDeviceSurfaceCapabilitiesKHR_VkResult_return = (VkResult)0;
     stream->read(&vkGetPhysicalDeviceSurfaceCapabilitiesKHR_VkResult_return, sizeof(VkResult));
     countingStream->clearPool();
@@ -11108,6 +11606,7 @@
     uint32_t* pSurfaceFormatCount,
     VkSurfaceFormatKHR* pSurfaceFormats)
 {
+    AEMU_SCOPED_TRACE("vkGetPhysicalDeviceSurfaceFormatsKHR encode");
     mImpl->log("start vkGetPhysicalDeviceSurfaceFormatsKHR");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -11172,6 +11671,7 @@
             marshal_VkSurfaceFormatKHR(stream, (VkSurfaceFormatKHR*)(pSurfaceFormats + i));
         }
     }
+    AEMU_SCOPED_TRACE("vkGetPhysicalDeviceSurfaceFormatsKHR readParams");
     // WARNING PTR CHECK
     uint32_t* check_pSurfaceFormatCount;
     check_pSurfaceFormatCount = (uint32_t*)(uintptr_t)stream->getBe64();
@@ -11204,6 +11704,7 @@
             transform_fromhost_VkSurfaceFormatKHR(mImpl->resources(), (VkSurfaceFormatKHR*)(pSurfaceFormats + i));
         }
     }
+    AEMU_SCOPED_TRACE("vkGetPhysicalDeviceSurfaceFormatsKHR returnUnmarshal");
     VkResult vkGetPhysicalDeviceSurfaceFormatsKHR_VkResult_return = (VkResult)0;
     stream->read(&vkGetPhysicalDeviceSurfaceFormatsKHR_VkResult_return, sizeof(VkResult));
     countingStream->clearPool();
@@ -11219,6 +11720,7 @@
     uint32_t* pPresentModeCount,
     VkPresentModeKHR* pPresentModes)
 {
+    AEMU_SCOPED_TRACE("vkGetPhysicalDeviceSurfacePresentModesKHR encode");
     mImpl->log("start vkGetPhysicalDeviceSurfacePresentModesKHR");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -11277,6 +11779,7 @@
     {
         stream->write((VkPresentModeKHR*)pPresentModes, (*(pPresentModeCount)) * sizeof(VkPresentModeKHR));
     }
+    AEMU_SCOPED_TRACE("vkGetPhysicalDeviceSurfacePresentModesKHR readParams");
     // WARNING PTR CHECK
     uint32_t* check_pPresentModeCount;
     check_pPresentModeCount = (uint32_t*)(uintptr_t)stream->getBe64();
@@ -11299,6 +11802,7 @@
         }
         stream->read((VkPresentModeKHR*)pPresentModes, (*(pPresentModeCount)) * sizeof(VkPresentModeKHR));
     }
+    AEMU_SCOPED_TRACE("vkGetPhysicalDeviceSurfacePresentModesKHR returnUnmarshal");
     VkResult vkGetPhysicalDeviceSurfacePresentModesKHR_VkResult_return = (VkResult)0;
     stream->read(&vkGetPhysicalDeviceSurfacePresentModesKHR_VkResult_return, sizeof(VkResult));
     countingStream->clearPool();
@@ -11316,6 +11820,7 @@
     const VkAllocationCallbacks* pAllocator,
     VkSwapchainKHR* pSwapchain)
 {
+    AEMU_SCOPED_TRACE("vkCreateSwapchainKHR encode");
     mImpl->log("start vkCreateSwapchainKHR");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -11385,11 +11890,13 @@
     stream->handleMapping()->mapHandles_VkSwapchainKHR_u64(pSwapchain, &cgen_var_805, 1);
     stream->write((uint64_t*)&cgen_var_805, 8);
     stream->setHandleMapping(resources->unwrapMapping());
+    AEMU_SCOPED_TRACE("vkCreateSwapchainKHR readParams");
     stream->setHandleMapping(resources->createMapping());
     uint64_t cgen_var_806;
     stream->read((uint64_t*)&cgen_var_806, 8);
     stream->handleMapping()->mapHandles_u64_VkSwapchainKHR(&cgen_var_806, (VkSwapchainKHR*)pSwapchain, 1);
     stream->unsetHandleMapping();
+    AEMU_SCOPED_TRACE("vkCreateSwapchainKHR returnUnmarshal");
     VkResult vkCreateSwapchainKHR_VkResult_return = (VkResult)0;
     stream->read(&vkCreateSwapchainKHR_VkResult_return, sizeof(VkResult));
     countingStream->clearPool();
@@ -11404,6 +11911,7 @@
     VkSwapchainKHR swapchain,
     const VkAllocationCallbacks* pAllocator)
 {
+    AEMU_SCOPED_TRACE("vkDestroySwapchainKHR encode");
     mImpl->log("start vkDestroySwapchainKHR");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -11460,6 +11968,8 @@
     {
         marshal_VkAllocationCallbacks(stream, (VkAllocationCallbacks*)(local_pAllocator));
     }
+    AEMU_SCOPED_TRACE("vkDestroySwapchainKHR readParams");
+    AEMU_SCOPED_TRACE("vkDestroySwapchainKHR returnUnmarshal");
     resources->destroyMapping()->mapHandles_VkSwapchainKHR((VkSwapchainKHR*)&swapchain);
     mImpl->log("finish vkDestroySwapchainKHR");;
 }
@@ -11470,6 +11980,7 @@
     uint32_t* pSwapchainImageCount,
     VkImage* pSwapchainImages)
 {
+    AEMU_SCOPED_TRACE("vkGetSwapchainImagesKHR encode");
     mImpl->log("start vkGetSwapchainImagesKHR");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -11542,6 +12053,7 @@
         }
     }
     stream->setHandleMapping(resources->unwrapMapping());
+    AEMU_SCOPED_TRACE("vkGetSwapchainImagesKHR readParams");
     // WARNING PTR CHECK
     uint32_t* check_pSwapchainImageCount;
     check_pSwapchainImageCount = (uint32_t*)(uintptr_t)stream->getBe64();
@@ -11570,6 +12082,7 @@
             stream->handleMapping()->mapHandles_u64_VkImage(cgen_var_825, (VkImage*)pSwapchainImages, (*(pSwapchainImageCount)));
         }
     }
+    AEMU_SCOPED_TRACE("vkGetSwapchainImagesKHR returnUnmarshal");
     VkResult vkGetSwapchainImagesKHR_VkResult_return = (VkResult)0;
     stream->read(&vkGetSwapchainImagesKHR_VkResult_return, sizeof(VkResult));
     countingStream->clearPool();
@@ -11587,6 +12100,7 @@
     VkFence fence,
     uint32_t* pImageIndex)
 {
+    AEMU_SCOPED_TRACE("vkAcquireNextImageKHR encode");
     mImpl->log("start vkAcquireNextImageKHR");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -11639,7 +12153,9 @@
     stream->handleMapping()->mapHandles_VkFence_u64(&local_fence, &cgen_var_833, 1);
     stream->write((uint64_t*)&cgen_var_833, 1 * 8);
     stream->write((uint32_t*)pImageIndex, sizeof(uint32_t));
+    AEMU_SCOPED_TRACE("vkAcquireNextImageKHR readParams");
     stream->read((uint32_t*)pImageIndex, sizeof(uint32_t));
+    AEMU_SCOPED_TRACE("vkAcquireNextImageKHR returnUnmarshal");
     VkResult vkAcquireNextImageKHR_VkResult_return = (VkResult)0;
     stream->read(&vkAcquireNextImageKHR_VkResult_return, sizeof(VkResult));
     countingStream->clearPool();
@@ -11653,6 +12169,7 @@
     VkQueue queue,
     const VkPresentInfoKHR* pPresentInfo)
 {
+    AEMU_SCOPED_TRACE("vkQueuePresentKHR encode");
     mImpl->log("start vkQueuePresentKHR");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -11688,6 +12205,8 @@
     stream->handleMapping()->mapHandles_VkQueue_u64(&local_queue, &cgen_var_835, 1);
     stream->write((uint64_t*)&cgen_var_835, 1 * 8);
     marshal_VkPresentInfoKHR(stream, (VkPresentInfoKHR*)(local_pPresentInfo));
+    AEMU_SCOPED_TRACE("vkQueuePresentKHR readParams");
+    AEMU_SCOPED_TRACE("vkQueuePresentKHR returnUnmarshal");
     VkResult vkQueuePresentKHR_VkResult_return = (VkResult)0;
     stream->read(&vkQueuePresentKHR_VkResult_return, sizeof(VkResult));
     countingStream->clearPool();
@@ -11701,6 +12220,7 @@
     VkDevice device,
     VkDeviceGroupPresentCapabilitiesKHR* pDeviceGroupPresentCapabilities)
 {
+    AEMU_SCOPED_TRACE("vkGetDeviceGroupPresentCapabilitiesKHR encode");
     mImpl->log("start vkGetDeviceGroupPresentCapabilitiesKHR");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -11725,11 +12245,13 @@
     stream->handleMapping()->mapHandles_VkDevice_u64(&local_device, &cgen_var_837, 1);
     stream->write((uint64_t*)&cgen_var_837, 1 * 8);
     marshal_VkDeviceGroupPresentCapabilitiesKHR(stream, (VkDeviceGroupPresentCapabilitiesKHR*)(pDeviceGroupPresentCapabilities));
+    AEMU_SCOPED_TRACE("vkGetDeviceGroupPresentCapabilitiesKHR readParams");
     unmarshal_VkDeviceGroupPresentCapabilitiesKHR(stream, (VkDeviceGroupPresentCapabilitiesKHR*)(pDeviceGroupPresentCapabilities));
     if (pDeviceGroupPresentCapabilities)
     {
         transform_fromhost_VkDeviceGroupPresentCapabilitiesKHR(mImpl->resources(), (VkDeviceGroupPresentCapabilitiesKHR*)(pDeviceGroupPresentCapabilities));
     }
+    AEMU_SCOPED_TRACE("vkGetDeviceGroupPresentCapabilitiesKHR returnUnmarshal");
     VkResult vkGetDeviceGroupPresentCapabilitiesKHR_VkResult_return = (VkResult)0;
     stream->read(&vkGetDeviceGroupPresentCapabilitiesKHR_VkResult_return, sizeof(VkResult));
     countingStream->clearPool();
@@ -11744,6 +12266,7 @@
     VkSurfaceKHR surface,
     VkDeviceGroupPresentModeFlagsKHR* pModes)
 {
+    AEMU_SCOPED_TRACE("vkGetDeviceGroupSurfacePresentModesKHR encode");
     mImpl->log("start vkGetDeviceGroupSurfacePresentModesKHR");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -11788,6 +12311,7 @@
     {
         stream->write((VkDeviceGroupPresentModeFlagsKHR*)pModes, sizeof(VkDeviceGroupPresentModeFlagsKHR));
     }
+    AEMU_SCOPED_TRACE("vkGetDeviceGroupSurfacePresentModesKHR readParams");
     // WARNING PTR CHECK
     VkDeviceGroupPresentModeFlagsKHR* check_pModes;
     check_pModes = (VkDeviceGroupPresentModeFlagsKHR*)(uintptr_t)stream->getBe64();
@@ -11799,6 +12323,7 @@
         }
         stream->read((VkDeviceGroupPresentModeFlagsKHR*)pModes, sizeof(VkDeviceGroupPresentModeFlagsKHR));
     }
+    AEMU_SCOPED_TRACE("vkGetDeviceGroupSurfacePresentModesKHR returnUnmarshal");
     VkResult vkGetDeviceGroupSurfacePresentModesKHR_VkResult_return = (VkResult)0;
     stream->read(&vkGetDeviceGroupSurfacePresentModesKHR_VkResult_return, sizeof(VkResult));
     countingStream->clearPool();
@@ -11814,6 +12339,7 @@
     uint32_t* pRectCount,
     VkRect2D* pRects)
 {
+    AEMU_SCOPED_TRACE("vkGetPhysicalDevicePresentRectanglesKHR encode");
     mImpl->log("start vkGetPhysicalDevicePresentRectanglesKHR");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -11878,6 +12404,7 @@
             marshal_VkRect2D(stream, (VkRect2D*)(pRects + i));
         }
     }
+    AEMU_SCOPED_TRACE("vkGetPhysicalDevicePresentRectanglesKHR readParams");
     // WARNING PTR CHECK
     uint32_t* check_pRectCount;
     check_pRectCount = (uint32_t*)(uintptr_t)stream->getBe64();
@@ -11910,6 +12437,7 @@
             transform_fromhost_VkRect2D(mImpl->resources(), (VkRect2D*)(pRects + i));
         }
     }
+    AEMU_SCOPED_TRACE("vkGetPhysicalDevicePresentRectanglesKHR returnUnmarshal");
     VkResult vkGetPhysicalDevicePresentRectanglesKHR_VkResult_return = (VkResult)0;
     stream->read(&vkGetPhysicalDevicePresentRectanglesKHR_VkResult_return, sizeof(VkResult));
     countingStream->clearPool();
@@ -11924,6 +12452,7 @@
     const VkAcquireNextImageInfoKHR* pAcquireInfo,
     uint32_t* pImageIndex)
 {
+    AEMU_SCOPED_TRACE("vkAcquireNextImage2KHR encode");
     mImpl->log("start vkAcquireNextImage2KHR");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -11961,7 +12490,9 @@
     stream->write((uint64_t*)&cgen_var_856, 1 * 8);
     marshal_VkAcquireNextImageInfoKHR(stream, (VkAcquireNextImageInfoKHR*)(local_pAcquireInfo));
     stream->write((uint32_t*)pImageIndex, sizeof(uint32_t));
+    AEMU_SCOPED_TRACE("vkAcquireNextImage2KHR readParams");
     stream->read((uint32_t*)pImageIndex, sizeof(uint32_t));
+    AEMU_SCOPED_TRACE("vkAcquireNextImage2KHR returnUnmarshal");
     VkResult vkAcquireNextImage2KHR_VkResult_return = (VkResult)0;
     stream->read(&vkAcquireNextImage2KHR_VkResult_return, sizeof(VkResult));
     countingStream->clearPool();
@@ -11978,6 +12509,7 @@
     uint32_t* pPropertyCount,
     VkDisplayPropertiesKHR* pProperties)
 {
+    AEMU_SCOPED_TRACE("vkGetPhysicalDeviceDisplayPropertiesKHR encode");
     mImpl->log("start vkGetPhysicalDeviceDisplayPropertiesKHR");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -12034,6 +12566,7 @@
             marshal_VkDisplayPropertiesKHR(stream, (VkDisplayPropertiesKHR*)(pProperties + i));
         }
     }
+    AEMU_SCOPED_TRACE("vkGetPhysicalDeviceDisplayPropertiesKHR readParams");
     // WARNING PTR CHECK
     uint32_t* check_pPropertyCount;
     check_pPropertyCount = (uint32_t*)(uintptr_t)stream->getBe64();
@@ -12066,6 +12599,7 @@
             transform_fromhost_VkDisplayPropertiesKHR(mImpl->resources(), (VkDisplayPropertiesKHR*)(pProperties + i));
         }
     }
+    AEMU_SCOPED_TRACE("vkGetPhysicalDeviceDisplayPropertiesKHR returnUnmarshal");
     VkResult vkGetPhysicalDeviceDisplayPropertiesKHR_VkResult_return = (VkResult)0;
     stream->read(&vkGetPhysicalDeviceDisplayPropertiesKHR_VkResult_return, sizeof(VkResult));
     countingStream->clearPool();
@@ -12080,6 +12614,7 @@
     uint32_t* pPropertyCount,
     VkDisplayPlanePropertiesKHR* pProperties)
 {
+    AEMU_SCOPED_TRACE("vkGetPhysicalDeviceDisplayPlanePropertiesKHR encode");
     mImpl->log("start vkGetPhysicalDeviceDisplayPlanePropertiesKHR");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -12136,6 +12671,7 @@
             marshal_VkDisplayPlanePropertiesKHR(stream, (VkDisplayPlanePropertiesKHR*)(pProperties + i));
         }
     }
+    AEMU_SCOPED_TRACE("vkGetPhysicalDeviceDisplayPlanePropertiesKHR readParams");
     // WARNING PTR CHECK
     uint32_t* check_pPropertyCount;
     check_pPropertyCount = (uint32_t*)(uintptr_t)stream->getBe64();
@@ -12168,6 +12704,7 @@
             transform_fromhost_VkDisplayPlanePropertiesKHR(mImpl->resources(), (VkDisplayPlanePropertiesKHR*)(pProperties + i));
         }
     }
+    AEMU_SCOPED_TRACE("vkGetPhysicalDeviceDisplayPlanePropertiesKHR returnUnmarshal");
     VkResult vkGetPhysicalDeviceDisplayPlanePropertiesKHR_VkResult_return = (VkResult)0;
     stream->read(&vkGetPhysicalDeviceDisplayPlanePropertiesKHR_VkResult_return, sizeof(VkResult));
     countingStream->clearPool();
@@ -12183,6 +12720,7 @@
     uint32_t* pDisplayCount,
     VkDisplayKHR* pDisplays)
 {
+    AEMU_SCOPED_TRACE("vkGetDisplayPlaneSupportedDisplaysKHR encode");
     mImpl->log("start vkGetDisplayPlaneSupportedDisplaysKHR");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -12251,6 +12789,7 @@
         }
     }
     stream->setHandleMapping(resources->unwrapMapping());
+    AEMU_SCOPED_TRACE("vkGetDisplayPlaneSupportedDisplaysKHR readParams");
     // WARNING PTR CHECK
     uint32_t* check_pDisplayCount;
     check_pDisplayCount = (uint32_t*)(uintptr_t)stream->getBe64();
@@ -12279,6 +12818,7 @@
             stream->handleMapping()->mapHandles_u64_VkDisplayKHR(cgen_var_883, (VkDisplayKHR*)pDisplays, (*(pDisplayCount)));
         }
     }
+    AEMU_SCOPED_TRACE("vkGetDisplayPlaneSupportedDisplaysKHR returnUnmarshal");
     VkResult vkGetDisplayPlaneSupportedDisplaysKHR_VkResult_return = (VkResult)0;
     stream->read(&vkGetDisplayPlaneSupportedDisplaysKHR_VkResult_return, sizeof(VkResult));
     countingStream->clearPool();
@@ -12294,6 +12834,7 @@
     uint32_t* pPropertyCount,
     VkDisplayModePropertiesKHR* pProperties)
 {
+    AEMU_SCOPED_TRACE("vkGetDisplayModePropertiesKHR encode");
     mImpl->log("start vkGetDisplayModePropertiesKHR");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -12358,6 +12899,7 @@
             marshal_VkDisplayModePropertiesKHR(stream, (VkDisplayModePropertiesKHR*)(pProperties + i));
         }
     }
+    AEMU_SCOPED_TRACE("vkGetDisplayModePropertiesKHR readParams");
     // WARNING PTR CHECK
     uint32_t* check_pPropertyCount;
     check_pPropertyCount = (uint32_t*)(uintptr_t)stream->getBe64();
@@ -12390,6 +12932,7 @@
             transform_fromhost_VkDisplayModePropertiesKHR(mImpl->resources(), (VkDisplayModePropertiesKHR*)(pProperties + i));
         }
     }
+    AEMU_SCOPED_TRACE("vkGetDisplayModePropertiesKHR returnUnmarshal");
     VkResult vkGetDisplayModePropertiesKHR_VkResult_return = (VkResult)0;
     stream->read(&vkGetDisplayModePropertiesKHR_VkResult_return, sizeof(VkResult));
     countingStream->clearPool();
@@ -12406,6 +12949,7 @@
     const VkAllocationCallbacks* pAllocator,
     VkDisplayModeKHR* pMode)
 {
+    AEMU_SCOPED_TRACE("vkCreateDisplayModeKHR encode");
     mImpl->log("start vkCreateDisplayModeKHR");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -12483,11 +13027,13 @@
     stream->handleMapping()->mapHandles_VkDisplayModeKHR_u64(pMode, &cgen_var_901, 1);
     stream->write((uint64_t*)&cgen_var_901, 8);
     stream->setHandleMapping(resources->unwrapMapping());
+    AEMU_SCOPED_TRACE("vkCreateDisplayModeKHR readParams");
     stream->setHandleMapping(resources->createMapping());
     uint64_t cgen_var_902;
     stream->read((uint64_t*)&cgen_var_902, 8);
     stream->handleMapping()->mapHandles_u64_VkDisplayModeKHR(&cgen_var_902, (VkDisplayModeKHR*)pMode, 1);
     stream->unsetHandleMapping();
+    AEMU_SCOPED_TRACE("vkCreateDisplayModeKHR returnUnmarshal");
     VkResult vkCreateDisplayModeKHR_VkResult_return = (VkResult)0;
     stream->read(&vkCreateDisplayModeKHR_VkResult_return, sizeof(VkResult));
     countingStream->clearPool();
@@ -12503,6 +13049,7 @@
     uint32_t planeIndex,
     VkDisplayPlaneCapabilitiesKHR* pCapabilities)
 {
+    AEMU_SCOPED_TRACE("vkGetDisplayPlaneCapabilitiesKHR encode");
     mImpl->log("start vkGetDisplayPlaneCapabilitiesKHR");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -12539,11 +13086,13 @@
     stream->write((uint64_t*)&cgen_var_906, 1 * 8);
     stream->write((uint32_t*)&local_planeIndex, sizeof(uint32_t));
     marshal_VkDisplayPlaneCapabilitiesKHR(stream, (VkDisplayPlaneCapabilitiesKHR*)(pCapabilities));
+    AEMU_SCOPED_TRACE("vkGetDisplayPlaneCapabilitiesKHR readParams");
     unmarshal_VkDisplayPlaneCapabilitiesKHR(stream, (VkDisplayPlaneCapabilitiesKHR*)(pCapabilities));
     if (pCapabilities)
     {
         transform_fromhost_VkDisplayPlaneCapabilitiesKHR(mImpl->resources(), (VkDisplayPlaneCapabilitiesKHR*)(pCapabilities));
     }
+    AEMU_SCOPED_TRACE("vkGetDisplayPlaneCapabilitiesKHR returnUnmarshal");
     VkResult vkGetDisplayPlaneCapabilitiesKHR_VkResult_return = (VkResult)0;
     stream->read(&vkGetDisplayPlaneCapabilitiesKHR_VkResult_return, sizeof(VkResult));
     countingStream->clearPool();
@@ -12559,6 +13108,7 @@
     const VkAllocationCallbacks* pAllocator,
     VkSurfaceKHR* pSurface)
 {
+    AEMU_SCOPED_TRACE("vkCreateDisplayPlaneSurfaceKHR encode");
     mImpl->log("start vkCreateDisplayPlaneSurfaceKHR");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -12628,9 +13178,11 @@
     stream->handleMapping()->mapHandles_VkSurfaceKHR_u64(pSurface, &cgen_var_912, 1);
     stream->write((uint64_t*)&cgen_var_912, 8);
     stream->setHandleMapping(resources->unwrapMapping());
+    AEMU_SCOPED_TRACE("vkCreateDisplayPlaneSurfaceKHR readParams");
     uint64_t cgen_var_913;
     stream->read((uint64_t*)&cgen_var_913, 8);
     stream->handleMapping()->mapHandles_u64_VkSurfaceKHR(&cgen_var_913, (VkSurfaceKHR*)pSurface, 1);
+    AEMU_SCOPED_TRACE("vkCreateDisplayPlaneSurfaceKHR returnUnmarshal");
     VkResult vkCreateDisplayPlaneSurfaceKHR_VkResult_return = (VkResult)0;
     stream->read(&vkCreateDisplayPlaneSurfaceKHR_VkResult_return, sizeof(VkResult));
     countingStream->clearPool();
@@ -12649,6 +13201,7 @@
     const VkAllocationCallbacks* pAllocator,
     VkSwapchainKHR* pSwapchains)
 {
+    AEMU_SCOPED_TRACE("vkCreateSharedSwapchainsKHR encode");
     mImpl->log("start vkCreateSharedSwapchainsKHR");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -12742,6 +13295,7 @@
         stream->write((uint64_t*)cgen_var_919, ((swapchainCount)) * 8);
     }
     stream->setHandleMapping(resources->unwrapMapping());
+    AEMU_SCOPED_TRACE("vkCreateSharedSwapchainsKHR readParams");
     if (((swapchainCount)))
     {
         uint64_t* cgen_var_920;
@@ -12749,6 +13303,7 @@
         stream->read((uint64_t*)cgen_var_920, ((swapchainCount)) * 8);
         stream->handleMapping()->mapHandles_u64_VkSwapchainKHR(cgen_var_920, (VkSwapchainKHR*)pSwapchains, ((swapchainCount)));
     }
+    AEMU_SCOPED_TRACE("vkCreateSharedSwapchainsKHR returnUnmarshal");
     VkResult vkCreateSharedSwapchainsKHR_VkResult_return = (VkResult)0;
     stream->read(&vkCreateSharedSwapchainsKHR_VkResult_return, sizeof(VkResult));
     countingStream->clearPool();
@@ -12766,6 +13321,7 @@
     const VkAllocationCallbacks* pAllocator,
     VkSurfaceKHR* pSurface)
 {
+    AEMU_SCOPED_TRACE("vkCreateXlibSurfaceKHR encode");
     mImpl->log("start vkCreateXlibSurfaceKHR");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -12835,9 +13391,11 @@
     stream->handleMapping()->mapHandles_VkSurfaceKHR_u64(pSurface, &cgen_var_926, 1);
     stream->write((uint64_t*)&cgen_var_926, 8);
     stream->setHandleMapping(resources->unwrapMapping());
+    AEMU_SCOPED_TRACE("vkCreateXlibSurfaceKHR readParams");
     uint64_t cgen_var_927;
     stream->read((uint64_t*)&cgen_var_927, 8);
     stream->handleMapping()->mapHandles_u64_VkSurfaceKHR(&cgen_var_927, (VkSurfaceKHR*)pSurface, 1);
+    AEMU_SCOPED_TRACE("vkCreateXlibSurfaceKHR returnUnmarshal");
     VkResult vkCreateXlibSurfaceKHR_VkResult_return = (VkResult)0;
     stream->read(&vkCreateXlibSurfaceKHR_VkResult_return, sizeof(VkResult));
     countingStream->clearPool();
@@ -12853,6 +13411,7 @@
     Display* dpy,
     VisualID visualID)
 {
+    AEMU_SCOPED_TRACE("vkGetPhysicalDeviceXlibPresentationSupportKHR encode");
     mImpl->log("start vkGetPhysicalDeviceXlibPresentationSupportKHR");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -12885,7 +13444,9 @@
     stream->write((uint32_t*)&local_queueFamilyIndex, sizeof(uint32_t));
     stream->write((Display*)dpy, sizeof(Display));
     stream->write((VisualID*)&local_visualID, sizeof(VisualID));
+    AEMU_SCOPED_TRACE("vkGetPhysicalDeviceXlibPresentationSupportKHR readParams");
     stream->read((Display*)dpy, sizeof(Display));
+    AEMU_SCOPED_TRACE("vkGetPhysicalDeviceXlibPresentationSupportKHR returnUnmarshal");
     VkBool32 vkGetPhysicalDeviceXlibPresentationSupportKHR_VkBool32_return = (VkBool32)0;
     stream->read(&vkGetPhysicalDeviceXlibPresentationSupportKHR_VkBool32_return, sizeof(VkBool32));
     countingStream->clearPool();
@@ -12903,6 +13464,7 @@
     const VkAllocationCallbacks* pAllocator,
     VkSurfaceKHR* pSurface)
 {
+    AEMU_SCOPED_TRACE("vkCreateXcbSurfaceKHR encode");
     mImpl->log("start vkCreateXcbSurfaceKHR");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -12972,9 +13534,11 @@
     stream->handleMapping()->mapHandles_VkSurfaceKHR_u64(pSurface, &cgen_var_935, 1);
     stream->write((uint64_t*)&cgen_var_935, 8);
     stream->setHandleMapping(resources->unwrapMapping());
+    AEMU_SCOPED_TRACE("vkCreateXcbSurfaceKHR readParams");
     uint64_t cgen_var_936;
     stream->read((uint64_t*)&cgen_var_936, 8);
     stream->handleMapping()->mapHandles_u64_VkSurfaceKHR(&cgen_var_936, (VkSurfaceKHR*)pSurface, 1);
+    AEMU_SCOPED_TRACE("vkCreateXcbSurfaceKHR returnUnmarshal");
     VkResult vkCreateXcbSurfaceKHR_VkResult_return = (VkResult)0;
     stream->read(&vkCreateXcbSurfaceKHR_VkResult_return, sizeof(VkResult));
     countingStream->clearPool();
@@ -12990,6 +13554,7 @@
     xcb_connection_t* connection,
     xcb_visualid_t visual_id)
 {
+    AEMU_SCOPED_TRACE("vkGetPhysicalDeviceXcbPresentationSupportKHR encode");
     mImpl->log("start vkGetPhysicalDeviceXcbPresentationSupportKHR");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -13022,7 +13587,9 @@
     stream->write((uint32_t*)&local_queueFamilyIndex, sizeof(uint32_t));
     stream->write((xcb_connection_t*)connection, sizeof(xcb_connection_t));
     stream->write((xcb_visualid_t*)&local_visual_id, sizeof(xcb_visualid_t));
+    AEMU_SCOPED_TRACE("vkGetPhysicalDeviceXcbPresentationSupportKHR readParams");
     stream->read((xcb_connection_t*)connection, sizeof(xcb_connection_t));
+    AEMU_SCOPED_TRACE("vkGetPhysicalDeviceXcbPresentationSupportKHR returnUnmarshal");
     VkBool32 vkGetPhysicalDeviceXcbPresentationSupportKHR_VkBool32_return = (VkBool32)0;
     stream->read(&vkGetPhysicalDeviceXcbPresentationSupportKHR_VkBool32_return, sizeof(VkBool32));
     countingStream->clearPool();
@@ -13040,6 +13607,7 @@
     const VkAllocationCallbacks* pAllocator,
     VkSurfaceKHR* pSurface)
 {
+    AEMU_SCOPED_TRACE("vkCreateWaylandSurfaceKHR encode");
     mImpl->log("start vkCreateWaylandSurfaceKHR");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -13109,9 +13677,11 @@
     stream->handleMapping()->mapHandles_VkSurfaceKHR_u64(pSurface, &cgen_var_944, 1);
     stream->write((uint64_t*)&cgen_var_944, 8);
     stream->setHandleMapping(resources->unwrapMapping());
+    AEMU_SCOPED_TRACE("vkCreateWaylandSurfaceKHR readParams");
     uint64_t cgen_var_945;
     stream->read((uint64_t*)&cgen_var_945, 8);
     stream->handleMapping()->mapHandles_u64_VkSurfaceKHR(&cgen_var_945, (VkSurfaceKHR*)pSurface, 1);
+    AEMU_SCOPED_TRACE("vkCreateWaylandSurfaceKHR returnUnmarshal");
     VkResult vkCreateWaylandSurfaceKHR_VkResult_return = (VkResult)0;
     stream->read(&vkCreateWaylandSurfaceKHR_VkResult_return, sizeof(VkResult));
     countingStream->clearPool();
@@ -13126,6 +13696,7 @@
     uint32_t queueFamilyIndex,
     wl_display* display)
 {
+    AEMU_SCOPED_TRACE("vkGetPhysicalDeviceWaylandPresentationSupportKHR encode");
     mImpl->log("start vkGetPhysicalDeviceWaylandPresentationSupportKHR");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -13154,7 +13725,9 @@
     stream->write((uint64_t*)&cgen_var_947, 1 * 8);
     stream->write((uint32_t*)&local_queueFamilyIndex, sizeof(uint32_t));
     stream->write((wl_display*)display, sizeof(wl_display));
+    AEMU_SCOPED_TRACE("vkGetPhysicalDeviceWaylandPresentationSupportKHR readParams");
     stream->read((wl_display*)display, sizeof(wl_display));
+    AEMU_SCOPED_TRACE("vkGetPhysicalDeviceWaylandPresentationSupportKHR returnUnmarshal");
     VkBool32 vkGetPhysicalDeviceWaylandPresentationSupportKHR_VkBool32_return = (VkBool32)0;
     stream->read(&vkGetPhysicalDeviceWaylandPresentationSupportKHR_VkBool32_return, sizeof(VkBool32));
     countingStream->clearPool();
@@ -13172,6 +13745,7 @@
     const VkAllocationCallbacks* pAllocator,
     VkSurfaceKHR* pSurface)
 {
+    AEMU_SCOPED_TRACE("vkCreateMirSurfaceKHR encode");
     mImpl->log("start vkCreateMirSurfaceKHR");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -13241,9 +13815,11 @@
     stream->handleMapping()->mapHandles_VkSurfaceKHR_u64(pSurface, &cgen_var_953, 1);
     stream->write((uint64_t*)&cgen_var_953, 8);
     stream->setHandleMapping(resources->unwrapMapping());
+    AEMU_SCOPED_TRACE("vkCreateMirSurfaceKHR readParams");
     uint64_t cgen_var_954;
     stream->read((uint64_t*)&cgen_var_954, 8);
     stream->handleMapping()->mapHandles_u64_VkSurfaceKHR(&cgen_var_954, (VkSurfaceKHR*)pSurface, 1);
+    AEMU_SCOPED_TRACE("vkCreateMirSurfaceKHR returnUnmarshal");
     VkResult vkCreateMirSurfaceKHR_VkResult_return = (VkResult)0;
     stream->read(&vkCreateMirSurfaceKHR_VkResult_return, sizeof(VkResult));
     countingStream->clearPool();
@@ -13258,6 +13834,7 @@
     uint32_t queueFamilyIndex,
     MirConnection* connection)
 {
+    AEMU_SCOPED_TRACE("vkGetPhysicalDeviceMirPresentationSupportKHR encode");
     mImpl->log("start vkGetPhysicalDeviceMirPresentationSupportKHR");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -13286,7 +13863,9 @@
     stream->write((uint64_t*)&cgen_var_956, 1 * 8);
     stream->write((uint32_t*)&local_queueFamilyIndex, sizeof(uint32_t));
     stream->write((MirConnection*)connection, sizeof(MirConnection));
+    AEMU_SCOPED_TRACE("vkGetPhysicalDeviceMirPresentationSupportKHR readParams");
     stream->read((MirConnection*)connection, sizeof(MirConnection));
+    AEMU_SCOPED_TRACE("vkGetPhysicalDeviceMirPresentationSupportKHR returnUnmarshal");
     VkBool32 vkGetPhysicalDeviceMirPresentationSupportKHR_VkBool32_return = (VkBool32)0;
     stream->read(&vkGetPhysicalDeviceMirPresentationSupportKHR_VkBool32_return, sizeof(VkBool32));
     countingStream->clearPool();
@@ -13304,6 +13883,7 @@
     const VkAllocationCallbacks* pAllocator,
     VkSurfaceKHR* pSurface)
 {
+    AEMU_SCOPED_TRACE("vkCreateAndroidSurfaceKHR encode");
     mImpl->log("start vkCreateAndroidSurfaceKHR");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -13373,9 +13953,11 @@
     stream->handleMapping()->mapHandles_VkSurfaceKHR_u64(pSurface, &cgen_var_962, 1);
     stream->write((uint64_t*)&cgen_var_962, 8);
     stream->setHandleMapping(resources->unwrapMapping());
+    AEMU_SCOPED_TRACE("vkCreateAndroidSurfaceKHR readParams");
     uint64_t cgen_var_963;
     stream->read((uint64_t*)&cgen_var_963, 8);
     stream->handleMapping()->mapHandles_u64_VkSurfaceKHR(&cgen_var_963, (VkSurfaceKHR*)pSurface, 1);
+    AEMU_SCOPED_TRACE("vkCreateAndroidSurfaceKHR returnUnmarshal");
     VkResult vkCreateAndroidSurfaceKHR_VkResult_return = (VkResult)0;
     stream->read(&vkCreateAndroidSurfaceKHR_VkResult_return, sizeof(VkResult));
     countingStream->clearPool();
@@ -13393,6 +13975,7 @@
     const VkAllocationCallbacks* pAllocator,
     VkSurfaceKHR* pSurface)
 {
+    AEMU_SCOPED_TRACE("vkCreateWin32SurfaceKHR encode");
     mImpl->log("start vkCreateWin32SurfaceKHR");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -13462,9 +14045,11 @@
     stream->handleMapping()->mapHandles_VkSurfaceKHR_u64(pSurface, &cgen_var_969, 1);
     stream->write((uint64_t*)&cgen_var_969, 8);
     stream->setHandleMapping(resources->unwrapMapping());
+    AEMU_SCOPED_TRACE("vkCreateWin32SurfaceKHR readParams");
     uint64_t cgen_var_970;
     stream->read((uint64_t*)&cgen_var_970, 8);
     stream->handleMapping()->mapHandles_u64_VkSurfaceKHR(&cgen_var_970, (VkSurfaceKHR*)pSurface, 1);
+    AEMU_SCOPED_TRACE("vkCreateWin32SurfaceKHR returnUnmarshal");
     VkResult vkCreateWin32SurfaceKHR_VkResult_return = (VkResult)0;
     stream->read(&vkCreateWin32SurfaceKHR_VkResult_return, sizeof(VkResult));
     countingStream->clearPool();
@@ -13478,6 +14063,7 @@
     VkPhysicalDevice physicalDevice,
     uint32_t queueFamilyIndex)
 {
+    AEMU_SCOPED_TRACE("vkGetPhysicalDeviceWin32PresentationSupportKHR encode");
     mImpl->log("start vkGetPhysicalDeviceWin32PresentationSupportKHR");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -13504,6 +14090,8 @@
     stream->handleMapping()->mapHandles_VkPhysicalDevice_u64(&local_physicalDevice, &cgen_var_972, 1);
     stream->write((uint64_t*)&cgen_var_972, 1 * 8);
     stream->write((uint32_t*)&local_queueFamilyIndex, sizeof(uint32_t));
+    AEMU_SCOPED_TRACE("vkGetPhysicalDeviceWin32PresentationSupportKHR readParams");
+    AEMU_SCOPED_TRACE("vkGetPhysicalDeviceWin32PresentationSupportKHR returnUnmarshal");
     VkBool32 vkGetPhysicalDeviceWin32PresentationSupportKHR_VkBool32_return = (VkBool32)0;
     stream->read(&vkGetPhysicalDeviceWin32PresentationSupportKHR_VkBool32_return, sizeof(VkBool32));
     countingStream->clearPool();
@@ -13523,6 +14111,7 @@
     VkPhysicalDevice physicalDevice,
     VkPhysicalDeviceFeatures2* pFeatures)
 {
+    AEMU_SCOPED_TRACE("vkGetPhysicalDeviceFeatures2KHR encode");
     mImpl->log("start vkGetPhysicalDeviceFeatures2KHR");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -13547,11 +14136,13 @@
     stream->handleMapping()->mapHandles_VkPhysicalDevice_u64(&local_physicalDevice, &cgen_var_974, 1);
     stream->write((uint64_t*)&cgen_var_974, 1 * 8);
     marshal_VkPhysicalDeviceFeatures2(stream, (VkPhysicalDeviceFeatures2*)(pFeatures));
+    AEMU_SCOPED_TRACE("vkGetPhysicalDeviceFeatures2KHR readParams");
     unmarshal_VkPhysicalDeviceFeatures2(stream, (VkPhysicalDeviceFeatures2*)(pFeatures));
     if (pFeatures)
     {
         transform_fromhost_VkPhysicalDeviceFeatures2(mImpl->resources(), (VkPhysicalDeviceFeatures2*)(pFeatures));
     }
+    AEMU_SCOPED_TRACE("vkGetPhysicalDeviceFeatures2KHR returnUnmarshal");
     mImpl->log("finish vkGetPhysicalDeviceFeatures2KHR");;
 }
 
@@ -13559,6 +14150,7 @@
     VkPhysicalDevice physicalDevice,
     VkPhysicalDeviceProperties2* pProperties)
 {
+    AEMU_SCOPED_TRACE("vkGetPhysicalDeviceProperties2KHR encode");
     mImpl->log("start vkGetPhysicalDeviceProperties2KHR");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -13583,11 +14175,13 @@
     stream->handleMapping()->mapHandles_VkPhysicalDevice_u64(&local_physicalDevice, &cgen_var_976, 1);
     stream->write((uint64_t*)&cgen_var_976, 1 * 8);
     marshal_VkPhysicalDeviceProperties2(stream, (VkPhysicalDeviceProperties2*)(pProperties));
+    AEMU_SCOPED_TRACE("vkGetPhysicalDeviceProperties2KHR readParams");
     unmarshal_VkPhysicalDeviceProperties2(stream, (VkPhysicalDeviceProperties2*)(pProperties));
     if (pProperties)
     {
         transform_fromhost_VkPhysicalDeviceProperties2(mImpl->resources(), (VkPhysicalDeviceProperties2*)(pProperties));
     }
+    AEMU_SCOPED_TRACE("vkGetPhysicalDeviceProperties2KHR returnUnmarshal");
     mImpl->log("finish vkGetPhysicalDeviceProperties2KHR");;
 }
 
@@ -13596,6 +14190,7 @@
     VkFormat format,
     VkFormatProperties2* pFormatProperties)
 {
+    AEMU_SCOPED_TRACE("vkGetPhysicalDeviceFormatProperties2KHR encode");
     mImpl->log("start vkGetPhysicalDeviceFormatProperties2KHR");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -13624,11 +14219,13 @@
     stream->write((uint64_t*)&cgen_var_978, 1 * 8);
     stream->write((VkFormat*)&local_format, sizeof(VkFormat));
     marshal_VkFormatProperties2(stream, (VkFormatProperties2*)(pFormatProperties));
+    AEMU_SCOPED_TRACE("vkGetPhysicalDeviceFormatProperties2KHR readParams");
     unmarshal_VkFormatProperties2(stream, (VkFormatProperties2*)(pFormatProperties));
     if (pFormatProperties)
     {
         transform_fromhost_VkFormatProperties2(mImpl->resources(), (VkFormatProperties2*)(pFormatProperties));
     }
+    AEMU_SCOPED_TRACE("vkGetPhysicalDeviceFormatProperties2KHR returnUnmarshal");
     mImpl->log("finish vkGetPhysicalDeviceFormatProperties2KHR");;
 }
 
@@ -13637,6 +14234,7 @@
     const VkPhysicalDeviceImageFormatInfo2* pImageFormatInfo,
     VkImageFormatProperties2* pImageFormatProperties)
 {
+    AEMU_SCOPED_TRACE("vkGetPhysicalDeviceImageFormatProperties2KHR encode");
     mImpl->log("start vkGetPhysicalDeviceImageFormatProperties2KHR");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -13674,11 +14272,13 @@
     stream->write((uint64_t*)&cgen_var_980, 1 * 8);
     marshal_VkPhysicalDeviceImageFormatInfo2(stream, (VkPhysicalDeviceImageFormatInfo2*)(local_pImageFormatInfo));
     marshal_VkImageFormatProperties2(stream, (VkImageFormatProperties2*)(pImageFormatProperties));
+    AEMU_SCOPED_TRACE("vkGetPhysicalDeviceImageFormatProperties2KHR readParams");
     unmarshal_VkImageFormatProperties2(stream, (VkImageFormatProperties2*)(pImageFormatProperties));
     if (pImageFormatProperties)
     {
         transform_fromhost_VkImageFormatProperties2(mImpl->resources(), (VkImageFormatProperties2*)(pImageFormatProperties));
     }
+    AEMU_SCOPED_TRACE("vkGetPhysicalDeviceImageFormatProperties2KHR returnUnmarshal");
     VkResult vkGetPhysicalDeviceImageFormatProperties2KHR_VkResult_return = (VkResult)0;
     stream->read(&vkGetPhysicalDeviceImageFormatProperties2KHR_VkResult_return, sizeof(VkResult));
     countingStream->clearPool();
@@ -13693,6 +14293,7 @@
     uint32_t* pQueueFamilyPropertyCount,
     VkQueueFamilyProperties2* pQueueFamilyProperties)
 {
+    AEMU_SCOPED_TRACE("vkGetPhysicalDeviceQueueFamilyProperties2KHR encode");
     mImpl->log("start vkGetPhysicalDeviceQueueFamilyProperties2KHR");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -13749,6 +14350,7 @@
             marshal_VkQueueFamilyProperties2(stream, (VkQueueFamilyProperties2*)(pQueueFamilyProperties + i));
         }
     }
+    AEMU_SCOPED_TRACE("vkGetPhysicalDeviceQueueFamilyProperties2KHR readParams");
     // WARNING PTR CHECK
     uint32_t* check_pQueueFamilyPropertyCount;
     check_pQueueFamilyPropertyCount = (uint32_t*)(uintptr_t)stream->getBe64();
@@ -13781,6 +14383,7 @@
             transform_fromhost_VkQueueFamilyProperties2(mImpl->resources(), (VkQueueFamilyProperties2*)(pQueueFamilyProperties + i));
         }
     }
+    AEMU_SCOPED_TRACE("vkGetPhysicalDeviceQueueFamilyProperties2KHR returnUnmarshal");
     mImpl->log("finish vkGetPhysicalDeviceQueueFamilyProperties2KHR");;
 }
 
@@ -13788,6 +14391,7 @@
     VkPhysicalDevice physicalDevice,
     VkPhysicalDeviceMemoryProperties2* pMemoryProperties)
 {
+    AEMU_SCOPED_TRACE("vkGetPhysicalDeviceMemoryProperties2KHR encode");
     mImpl->log("start vkGetPhysicalDeviceMemoryProperties2KHR");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -13812,11 +14416,13 @@
     stream->handleMapping()->mapHandles_VkPhysicalDevice_u64(&local_physicalDevice, &cgen_var_990, 1);
     stream->write((uint64_t*)&cgen_var_990, 1 * 8);
     marshal_VkPhysicalDeviceMemoryProperties2(stream, (VkPhysicalDeviceMemoryProperties2*)(pMemoryProperties));
+    AEMU_SCOPED_TRACE("vkGetPhysicalDeviceMemoryProperties2KHR readParams");
     unmarshal_VkPhysicalDeviceMemoryProperties2(stream, (VkPhysicalDeviceMemoryProperties2*)(pMemoryProperties));
     if (pMemoryProperties)
     {
         transform_fromhost_VkPhysicalDeviceMemoryProperties2(mImpl->resources(), (VkPhysicalDeviceMemoryProperties2*)(pMemoryProperties));
     }
+    AEMU_SCOPED_TRACE("vkGetPhysicalDeviceMemoryProperties2KHR returnUnmarshal");
     mImpl->resources()->on_vkGetPhysicalDeviceMemoryProperties2KHR(this, physicalDevice, pMemoryProperties);
     mImpl->log("finish vkGetPhysicalDeviceMemoryProperties2KHR");;
 }
@@ -13827,6 +14433,7 @@
     uint32_t* pPropertyCount,
     VkSparseImageFormatProperties2* pProperties)
 {
+    AEMU_SCOPED_TRACE("vkGetPhysicalDeviceSparseImageFormatProperties2KHR encode");
     mImpl->log("start vkGetPhysicalDeviceSparseImageFormatProperties2KHR");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -13896,6 +14503,7 @@
             marshal_VkSparseImageFormatProperties2(stream, (VkSparseImageFormatProperties2*)(pProperties + i));
         }
     }
+    AEMU_SCOPED_TRACE("vkGetPhysicalDeviceSparseImageFormatProperties2KHR readParams");
     // WARNING PTR CHECK
     uint32_t* check_pPropertyCount;
     check_pPropertyCount = (uint32_t*)(uintptr_t)stream->getBe64();
@@ -13928,6 +14536,7 @@
             transform_fromhost_VkSparseImageFormatProperties2(mImpl->resources(), (VkSparseImageFormatProperties2*)(pProperties + i));
         }
     }
+    AEMU_SCOPED_TRACE("vkGetPhysicalDeviceSparseImageFormatProperties2KHR returnUnmarshal");
     mImpl->log("finish vkGetPhysicalDeviceSparseImageFormatProperties2KHR");;
 }
 
@@ -13940,6 +14549,7 @@
     uint32_t remoteDeviceIndex,
     VkPeerMemoryFeatureFlags* pPeerMemoryFeatures)
 {
+    AEMU_SCOPED_TRACE("vkGetDeviceGroupPeerMemoryFeaturesKHR encode");
     mImpl->log("start vkGetDeviceGroupPeerMemoryFeaturesKHR");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -13976,7 +14586,9 @@
     stream->write((uint32_t*)&local_localDeviceIndex, sizeof(uint32_t));
     stream->write((uint32_t*)&local_remoteDeviceIndex, sizeof(uint32_t));
     stream->write((VkPeerMemoryFeatureFlags*)pPeerMemoryFeatures, sizeof(VkPeerMemoryFeatureFlags));
+    AEMU_SCOPED_TRACE("vkGetDeviceGroupPeerMemoryFeaturesKHR readParams");
     stream->read((VkPeerMemoryFeatureFlags*)pPeerMemoryFeatures, sizeof(VkPeerMemoryFeatureFlags));
+    AEMU_SCOPED_TRACE("vkGetDeviceGroupPeerMemoryFeaturesKHR returnUnmarshal");
     mImpl->log("finish vkGetDeviceGroupPeerMemoryFeaturesKHR");;
 }
 
@@ -13984,6 +14596,7 @@
     VkCommandBuffer commandBuffer,
     uint32_t deviceMask)
 {
+    AEMU_SCOPED_TRACE("vkCmdSetDeviceMaskKHR encode");
     mImpl->log("start vkCmdSetDeviceMaskKHR");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -14010,6 +14623,8 @@
     stream->handleMapping()->mapHandles_VkCommandBuffer_u64(&local_commandBuffer, &cgen_var_1002, 1);
     stream->write((uint64_t*)&cgen_var_1002, 1 * 8);
     stream->write((uint32_t*)&local_deviceMask, sizeof(uint32_t));
+    AEMU_SCOPED_TRACE("vkCmdSetDeviceMaskKHR readParams");
+    AEMU_SCOPED_TRACE("vkCmdSetDeviceMaskKHR returnUnmarshal");
     mImpl->log("finish vkCmdSetDeviceMaskKHR");;
 }
 
@@ -14022,6 +14637,7 @@
     uint32_t groupCountY,
     uint32_t groupCountZ)
 {
+    AEMU_SCOPED_TRACE("vkCmdDispatchBaseKHR encode");
     mImpl->log("start vkCmdDispatchBaseKHR");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -14068,6 +14684,8 @@
     stream->write((uint32_t*)&local_groupCountX, sizeof(uint32_t));
     stream->write((uint32_t*)&local_groupCountY, sizeof(uint32_t));
     stream->write((uint32_t*)&local_groupCountZ, sizeof(uint32_t));
+    AEMU_SCOPED_TRACE("vkCmdDispatchBaseKHR readParams");
+    AEMU_SCOPED_TRACE("vkCmdDispatchBaseKHR returnUnmarshal");
     mImpl->log("finish vkCmdDispatchBaseKHR");;
 }
 
@@ -14080,6 +14698,7 @@
     VkCommandPool commandPool,
     VkCommandPoolTrimFlags flags)
 {
+    AEMU_SCOPED_TRACE("vkTrimCommandPoolKHR encode");
     mImpl->log("start vkTrimCommandPoolKHR");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -14114,6 +14733,8 @@
     stream->handleMapping()->mapHandles_VkCommandPool_u64(&local_commandPool, &cgen_var_1008, 1);
     stream->write((uint64_t*)&cgen_var_1008, 1 * 8);
     stream->write((VkCommandPoolTrimFlags*)&local_flags, sizeof(VkCommandPoolTrimFlags));
+    AEMU_SCOPED_TRACE("vkTrimCommandPoolKHR readParams");
+    AEMU_SCOPED_TRACE("vkTrimCommandPoolKHR returnUnmarshal");
     mImpl->log("finish vkTrimCommandPoolKHR");;
 }
 
@@ -14124,6 +14745,7 @@
     uint32_t* pPhysicalDeviceGroupCount,
     VkPhysicalDeviceGroupProperties* pPhysicalDeviceGroupProperties)
 {
+    AEMU_SCOPED_TRACE("vkEnumeratePhysicalDeviceGroupsKHR encode");
     mImpl->log("start vkEnumeratePhysicalDeviceGroupsKHR");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -14180,6 +14802,7 @@
             marshal_VkPhysicalDeviceGroupProperties(stream, (VkPhysicalDeviceGroupProperties*)(pPhysicalDeviceGroupProperties + i));
         }
     }
+    AEMU_SCOPED_TRACE("vkEnumeratePhysicalDeviceGroupsKHR readParams");
     // WARNING PTR CHECK
     uint32_t* check_pPhysicalDeviceGroupCount;
     check_pPhysicalDeviceGroupCount = (uint32_t*)(uintptr_t)stream->getBe64();
@@ -14212,6 +14835,7 @@
             transform_fromhost_VkPhysicalDeviceGroupProperties(mImpl->resources(), (VkPhysicalDeviceGroupProperties*)(pPhysicalDeviceGroupProperties + i));
         }
     }
+    AEMU_SCOPED_TRACE("vkEnumeratePhysicalDeviceGroupsKHR returnUnmarshal");
     VkResult vkEnumeratePhysicalDeviceGroupsKHR_VkResult_return = (VkResult)0;
     stream->read(&vkEnumeratePhysicalDeviceGroupsKHR_VkResult_return, sizeof(VkResult));
     countingStream->clearPool();
@@ -14228,6 +14852,7 @@
     const VkPhysicalDeviceExternalBufferInfo* pExternalBufferInfo,
     VkExternalBufferProperties* pExternalBufferProperties)
 {
+    AEMU_SCOPED_TRACE("vkGetPhysicalDeviceExternalBufferPropertiesKHR encode");
     mImpl->log("start vkGetPhysicalDeviceExternalBufferPropertiesKHR");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -14266,12 +14891,14 @@
     stream->write((uint64_t*)&cgen_var_1018, 1 * 8);
     marshal_VkPhysicalDeviceExternalBufferInfo(stream, (VkPhysicalDeviceExternalBufferInfo*)(local_pExternalBufferInfo));
     marshal_VkExternalBufferProperties(stream, (VkExternalBufferProperties*)(pExternalBufferProperties));
+    AEMU_SCOPED_TRACE("vkGetPhysicalDeviceExternalBufferPropertiesKHR readParams");
     unmarshal_VkExternalBufferProperties(stream, (VkExternalBufferProperties*)(pExternalBufferProperties));
     if (pExternalBufferProperties)
     {
         mImpl->resources()->transformImpl_VkExternalBufferProperties_fromhost(pExternalBufferProperties, 1);
         transform_fromhost_VkExternalBufferProperties(mImpl->resources(), (VkExternalBufferProperties*)(pExternalBufferProperties));
     }
+    AEMU_SCOPED_TRACE("vkGetPhysicalDeviceExternalBufferPropertiesKHR returnUnmarshal");
     mImpl->log("finish vkGetPhysicalDeviceExternalBufferPropertiesKHR");;
 }
 
@@ -14284,6 +14911,7 @@
     const VkMemoryGetWin32HandleInfoKHR* pGetWin32HandleInfo,
     HANDLE* pHandle)
 {
+    AEMU_SCOPED_TRACE("vkGetMemoryWin32HandleKHR encode");
     mImpl->log("start vkGetMemoryWin32HandleKHR");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -14321,7 +14949,9 @@
     stream->write((uint64_t*)&cgen_var_1020, 1 * 8);
     marshal_VkMemoryGetWin32HandleInfoKHR(stream, (VkMemoryGetWin32HandleInfoKHR*)(local_pGetWin32HandleInfo));
     stream->write((HANDLE*)pHandle, sizeof(HANDLE));
+    AEMU_SCOPED_TRACE("vkGetMemoryWin32HandleKHR readParams");
     stream->read((HANDLE*)pHandle, sizeof(HANDLE));
+    AEMU_SCOPED_TRACE("vkGetMemoryWin32HandleKHR returnUnmarshal");
     VkResult vkGetMemoryWin32HandleKHR_VkResult_return = (VkResult)0;
     stream->read(&vkGetMemoryWin32HandleKHR_VkResult_return, sizeof(VkResult));
     countingStream->clearPool();
@@ -14337,6 +14967,7 @@
     HANDLE handle,
     VkMemoryWin32HandlePropertiesKHR* pMemoryWin32HandleProperties)
 {
+    AEMU_SCOPED_TRACE("vkGetMemoryWin32HandlePropertiesKHR encode");
     mImpl->log("start vkGetMemoryWin32HandlePropertiesKHR");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -14369,11 +15000,13 @@
     stream->write((VkExternalMemoryHandleTypeFlagBits*)&local_handleType, sizeof(VkExternalMemoryHandleTypeFlagBits));
     stream->write((HANDLE*)&local_handle, sizeof(HANDLE));
     marshal_VkMemoryWin32HandlePropertiesKHR(stream, (VkMemoryWin32HandlePropertiesKHR*)(pMemoryWin32HandleProperties));
+    AEMU_SCOPED_TRACE("vkGetMemoryWin32HandlePropertiesKHR readParams");
     unmarshal_VkMemoryWin32HandlePropertiesKHR(stream, (VkMemoryWin32HandlePropertiesKHR*)(pMemoryWin32HandleProperties));
     if (pMemoryWin32HandleProperties)
     {
         transform_fromhost_VkMemoryWin32HandlePropertiesKHR(mImpl->resources(), (VkMemoryWin32HandlePropertiesKHR*)(pMemoryWin32HandleProperties));
     }
+    AEMU_SCOPED_TRACE("vkGetMemoryWin32HandlePropertiesKHR returnUnmarshal");
     VkResult vkGetMemoryWin32HandlePropertiesKHR_VkResult_return = (VkResult)0;
     stream->read(&vkGetMemoryWin32HandlePropertiesKHR_VkResult_return, sizeof(VkResult));
     countingStream->clearPool();
@@ -14390,6 +15023,7 @@
     const VkMemoryGetFdInfoKHR* pGetFdInfo,
     int* pFd)
 {
+    AEMU_SCOPED_TRACE("vkGetMemoryFdKHR encode");
     mImpl->log("start vkGetMemoryFdKHR");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -14427,7 +15061,9 @@
     stream->write((uint64_t*)&cgen_var_1024, 1 * 8);
     marshal_VkMemoryGetFdInfoKHR(stream, (VkMemoryGetFdInfoKHR*)(local_pGetFdInfo));
     stream->write((int*)pFd, sizeof(int));
+    AEMU_SCOPED_TRACE("vkGetMemoryFdKHR readParams");
     stream->read((int*)pFd, sizeof(int));
+    AEMU_SCOPED_TRACE("vkGetMemoryFdKHR returnUnmarshal");
     VkResult vkGetMemoryFdKHR_VkResult_return = (VkResult)0;
     stream->read(&vkGetMemoryFdKHR_VkResult_return, sizeof(VkResult));
     countingStream->clearPool();
@@ -14443,6 +15079,7 @@
     int fd,
     VkMemoryFdPropertiesKHR* pMemoryFdProperties)
 {
+    AEMU_SCOPED_TRACE("vkGetMemoryFdPropertiesKHR encode");
     mImpl->log("start vkGetMemoryFdPropertiesKHR");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -14475,11 +15112,13 @@
     stream->write((VkExternalMemoryHandleTypeFlagBits*)&local_handleType, sizeof(VkExternalMemoryHandleTypeFlagBits));
     stream->write((int*)&local_fd, sizeof(int));
     marshal_VkMemoryFdPropertiesKHR(stream, (VkMemoryFdPropertiesKHR*)(pMemoryFdProperties));
+    AEMU_SCOPED_TRACE("vkGetMemoryFdPropertiesKHR readParams");
     unmarshal_VkMemoryFdPropertiesKHR(stream, (VkMemoryFdPropertiesKHR*)(pMemoryFdProperties));
     if (pMemoryFdProperties)
     {
         transform_fromhost_VkMemoryFdPropertiesKHR(mImpl->resources(), (VkMemoryFdPropertiesKHR*)(pMemoryFdProperties));
     }
+    AEMU_SCOPED_TRACE("vkGetMemoryFdPropertiesKHR returnUnmarshal");
     VkResult vkGetMemoryFdPropertiesKHR_VkResult_return = (VkResult)0;
     stream->read(&vkGetMemoryFdPropertiesKHR_VkResult_return, sizeof(VkResult));
     countingStream->clearPool();
@@ -14498,6 +15137,7 @@
     const VkPhysicalDeviceExternalSemaphoreInfo* pExternalSemaphoreInfo,
     VkExternalSemaphoreProperties* pExternalSemaphoreProperties)
 {
+    AEMU_SCOPED_TRACE("vkGetPhysicalDeviceExternalSemaphorePropertiesKHR encode");
     mImpl->log("start vkGetPhysicalDeviceExternalSemaphorePropertiesKHR");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -14535,11 +15175,13 @@
     stream->write((uint64_t*)&cgen_var_1028, 1 * 8);
     marshal_VkPhysicalDeviceExternalSemaphoreInfo(stream, (VkPhysicalDeviceExternalSemaphoreInfo*)(local_pExternalSemaphoreInfo));
     marshal_VkExternalSemaphoreProperties(stream, (VkExternalSemaphoreProperties*)(pExternalSemaphoreProperties));
+    AEMU_SCOPED_TRACE("vkGetPhysicalDeviceExternalSemaphorePropertiesKHR readParams");
     unmarshal_VkExternalSemaphoreProperties(stream, (VkExternalSemaphoreProperties*)(pExternalSemaphoreProperties));
     if (pExternalSemaphoreProperties)
     {
         transform_fromhost_VkExternalSemaphoreProperties(mImpl->resources(), (VkExternalSemaphoreProperties*)(pExternalSemaphoreProperties));
     }
+    AEMU_SCOPED_TRACE("vkGetPhysicalDeviceExternalSemaphorePropertiesKHR returnUnmarshal");
     mImpl->log("finish vkGetPhysicalDeviceExternalSemaphorePropertiesKHR");;
 }
 
@@ -14551,6 +15193,7 @@
     VkDevice device,
     const VkImportSemaphoreWin32HandleInfoKHR* pImportSemaphoreWin32HandleInfo)
 {
+    AEMU_SCOPED_TRACE("vkImportSemaphoreWin32HandleKHR encode");
     mImpl->log("start vkImportSemaphoreWin32HandleKHR");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -14586,6 +15229,8 @@
     stream->handleMapping()->mapHandles_VkDevice_u64(&local_device, &cgen_var_1030, 1);
     stream->write((uint64_t*)&cgen_var_1030, 1 * 8);
     marshal_VkImportSemaphoreWin32HandleInfoKHR(stream, (VkImportSemaphoreWin32HandleInfoKHR*)(local_pImportSemaphoreWin32HandleInfo));
+    AEMU_SCOPED_TRACE("vkImportSemaphoreWin32HandleKHR readParams");
+    AEMU_SCOPED_TRACE("vkImportSemaphoreWin32HandleKHR returnUnmarshal");
     VkResult vkImportSemaphoreWin32HandleKHR_VkResult_return = (VkResult)0;
     stream->read(&vkImportSemaphoreWin32HandleKHR_VkResult_return, sizeof(VkResult));
     countingStream->clearPool();
@@ -14600,6 +15245,7 @@
     const VkSemaphoreGetWin32HandleInfoKHR* pGetWin32HandleInfo,
     HANDLE* pHandle)
 {
+    AEMU_SCOPED_TRACE("vkGetSemaphoreWin32HandleKHR encode");
     mImpl->log("start vkGetSemaphoreWin32HandleKHR");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -14637,7 +15283,9 @@
     stream->write((uint64_t*)&cgen_var_1032, 1 * 8);
     marshal_VkSemaphoreGetWin32HandleInfoKHR(stream, (VkSemaphoreGetWin32HandleInfoKHR*)(local_pGetWin32HandleInfo));
     stream->write((HANDLE*)pHandle, sizeof(HANDLE));
+    AEMU_SCOPED_TRACE("vkGetSemaphoreWin32HandleKHR readParams");
     stream->read((HANDLE*)pHandle, sizeof(HANDLE));
+    AEMU_SCOPED_TRACE("vkGetSemaphoreWin32HandleKHR returnUnmarshal");
     VkResult vkGetSemaphoreWin32HandleKHR_VkResult_return = (VkResult)0;
     stream->read(&vkGetSemaphoreWin32HandleKHR_VkResult_return, sizeof(VkResult));
     countingStream->clearPool();
@@ -14653,6 +15301,7 @@
     VkDevice device,
     const VkImportSemaphoreFdInfoKHR* pImportSemaphoreFdInfo)
 {
+    AEMU_SCOPED_TRACE("vkImportSemaphoreFdKHR encode");
     mImpl->log("start vkImportSemaphoreFdKHR");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -14688,6 +15337,8 @@
     stream->handleMapping()->mapHandles_VkDevice_u64(&local_device, &cgen_var_1034, 1);
     stream->write((uint64_t*)&cgen_var_1034, 1 * 8);
     marshal_VkImportSemaphoreFdInfoKHR(stream, (VkImportSemaphoreFdInfoKHR*)(local_pImportSemaphoreFdInfo));
+    AEMU_SCOPED_TRACE("vkImportSemaphoreFdKHR readParams");
+    AEMU_SCOPED_TRACE("vkImportSemaphoreFdKHR returnUnmarshal");
     VkResult vkImportSemaphoreFdKHR_VkResult_return = (VkResult)0;
     stream->read(&vkImportSemaphoreFdKHR_VkResult_return, sizeof(VkResult));
     countingStream->clearPool();
@@ -14702,6 +15353,7 @@
     const VkSemaphoreGetFdInfoKHR* pGetFdInfo,
     int* pFd)
 {
+    AEMU_SCOPED_TRACE("vkGetSemaphoreFdKHR encode");
     mImpl->log("start vkGetSemaphoreFdKHR");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -14739,7 +15391,9 @@
     stream->write((uint64_t*)&cgen_var_1036, 1 * 8);
     marshal_VkSemaphoreGetFdInfoKHR(stream, (VkSemaphoreGetFdInfoKHR*)(local_pGetFdInfo));
     stream->write((int*)pFd, sizeof(int));
+    AEMU_SCOPED_TRACE("vkGetSemaphoreFdKHR readParams");
     stream->read((int*)pFd, sizeof(int));
+    AEMU_SCOPED_TRACE("vkGetSemaphoreFdKHR returnUnmarshal");
     VkResult vkGetSemaphoreFdKHR_VkResult_return = (VkResult)0;
     stream->read(&vkGetSemaphoreFdKHR_VkResult_return, sizeof(VkResult));
     countingStream->clearPool();
@@ -14759,6 +15413,7 @@
     uint32_t descriptorWriteCount,
     const VkWriteDescriptorSet* pDescriptorWrites)
 {
+    AEMU_SCOPED_TRACE("vkCmdPushDescriptorSetKHR encode");
     mImpl->log("start vkCmdPushDescriptorSetKHR");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -14826,6 +15481,8 @@
     {
         marshal_VkWriteDescriptorSet(stream, (VkWriteDescriptorSet*)(local_pDescriptorWrites + i));
     }
+    AEMU_SCOPED_TRACE("vkCmdPushDescriptorSetKHR readParams");
+    AEMU_SCOPED_TRACE("vkCmdPushDescriptorSetKHR returnUnmarshal");
     mImpl->log("finish vkCmdPushDescriptorSetKHR");;
 }
 
@@ -14836,6 +15493,7 @@
     uint32_t set,
     const void* pData)
 {
+    AEMU_SCOPED_TRACE("vkCmdPushDescriptorSetWithTemplateKHR encode");
     mImpl->log("start vkCmdPushDescriptorSetWithTemplateKHR");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -14898,6 +15556,8 @@
     {
         stream->write((void*)local_pData, sizeof(uint8_t));
     }
+    AEMU_SCOPED_TRACE("vkCmdPushDescriptorSetWithTemplateKHR readParams");
+    AEMU_SCOPED_TRACE("vkCmdPushDescriptorSetWithTemplateKHR returnUnmarshal");
     mImpl->log("finish vkCmdPushDescriptorSetWithTemplateKHR");;
 }
 
@@ -14913,6 +15573,7 @@
     const VkAllocationCallbacks* pAllocator,
     VkDescriptorUpdateTemplate* pDescriptorUpdateTemplate)
 {
+    AEMU_SCOPED_TRACE("vkCreateDescriptorUpdateTemplateKHR encode");
     mImpl->log("start vkCreateDescriptorUpdateTemplateKHR");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -14982,9 +15643,11 @@
     stream->handleMapping()->mapHandles_VkDescriptorUpdateTemplate_u64(pDescriptorUpdateTemplate, &cgen_var_1054, 1);
     stream->write((uint64_t*)&cgen_var_1054, 8);
     stream->setHandleMapping(resources->unwrapMapping());
+    AEMU_SCOPED_TRACE("vkCreateDescriptorUpdateTemplateKHR readParams");
     uint64_t cgen_var_1055;
     stream->read((uint64_t*)&cgen_var_1055, 8);
     stream->handleMapping()->mapHandles_u64_VkDescriptorUpdateTemplate(&cgen_var_1055, (VkDescriptorUpdateTemplate*)pDescriptorUpdateTemplate, 1);
+    AEMU_SCOPED_TRACE("vkCreateDescriptorUpdateTemplateKHR returnUnmarshal");
     VkResult vkCreateDescriptorUpdateTemplateKHR_VkResult_return = (VkResult)0;
     stream->read(&vkCreateDescriptorUpdateTemplateKHR_VkResult_return, sizeof(VkResult));
     countingStream->clearPool();
@@ -14999,6 +15662,7 @@
     VkDescriptorUpdateTemplate descriptorUpdateTemplate,
     const VkAllocationCallbacks* pAllocator)
 {
+    AEMU_SCOPED_TRACE("vkDestroyDescriptorUpdateTemplateKHR encode");
     mImpl->log("start vkDestroyDescriptorUpdateTemplateKHR");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -15055,6 +15719,8 @@
     {
         marshal_VkAllocationCallbacks(stream, (VkAllocationCallbacks*)(local_pAllocator));
     }
+    AEMU_SCOPED_TRACE("vkDestroyDescriptorUpdateTemplateKHR readParams");
+    AEMU_SCOPED_TRACE("vkDestroyDescriptorUpdateTemplateKHR returnUnmarshal");
     mImpl->log("finish vkDestroyDescriptorUpdateTemplateKHR");;
 }
 
@@ -15064,6 +15730,7 @@
     VkDescriptorUpdateTemplate descriptorUpdateTemplate,
     const void* pData)
 {
+    AEMU_SCOPED_TRACE("vkUpdateDescriptorSetWithTemplateKHR encode");
     mImpl->log("start vkUpdateDescriptorSetWithTemplateKHR");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -15122,6 +15789,8 @@
     {
         stream->write((void*)local_pData, sizeof(uint8_t));
     }
+    AEMU_SCOPED_TRACE("vkUpdateDescriptorSetWithTemplateKHR readParams");
+    AEMU_SCOPED_TRACE("vkUpdateDescriptorSetWithTemplateKHR returnUnmarshal");
     mImpl->log("finish vkUpdateDescriptorSetWithTemplateKHR");;
 }
 
@@ -15133,6 +15802,7 @@
     const VkAllocationCallbacks* pAllocator,
     VkRenderPass* pRenderPass)
 {
+    AEMU_SCOPED_TRACE("vkCreateRenderPass2KHR encode");
     mImpl->log("start vkCreateRenderPass2KHR");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -15202,9 +15872,11 @@
     stream->handleMapping()->mapHandles_VkRenderPass_u64(pRenderPass, &cgen_var_1075, 1);
     stream->write((uint64_t*)&cgen_var_1075, 8);
     stream->setHandleMapping(resources->unwrapMapping());
+    AEMU_SCOPED_TRACE("vkCreateRenderPass2KHR readParams");
     uint64_t cgen_var_1076;
     stream->read((uint64_t*)&cgen_var_1076, 8);
     stream->handleMapping()->mapHandles_u64_VkRenderPass(&cgen_var_1076, (VkRenderPass*)pRenderPass, 1);
+    AEMU_SCOPED_TRACE("vkCreateRenderPass2KHR returnUnmarshal");
     VkResult vkCreateRenderPass2KHR_VkResult_return = (VkResult)0;
     stream->read(&vkCreateRenderPass2KHR_VkResult_return, sizeof(VkResult));
     countingStream->clearPool();
@@ -15219,6 +15891,7 @@
     const VkRenderPassBeginInfo* pRenderPassBegin,
     const VkSubpassBeginInfoKHR* pSubpassBeginInfo)
 {
+    AEMU_SCOPED_TRACE("vkCmdBeginRenderPass2KHR encode");
     mImpl->log("start vkCmdBeginRenderPass2KHR");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -15267,6 +15940,8 @@
     stream->write((uint64_t*)&cgen_var_1078, 1 * 8);
     marshal_VkRenderPassBeginInfo(stream, (VkRenderPassBeginInfo*)(local_pRenderPassBegin));
     marshal_VkSubpassBeginInfoKHR(stream, (VkSubpassBeginInfoKHR*)(local_pSubpassBeginInfo));
+    AEMU_SCOPED_TRACE("vkCmdBeginRenderPass2KHR readParams");
+    AEMU_SCOPED_TRACE("vkCmdBeginRenderPass2KHR returnUnmarshal");
     mImpl->log("finish vkCmdBeginRenderPass2KHR");;
 }
 
@@ -15275,6 +15950,7 @@
     const VkSubpassBeginInfoKHR* pSubpassBeginInfo,
     const VkSubpassEndInfoKHR* pSubpassEndInfo)
 {
+    AEMU_SCOPED_TRACE("vkCmdNextSubpass2KHR encode");
     mImpl->log("start vkCmdNextSubpass2KHR");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -15323,6 +15999,8 @@
     stream->write((uint64_t*)&cgen_var_1080, 1 * 8);
     marshal_VkSubpassBeginInfoKHR(stream, (VkSubpassBeginInfoKHR*)(local_pSubpassBeginInfo));
     marshal_VkSubpassEndInfoKHR(stream, (VkSubpassEndInfoKHR*)(local_pSubpassEndInfo));
+    AEMU_SCOPED_TRACE("vkCmdNextSubpass2KHR readParams");
+    AEMU_SCOPED_TRACE("vkCmdNextSubpass2KHR returnUnmarshal");
     mImpl->log("finish vkCmdNextSubpass2KHR");;
 }
 
@@ -15330,6 +16008,7 @@
     VkCommandBuffer commandBuffer,
     const VkSubpassEndInfoKHR* pSubpassEndInfo)
 {
+    AEMU_SCOPED_TRACE("vkCmdEndRenderPass2KHR encode");
     mImpl->log("start vkCmdEndRenderPass2KHR");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -15365,6 +16044,8 @@
     stream->handleMapping()->mapHandles_VkCommandBuffer_u64(&local_commandBuffer, &cgen_var_1082, 1);
     stream->write((uint64_t*)&cgen_var_1082, 1 * 8);
     marshal_VkSubpassEndInfoKHR(stream, (VkSubpassEndInfoKHR*)(local_pSubpassEndInfo));
+    AEMU_SCOPED_TRACE("vkCmdEndRenderPass2KHR readParams");
+    AEMU_SCOPED_TRACE("vkCmdEndRenderPass2KHR returnUnmarshal");
     mImpl->log("finish vkCmdEndRenderPass2KHR");;
 }
 
@@ -15374,6 +16055,7 @@
     VkDevice device,
     VkSwapchainKHR swapchain)
 {
+    AEMU_SCOPED_TRACE("vkGetSwapchainStatusKHR encode");
     mImpl->log("start vkGetSwapchainStatusKHR");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -15404,6 +16086,8 @@
     uint64_t cgen_var_1086;
     stream->handleMapping()->mapHandles_VkSwapchainKHR_u64(&local_swapchain, &cgen_var_1086, 1);
     stream->write((uint64_t*)&cgen_var_1086, 1 * 8);
+    AEMU_SCOPED_TRACE("vkGetSwapchainStatusKHR readParams");
+    AEMU_SCOPED_TRACE("vkGetSwapchainStatusKHR returnUnmarshal");
     VkResult vkGetSwapchainStatusKHR_VkResult_return = (VkResult)0;
     stream->read(&vkGetSwapchainStatusKHR_VkResult_return, sizeof(VkResult));
     countingStream->clearPool();
@@ -15420,6 +16104,7 @@
     const VkPhysicalDeviceExternalFenceInfo* pExternalFenceInfo,
     VkExternalFenceProperties* pExternalFenceProperties)
 {
+    AEMU_SCOPED_TRACE("vkGetPhysicalDeviceExternalFencePropertiesKHR encode");
     mImpl->log("start vkGetPhysicalDeviceExternalFencePropertiesKHR");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -15457,11 +16142,13 @@
     stream->write((uint64_t*)&cgen_var_1088, 1 * 8);
     marshal_VkPhysicalDeviceExternalFenceInfo(stream, (VkPhysicalDeviceExternalFenceInfo*)(local_pExternalFenceInfo));
     marshal_VkExternalFenceProperties(stream, (VkExternalFenceProperties*)(pExternalFenceProperties));
+    AEMU_SCOPED_TRACE("vkGetPhysicalDeviceExternalFencePropertiesKHR readParams");
     unmarshal_VkExternalFenceProperties(stream, (VkExternalFenceProperties*)(pExternalFenceProperties));
     if (pExternalFenceProperties)
     {
         transform_fromhost_VkExternalFenceProperties(mImpl->resources(), (VkExternalFenceProperties*)(pExternalFenceProperties));
     }
+    AEMU_SCOPED_TRACE("vkGetPhysicalDeviceExternalFencePropertiesKHR returnUnmarshal");
     mImpl->log("finish vkGetPhysicalDeviceExternalFencePropertiesKHR");;
 }
 
@@ -15473,6 +16160,7 @@
     VkDevice device,
     const VkImportFenceWin32HandleInfoKHR* pImportFenceWin32HandleInfo)
 {
+    AEMU_SCOPED_TRACE("vkImportFenceWin32HandleKHR encode");
     mImpl->log("start vkImportFenceWin32HandleKHR");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -15508,6 +16196,8 @@
     stream->handleMapping()->mapHandles_VkDevice_u64(&local_device, &cgen_var_1090, 1);
     stream->write((uint64_t*)&cgen_var_1090, 1 * 8);
     marshal_VkImportFenceWin32HandleInfoKHR(stream, (VkImportFenceWin32HandleInfoKHR*)(local_pImportFenceWin32HandleInfo));
+    AEMU_SCOPED_TRACE("vkImportFenceWin32HandleKHR readParams");
+    AEMU_SCOPED_TRACE("vkImportFenceWin32HandleKHR returnUnmarshal");
     VkResult vkImportFenceWin32HandleKHR_VkResult_return = (VkResult)0;
     stream->read(&vkImportFenceWin32HandleKHR_VkResult_return, sizeof(VkResult));
     countingStream->clearPool();
@@ -15522,6 +16212,7 @@
     const VkFenceGetWin32HandleInfoKHR* pGetWin32HandleInfo,
     HANDLE* pHandle)
 {
+    AEMU_SCOPED_TRACE("vkGetFenceWin32HandleKHR encode");
     mImpl->log("start vkGetFenceWin32HandleKHR");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -15559,7 +16250,9 @@
     stream->write((uint64_t*)&cgen_var_1092, 1 * 8);
     marshal_VkFenceGetWin32HandleInfoKHR(stream, (VkFenceGetWin32HandleInfoKHR*)(local_pGetWin32HandleInfo));
     stream->write((HANDLE*)pHandle, sizeof(HANDLE));
+    AEMU_SCOPED_TRACE("vkGetFenceWin32HandleKHR readParams");
     stream->read((HANDLE*)pHandle, sizeof(HANDLE));
+    AEMU_SCOPED_TRACE("vkGetFenceWin32HandleKHR returnUnmarshal");
     VkResult vkGetFenceWin32HandleKHR_VkResult_return = (VkResult)0;
     stream->read(&vkGetFenceWin32HandleKHR_VkResult_return, sizeof(VkResult));
     countingStream->clearPool();
@@ -15575,6 +16268,7 @@
     VkDevice device,
     const VkImportFenceFdInfoKHR* pImportFenceFdInfo)
 {
+    AEMU_SCOPED_TRACE("vkImportFenceFdKHR encode");
     mImpl->log("start vkImportFenceFdKHR");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -15610,6 +16304,8 @@
     stream->handleMapping()->mapHandles_VkDevice_u64(&local_device, &cgen_var_1094, 1);
     stream->write((uint64_t*)&cgen_var_1094, 1 * 8);
     marshal_VkImportFenceFdInfoKHR(stream, (VkImportFenceFdInfoKHR*)(local_pImportFenceFdInfo));
+    AEMU_SCOPED_TRACE("vkImportFenceFdKHR readParams");
+    AEMU_SCOPED_TRACE("vkImportFenceFdKHR returnUnmarshal");
     VkResult vkImportFenceFdKHR_VkResult_return = (VkResult)0;
     stream->read(&vkImportFenceFdKHR_VkResult_return, sizeof(VkResult));
     countingStream->clearPool();
@@ -15624,6 +16320,7 @@
     const VkFenceGetFdInfoKHR* pGetFdInfo,
     int* pFd)
 {
+    AEMU_SCOPED_TRACE("vkGetFenceFdKHR encode");
     mImpl->log("start vkGetFenceFdKHR");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -15661,7 +16358,9 @@
     stream->write((uint64_t*)&cgen_var_1096, 1 * 8);
     marshal_VkFenceGetFdInfoKHR(stream, (VkFenceGetFdInfoKHR*)(local_pGetFdInfo));
     stream->write((int*)pFd, sizeof(int));
+    AEMU_SCOPED_TRACE("vkGetFenceFdKHR readParams");
     stream->read((int*)pFd, sizeof(int));
+    AEMU_SCOPED_TRACE("vkGetFenceFdKHR returnUnmarshal");
     VkResult vkGetFenceFdKHR_VkResult_return = (VkResult)0;
     stream->read(&vkGetFenceFdKHR_VkResult_return, sizeof(VkResult));
     countingStream->clearPool();
@@ -15680,6 +16379,7 @@
     const VkPhysicalDeviceSurfaceInfo2KHR* pSurfaceInfo,
     VkSurfaceCapabilities2KHR* pSurfaceCapabilities)
 {
+    AEMU_SCOPED_TRACE("vkGetPhysicalDeviceSurfaceCapabilities2KHR encode");
     mImpl->log("start vkGetPhysicalDeviceSurfaceCapabilities2KHR");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -15717,11 +16417,13 @@
     stream->write((uint64_t*)&cgen_var_1098, 1 * 8);
     marshal_VkPhysicalDeviceSurfaceInfo2KHR(stream, (VkPhysicalDeviceSurfaceInfo2KHR*)(local_pSurfaceInfo));
     marshal_VkSurfaceCapabilities2KHR(stream, (VkSurfaceCapabilities2KHR*)(pSurfaceCapabilities));
+    AEMU_SCOPED_TRACE("vkGetPhysicalDeviceSurfaceCapabilities2KHR readParams");
     unmarshal_VkSurfaceCapabilities2KHR(stream, (VkSurfaceCapabilities2KHR*)(pSurfaceCapabilities));
     if (pSurfaceCapabilities)
     {
         transform_fromhost_VkSurfaceCapabilities2KHR(mImpl->resources(), (VkSurfaceCapabilities2KHR*)(pSurfaceCapabilities));
     }
+    AEMU_SCOPED_TRACE("vkGetPhysicalDeviceSurfaceCapabilities2KHR returnUnmarshal");
     VkResult vkGetPhysicalDeviceSurfaceCapabilities2KHR_VkResult_return = (VkResult)0;
     stream->read(&vkGetPhysicalDeviceSurfaceCapabilities2KHR_VkResult_return, sizeof(VkResult));
     countingStream->clearPool();
@@ -15737,6 +16439,7 @@
     uint32_t* pSurfaceFormatCount,
     VkSurfaceFormat2KHR* pSurfaceFormats)
 {
+    AEMU_SCOPED_TRACE("vkGetPhysicalDeviceSurfaceFormats2KHR encode");
     mImpl->log("start vkGetPhysicalDeviceSurfaceFormats2KHR");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -15806,6 +16509,7 @@
             marshal_VkSurfaceFormat2KHR(stream, (VkSurfaceFormat2KHR*)(pSurfaceFormats + i));
         }
     }
+    AEMU_SCOPED_TRACE("vkGetPhysicalDeviceSurfaceFormats2KHR readParams");
     // WARNING PTR CHECK
     uint32_t* check_pSurfaceFormatCount;
     check_pSurfaceFormatCount = (uint32_t*)(uintptr_t)stream->getBe64();
@@ -15838,6 +16542,7 @@
             transform_fromhost_VkSurfaceFormat2KHR(mImpl->resources(), (VkSurfaceFormat2KHR*)(pSurfaceFormats + i));
         }
     }
+    AEMU_SCOPED_TRACE("vkGetPhysicalDeviceSurfaceFormats2KHR returnUnmarshal");
     VkResult vkGetPhysicalDeviceSurfaceFormats2KHR_VkResult_return = (VkResult)0;
     stream->read(&vkGetPhysicalDeviceSurfaceFormats2KHR_VkResult_return, sizeof(VkResult));
     countingStream->clearPool();
@@ -15856,6 +16561,7 @@
     uint32_t* pPropertyCount,
     VkDisplayProperties2KHR* pProperties)
 {
+    AEMU_SCOPED_TRACE("vkGetPhysicalDeviceDisplayProperties2KHR encode");
     mImpl->log("start vkGetPhysicalDeviceDisplayProperties2KHR");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -15912,6 +16618,7 @@
             marshal_VkDisplayProperties2KHR(stream, (VkDisplayProperties2KHR*)(pProperties + i));
         }
     }
+    AEMU_SCOPED_TRACE("vkGetPhysicalDeviceDisplayProperties2KHR readParams");
     // WARNING PTR CHECK
     uint32_t* check_pPropertyCount;
     check_pPropertyCount = (uint32_t*)(uintptr_t)stream->getBe64();
@@ -15944,6 +16651,7 @@
             transform_fromhost_VkDisplayProperties2KHR(mImpl->resources(), (VkDisplayProperties2KHR*)(pProperties + i));
         }
     }
+    AEMU_SCOPED_TRACE("vkGetPhysicalDeviceDisplayProperties2KHR returnUnmarshal");
     VkResult vkGetPhysicalDeviceDisplayProperties2KHR_VkResult_return = (VkResult)0;
     stream->read(&vkGetPhysicalDeviceDisplayProperties2KHR_VkResult_return, sizeof(VkResult));
     countingStream->clearPool();
@@ -15958,6 +16666,7 @@
     uint32_t* pPropertyCount,
     VkDisplayPlaneProperties2KHR* pProperties)
 {
+    AEMU_SCOPED_TRACE("vkGetPhysicalDeviceDisplayPlaneProperties2KHR encode");
     mImpl->log("start vkGetPhysicalDeviceDisplayPlaneProperties2KHR");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -16014,6 +16723,7 @@
             marshal_VkDisplayPlaneProperties2KHR(stream, (VkDisplayPlaneProperties2KHR*)(pProperties + i));
         }
     }
+    AEMU_SCOPED_TRACE("vkGetPhysicalDeviceDisplayPlaneProperties2KHR readParams");
     // WARNING PTR CHECK
     uint32_t* check_pPropertyCount;
     check_pPropertyCount = (uint32_t*)(uintptr_t)stream->getBe64();
@@ -16046,6 +16756,7 @@
             transform_fromhost_VkDisplayPlaneProperties2KHR(mImpl->resources(), (VkDisplayPlaneProperties2KHR*)(pProperties + i));
         }
     }
+    AEMU_SCOPED_TRACE("vkGetPhysicalDeviceDisplayPlaneProperties2KHR returnUnmarshal");
     VkResult vkGetPhysicalDeviceDisplayPlaneProperties2KHR_VkResult_return = (VkResult)0;
     stream->read(&vkGetPhysicalDeviceDisplayPlaneProperties2KHR_VkResult_return, sizeof(VkResult));
     countingStream->clearPool();
@@ -16061,6 +16772,7 @@
     uint32_t* pPropertyCount,
     VkDisplayModeProperties2KHR* pProperties)
 {
+    AEMU_SCOPED_TRACE("vkGetDisplayModeProperties2KHR encode");
     mImpl->log("start vkGetDisplayModeProperties2KHR");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -16125,6 +16837,7 @@
             marshal_VkDisplayModeProperties2KHR(stream, (VkDisplayModeProperties2KHR*)(pProperties + i));
         }
     }
+    AEMU_SCOPED_TRACE("vkGetDisplayModeProperties2KHR readParams");
     // WARNING PTR CHECK
     uint32_t* check_pPropertyCount;
     check_pPropertyCount = (uint32_t*)(uintptr_t)stream->getBe64();
@@ -16157,6 +16870,7 @@
             transform_fromhost_VkDisplayModeProperties2KHR(mImpl->resources(), (VkDisplayModeProperties2KHR*)(pProperties + i));
         }
     }
+    AEMU_SCOPED_TRACE("vkGetDisplayModeProperties2KHR returnUnmarshal");
     VkResult vkGetDisplayModeProperties2KHR_VkResult_return = (VkResult)0;
     stream->read(&vkGetDisplayModeProperties2KHR_VkResult_return, sizeof(VkResult));
     countingStream->clearPool();
@@ -16171,6 +16885,7 @@
     const VkDisplayPlaneInfo2KHR* pDisplayPlaneInfo,
     VkDisplayPlaneCapabilities2KHR* pCapabilities)
 {
+    AEMU_SCOPED_TRACE("vkGetDisplayPlaneCapabilities2KHR encode");
     mImpl->log("start vkGetDisplayPlaneCapabilities2KHR");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -16208,11 +16923,13 @@
     stream->write((uint64_t*)&cgen_var_1134, 1 * 8);
     marshal_VkDisplayPlaneInfo2KHR(stream, (VkDisplayPlaneInfo2KHR*)(local_pDisplayPlaneInfo));
     marshal_VkDisplayPlaneCapabilities2KHR(stream, (VkDisplayPlaneCapabilities2KHR*)(pCapabilities));
+    AEMU_SCOPED_TRACE("vkGetDisplayPlaneCapabilities2KHR readParams");
     unmarshal_VkDisplayPlaneCapabilities2KHR(stream, (VkDisplayPlaneCapabilities2KHR*)(pCapabilities));
     if (pCapabilities)
     {
         transform_fromhost_VkDisplayPlaneCapabilities2KHR(mImpl->resources(), (VkDisplayPlaneCapabilities2KHR*)(pCapabilities));
     }
+    AEMU_SCOPED_TRACE("vkGetDisplayPlaneCapabilities2KHR returnUnmarshal");
     VkResult vkGetDisplayPlaneCapabilities2KHR_VkResult_return = (VkResult)0;
     stream->read(&vkGetDisplayPlaneCapabilities2KHR_VkResult_return, sizeof(VkResult));
     countingStream->clearPool();
@@ -16235,6 +16952,7 @@
     const VkImageMemoryRequirementsInfo2* pInfo,
     VkMemoryRequirements2* pMemoryRequirements)
 {
+    AEMU_SCOPED_TRACE("vkGetImageMemoryRequirements2KHR encode");
     mImpl->log("start vkGetImageMemoryRequirements2KHR");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -16272,11 +16990,13 @@
     stream->write((uint64_t*)&cgen_var_1136, 1 * 8);
     marshal_VkImageMemoryRequirementsInfo2(stream, (VkImageMemoryRequirementsInfo2*)(local_pInfo));
     marshal_VkMemoryRequirements2(stream, (VkMemoryRequirements2*)(pMemoryRequirements));
+    AEMU_SCOPED_TRACE("vkGetImageMemoryRequirements2KHR readParams");
     unmarshal_VkMemoryRequirements2(stream, (VkMemoryRequirements2*)(pMemoryRequirements));
     if (pMemoryRequirements)
     {
         transform_fromhost_VkMemoryRequirements2(mImpl->resources(), (VkMemoryRequirements2*)(pMemoryRequirements));
     }
+    AEMU_SCOPED_TRACE("vkGetImageMemoryRequirements2KHR returnUnmarshal");
     mImpl->log("finish vkGetImageMemoryRequirements2KHR");;
 }
 
@@ -16285,6 +17005,7 @@
     const VkBufferMemoryRequirementsInfo2* pInfo,
     VkMemoryRequirements2* pMemoryRequirements)
 {
+    AEMU_SCOPED_TRACE("vkGetBufferMemoryRequirements2KHR encode");
     mImpl->log("start vkGetBufferMemoryRequirements2KHR");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -16322,11 +17043,13 @@
     stream->write((uint64_t*)&cgen_var_1138, 1 * 8);
     marshal_VkBufferMemoryRequirementsInfo2(stream, (VkBufferMemoryRequirementsInfo2*)(local_pInfo));
     marshal_VkMemoryRequirements2(stream, (VkMemoryRequirements2*)(pMemoryRequirements));
+    AEMU_SCOPED_TRACE("vkGetBufferMemoryRequirements2KHR readParams");
     unmarshal_VkMemoryRequirements2(stream, (VkMemoryRequirements2*)(pMemoryRequirements));
     if (pMemoryRequirements)
     {
         transform_fromhost_VkMemoryRequirements2(mImpl->resources(), (VkMemoryRequirements2*)(pMemoryRequirements));
     }
+    AEMU_SCOPED_TRACE("vkGetBufferMemoryRequirements2KHR returnUnmarshal");
     mImpl->log("finish vkGetBufferMemoryRequirements2KHR");;
 }
 
@@ -16336,6 +17059,7 @@
     uint32_t* pSparseMemoryRequirementCount,
     VkSparseImageMemoryRequirements2* pSparseMemoryRequirements)
 {
+    AEMU_SCOPED_TRACE("vkGetImageSparseMemoryRequirements2KHR encode");
     mImpl->log("start vkGetImageSparseMemoryRequirements2KHR");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -16405,6 +17129,7 @@
             marshal_VkSparseImageMemoryRequirements2(stream, (VkSparseImageMemoryRequirements2*)(pSparseMemoryRequirements + i));
         }
     }
+    AEMU_SCOPED_TRACE("vkGetImageSparseMemoryRequirements2KHR readParams");
     // WARNING PTR CHECK
     uint32_t* check_pSparseMemoryRequirementCount;
     check_pSparseMemoryRequirementCount = (uint32_t*)(uintptr_t)stream->getBe64();
@@ -16437,6 +17162,7 @@
             transform_fromhost_VkSparseImageMemoryRequirements2(mImpl->resources(), (VkSparseImageMemoryRequirements2*)(pSparseMemoryRequirements + i));
         }
     }
+    AEMU_SCOPED_TRACE("vkGetImageSparseMemoryRequirements2KHR returnUnmarshal");
     mImpl->log("finish vkGetImageSparseMemoryRequirements2KHR");;
 }
 
@@ -16450,6 +17176,7 @@
     const VkAllocationCallbacks* pAllocator,
     VkSamplerYcbcrConversion* pYcbcrConversion)
 {
+    AEMU_SCOPED_TRACE("vkCreateSamplerYcbcrConversionKHR encode");
     mImpl->log("start vkCreateSamplerYcbcrConversionKHR");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -16519,9 +17246,11 @@
     stream->handleMapping()->mapHandles_VkSamplerYcbcrConversion_u64(pYcbcrConversion, &cgen_var_1152, 1);
     stream->write((uint64_t*)&cgen_var_1152, 8);
     stream->setHandleMapping(resources->unwrapMapping());
+    AEMU_SCOPED_TRACE("vkCreateSamplerYcbcrConversionKHR readParams");
     uint64_t cgen_var_1153;
     stream->read((uint64_t*)&cgen_var_1153, 8);
     stream->handleMapping()->mapHandles_u64_VkSamplerYcbcrConversion(&cgen_var_1153, (VkSamplerYcbcrConversion*)pYcbcrConversion, 1);
+    AEMU_SCOPED_TRACE("vkCreateSamplerYcbcrConversionKHR returnUnmarshal");
     VkResult vkCreateSamplerYcbcrConversionKHR_VkResult_return = (VkResult)0;
     stream->read(&vkCreateSamplerYcbcrConversionKHR_VkResult_return, sizeof(VkResult));
     countingStream->clearPool();
@@ -16536,6 +17265,7 @@
     VkSamplerYcbcrConversion ycbcrConversion,
     const VkAllocationCallbacks* pAllocator)
 {
+    AEMU_SCOPED_TRACE("vkDestroySamplerYcbcrConversionKHR encode");
     mImpl->log("start vkDestroySamplerYcbcrConversionKHR");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -16592,6 +17322,8 @@
     {
         marshal_VkAllocationCallbacks(stream, (VkAllocationCallbacks*)(local_pAllocator));
     }
+    AEMU_SCOPED_TRACE("vkDestroySamplerYcbcrConversionKHR readParams");
+    AEMU_SCOPED_TRACE("vkDestroySamplerYcbcrConversionKHR returnUnmarshal");
     mImpl->log("finish vkDestroySamplerYcbcrConversionKHR");;
 }
 
@@ -16602,6 +17334,7 @@
     uint32_t bindInfoCount,
     const VkBindBufferMemoryInfo* pBindInfos)
 {
+    AEMU_SCOPED_TRACE("vkBindBufferMemory2KHR encode");
     mImpl->log("start vkBindBufferMemory2KHR");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -16653,6 +17386,8 @@
     {
         marshal_VkBindBufferMemoryInfo(stream, (VkBindBufferMemoryInfo*)(local_pBindInfos + i));
     }
+    AEMU_SCOPED_TRACE("vkBindBufferMemory2KHR readParams");
+    AEMU_SCOPED_TRACE("vkBindBufferMemory2KHR returnUnmarshal");
     VkResult vkBindBufferMemory2KHR_VkResult_return = (VkResult)0;
     stream->read(&vkBindBufferMemory2KHR_VkResult_return, sizeof(VkResult));
     countingStream->clearPool();
@@ -16667,6 +17402,7 @@
     uint32_t bindInfoCount,
     const VkBindImageMemoryInfo* pBindInfos)
 {
+    AEMU_SCOPED_TRACE("vkBindImageMemory2KHR encode");
     mImpl->log("start vkBindImageMemory2KHR");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -16718,6 +17454,8 @@
     {
         marshal_VkBindImageMemoryInfo(stream, (VkBindImageMemoryInfo*)(local_pBindInfos + i));
     }
+    AEMU_SCOPED_TRACE("vkBindImageMemory2KHR readParams");
+    AEMU_SCOPED_TRACE("vkBindImageMemory2KHR returnUnmarshal");
     VkResult vkBindImageMemory2KHR_VkResult_return = (VkResult)0;
     stream->read(&vkBindImageMemory2KHR_VkResult_return, sizeof(VkResult));
     countingStream->clearPool();
@@ -16734,6 +17472,7 @@
     const VkDescriptorSetLayoutCreateInfo* pCreateInfo,
     VkDescriptorSetLayoutSupport* pSupport)
 {
+    AEMU_SCOPED_TRACE("vkGetDescriptorSetLayoutSupportKHR encode");
     mImpl->log("start vkGetDescriptorSetLayoutSupportKHR");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -16771,11 +17510,13 @@
     stream->write((uint64_t*)&cgen_var_1165, 1 * 8);
     marshal_VkDescriptorSetLayoutCreateInfo(stream, (VkDescriptorSetLayoutCreateInfo*)(local_pCreateInfo));
     marshal_VkDescriptorSetLayoutSupport(stream, (VkDescriptorSetLayoutSupport*)(pSupport));
+    AEMU_SCOPED_TRACE("vkGetDescriptorSetLayoutSupportKHR readParams");
     unmarshal_VkDescriptorSetLayoutSupport(stream, (VkDescriptorSetLayoutSupport*)(pSupport));
     if (pSupport)
     {
         transform_fromhost_VkDescriptorSetLayoutSupport(mImpl->resources(), (VkDescriptorSetLayoutSupport*)(pSupport));
     }
+    AEMU_SCOPED_TRACE("vkGetDescriptorSetLayoutSupportKHR returnUnmarshal");
     mImpl->log("finish vkGetDescriptorSetLayoutSupportKHR");;
 }
 
@@ -16790,6 +17531,7 @@
     uint32_t maxDrawCount,
     uint32_t stride)
 {
+    AEMU_SCOPED_TRACE("vkCmdDrawIndirectCountKHR encode");
     mImpl->log("start vkCmdDrawIndirectCountKHR");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -16844,6 +17586,8 @@
     stream->write((VkDeviceSize*)&local_countBufferOffset, sizeof(VkDeviceSize));
     stream->write((uint32_t*)&local_maxDrawCount, sizeof(uint32_t));
     stream->write((uint32_t*)&local_stride, sizeof(uint32_t));
+    AEMU_SCOPED_TRACE("vkCmdDrawIndirectCountKHR readParams");
+    AEMU_SCOPED_TRACE("vkCmdDrawIndirectCountKHR returnUnmarshal");
     mImpl->log("finish vkCmdDrawIndirectCountKHR");;
 }
 
@@ -16856,6 +17600,7 @@
     uint32_t maxDrawCount,
     uint32_t stride)
 {
+    AEMU_SCOPED_TRACE("vkCmdDrawIndexedIndirectCountKHR encode");
     mImpl->log("start vkCmdDrawIndexedIndirectCountKHR");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -16910,6 +17655,8 @@
     stream->write((VkDeviceSize*)&local_countBufferOffset, sizeof(VkDeviceSize));
     stream->write((uint32_t*)&local_maxDrawCount, sizeof(uint32_t));
     stream->write((uint32_t*)&local_stride, sizeof(uint32_t));
+    AEMU_SCOPED_TRACE("vkCmdDrawIndexedIndirectCountKHR readParams");
+    AEMU_SCOPED_TRACE("vkCmdDrawIndexedIndirectCountKHR returnUnmarshal");
     mImpl->log("finish vkCmdDrawIndexedIndirectCountKHR");;
 }
 
@@ -16923,6 +17670,7 @@
     VkImageUsageFlags imageUsage,
     int* grallocUsage)
 {
+    AEMU_SCOPED_TRACE("vkGetSwapchainGrallocUsageANDROID encode");
     mImpl->log("start vkGetSwapchainGrallocUsageANDROID");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -16955,7 +17703,9 @@
     stream->write((VkFormat*)&local_format, sizeof(VkFormat));
     stream->write((VkImageUsageFlags*)&local_imageUsage, sizeof(VkImageUsageFlags));
     stream->write((int*)grallocUsage, sizeof(int));
+    AEMU_SCOPED_TRACE("vkGetSwapchainGrallocUsageANDROID readParams");
     stream->read((int*)grallocUsage, sizeof(int));
+    AEMU_SCOPED_TRACE("vkGetSwapchainGrallocUsageANDROID returnUnmarshal");
     VkResult vkGetSwapchainGrallocUsageANDROID_VkResult_return = (VkResult)0;
     stream->read(&vkGetSwapchainGrallocUsageANDROID_VkResult_return, sizeof(VkResult));
     countingStream->clearPool();
@@ -16972,6 +17722,7 @@
     VkSemaphore semaphore,
     VkFence fence)
 {
+    AEMU_SCOPED_TRACE("vkAcquireImageANDROID encode");
     mImpl->log("start vkAcquireImageANDROID");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -17023,6 +17774,8 @@
     uint64_t cgen_var_1187;
     stream->handleMapping()->mapHandles_VkFence_u64(&local_fence, &cgen_var_1187, 1);
     stream->write((uint64_t*)&cgen_var_1187, 1 * 8);
+    AEMU_SCOPED_TRACE("vkAcquireImageANDROID readParams");
+    AEMU_SCOPED_TRACE("vkAcquireImageANDROID returnUnmarshal");
     VkResult vkAcquireImageANDROID_VkResult_return = (VkResult)0;
     stream->read(&vkAcquireImageANDROID_VkResult_return, sizeof(VkResult));
     countingStream->clearPool();
@@ -17039,6 +17792,7 @@
     VkImage image,
     int* pNativeFenceFd)
 {
+    AEMU_SCOPED_TRACE("vkQueueSignalReleaseImageANDROID encode");
     mImpl->log("start vkQueueSignalReleaseImageANDROID");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -17107,7 +17861,9 @@
     stream->handleMapping()->mapHandles_VkImage_u64(&local_image, &cgen_var_1195, 1);
     stream->write((uint64_t*)&cgen_var_1195, 1 * 8);
     stream->write((int*)pNativeFenceFd, sizeof(int));
+    AEMU_SCOPED_TRACE("vkQueueSignalReleaseImageANDROID readParams");
     stream->read((int*)pNativeFenceFd, sizeof(int));
+    AEMU_SCOPED_TRACE("vkQueueSignalReleaseImageANDROID returnUnmarshal");
     VkResult vkQueueSignalReleaseImageANDROID_VkResult_return = (VkResult)0;
     stream->read(&vkQueueSignalReleaseImageANDROID_VkResult_return, sizeof(VkResult));
     countingStream->clearPool();
@@ -17125,6 +17881,7 @@
     const VkAllocationCallbacks* pAllocator,
     VkDebugReportCallbackEXT* pCallback)
 {
+    AEMU_SCOPED_TRACE("vkCreateDebugReportCallbackEXT encode");
     mImpl->log("start vkCreateDebugReportCallbackEXT");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -17194,11 +17951,13 @@
     stream->handleMapping()->mapHandles_VkDebugReportCallbackEXT_u64(pCallback, &cgen_var_1201, 1);
     stream->write((uint64_t*)&cgen_var_1201, 8);
     stream->setHandleMapping(resources->unwrapMapping());
+    AEMU_SCOPED_TRACE("vkCreateDebugReportCallbackEXT readParams");
     stream->setHandleMapping(resources->createMapping());
     uint64_t cgen_var_1202;
     stream->read((uint64_t*)&cgen_var_1202, 8);
     stream->handleMapping()->mapHandles_u64_VkDebugReportCallbackEXT(&cgen_var_1202, (VkDebugReportCallbackEXT*)pCallback, 1);
     stream->unsetHandleMapping();
+    AEMU_SCOPED_TRACE("vkCreateDebugReportCallbackEXT returnUnmarshal");
     VkResult vkCreateDebugReportCallbackEXT_VkResult_return = (VkResult)0;
     stream->read(&vkCreateDebugReportCallbackEXT_VkResult_return, sizeof(VkResult));
     countingStream->clearPool();
@@ -17213,6 +17972,7 @@
     VkDebugReportCallbackEXT callback,
     const VkAllocationCallbacks* pAllocator)
 {
+    AEMU_SCOPED_TRACE("vkDestroyDebugReportCallbackEXT encode");
     mImpl->log("start vkDestroyDebugReportCallbackEXT");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -17269,6 +18029,8 @@
     {
         marshal_VkAllocationCallbacks(stream, (VkAllocationCallbacks*)(local_pAllocator));
     }
+    AEMU_SCOPED_TRACE("vkDestroyDebugReportCallbackEXT readParams");
+    AEMU_SCOPED_TRACE("vkDestroyDebugReportCallbackEXT returnUnmarshal");
     resources->destroyMapping()->mapHandles_VkDebugReportCallbackEXT((VkDebugReportCallbackEXT*)&callback);
     mImpl->log("finish vkDestroyDebugReportCallbackEXT");;
 }
@@ -17283,6 +18045,7 @@
     const char* pLayerPrefix,
     const char* pMessage)
 {
+    AEMU_SCOPED_TRACE("vkDebugReportMessageEXT encode");
     mImpl->log("start vkDebugReportMessageEXT");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -17343,6 +18106,8 @@
     stream->write((int32_t*)&local_messageCode, sizeof(int32_t));
     stream->putString(local_pLayerPrefix);
     stream->putString(local_pMessage);
+    AEMU_SCOPED_TRACE("vkDebugReportMessageEXT readParams");
+    AEMU_SCOPED_TRACE("vkDebugReportMessageEXT returnUnmarshal");
     mImpl->log("finish vkDebugReportMessageEXT");;
 }
 
@@ -17364,6 +18129,7 @@
     VkDevice device,
     const VkDebugMarkerObjectTagInfoEXT* pTagInfo)
 {
+    AEMU_SCOPED_TRACE("vkDebugMarkerSetObjectTagEXT encode");
     mImpl->log("start vkDebugMarkerSetObjectTagEXT");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -17399,6 +18165,8 @@
     stream->handleMapping()->mapHandles_VkDevice_u64(&local_device, &cgen_var_1214, 1);
     stream->write((uint64_t*)&cgen_var_1214, 1 * 8);
     marshal_VkDebugMarkerObjectTagInfoEXT(stream, (VkDebugMarkerObjectTagInfoEXT*)(local_pTagInfo));
+    AEMU_SCOPED_TRACE("vkDebugMarkerSetObjectTagEXT readParams");
+    AEMU_SCOPED_TRACE("vkDebugMarkerSetObjectTagEXT returnUnmarshal");
     VkResult vkDebugMarkerSetObjectTagEXT_VkResult_return = (VkResult)0;
     stream->read(&vkDebugMarkerSetObjectTagEXT_VkResult_return, sizeof(VkResult));
     countingStream->clearPool();
@@ -17412,6 +18180,7 @@
     VkDevice device,
     const VkDebugMarkerObjectNameInfoEXT* pNameInfo)
 {
+    AEMU_SCOPED_TRACE("vkDebugMarkerSetObjectNameEXT encode");
     mImpl->log("start vkDebugMarkerSetObjectNameEXT");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -17447,6 +18216,8 @@
     stream->handleMapping()->mapHandles_VkDevice_u64(&local_device, &cgen_var_1216, 1);
     stream->write((uint64_t*)&cgen_var_1216, 1 * 8);
     marshal_VkDebugMarkerObjectNameInfoEXT(stream, (VkDebugMarkerObjectNameInfoEXT*)(local_pNameInfo));
+    AEMU_SCOPED_TRACE("vkDebugMarkerSetObjectNameEXT readParams");
+    AEMU_SCOPED_TRACE("vkDebugMarkerSetObjectNameEXT returnUnmarshal");
     VkResult vkDebugMarkerSetObjectNameEXT_VkResult_return = (VkResult)0;
     stream->read(&vkDebugMarkerSetObjectNameEXT_VkResult_return, sizeof(VkResult));
     countingStream->clearPool();
@@ -17460,6 +18231,7 @@
     VkCommandBuffer commandBuffer,
     const VkDebugMarkerMarkerInfoEXT* pMarkerInfo)
 {
+    AEMU_SCOPED_TRACE("vkCmdDebugMarkerBeginEXT encode");
     mImpl->log("start vkCmdDebugMarkerBeginEXT");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -17495,12 +18267,15 @@
     stream->handleMapping()->mapHandles_VkCommandBuffer_u64(&local_commandBuffer, &cgen_var_1218, 1);
     stream->write((uint64_t*)&cgen_var_1218, 1 * 8);
     marshal_VkDebugMarkerMarkerInfoEXT(stream, (VkDebugMarkerMarkerInfoEXT*)(local_pMarkerInfo));
+    AEMU_SCOPED_TRACE("vkCmdDebugMarkerBeginEXT readParams");
+    AEMU_SCOPED_TRACE("vkCmdDebugMarkerBeginEXT returnUnmarshal");
     mImpl->log("finish vkCmdDebugMarkerBeginEXT");;
 }
 
 void VkEncoder::vkCmdDebugMarkerEndEXT(
     VkCommandBuffer commandBuffer)
 {
+    AEMU_SCOPED_TRACE("vkCmdDebugMarkerEndEXT encode");
     mImpl->log("start vkCmdDebugMarkerEndEXT");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -17523,6 +18298,8 @@
     uint64_t cgen_var_1220;
     stream->handleMapping()->mapHandles_VkCommandBuffer_u64(&local_commandBuffer, &cgen_var_1220, 1);
     stream->write((uint64_t*)&cgen_var_1220, 1 * 8);
+    AEMU_SCOPED_TRACE("vkCmdDebugMarkerEndEXT readParams");
+    AEMU_SCOPED_TRACE("vkCmdDebugMarkerEndEXT returnUnmarshal");
     mImpl->log("finish vkCmdDebugMarkerEndEXT");;
 }
 
@@ -17530,6 +18307,7 @@
     VkCommandBuffer commandBuffer,
     const VkDebugMarkerMarkerInfoEXT* pMarkerInfo)
 {
+    AEMU_SCOPED_TRACE("vkCmdDebugMarkerInsertEXT encode");
     mImpl->log("start vkCmdDebugMarkerInsertEXT");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -17565,6 +18343,8 @@
     stream->handleMapping()->mapHandles_VkCommandBuffer_u64(&local_commandBuffer, &cgen_var_1222, 1);
     stream->write((uint64_t*)&cgen_var_1222, 1 * 8);
     marshal_VkDebugMarkerMarkerInfoEXT(stream, (VkDebugMarkerMarkerInfoEXT*)(local_pMarkerInfo));
+    AEMU_SCOPED_TRACE("vkCmdDebugMarkerInsertEXT readParams");
+    AEMU_SCOPED_TRACE("vkCmdDebugMarkerInsertEXT returnUnmarshal");
     mImpl->log("finish vkCmdDebugMarkerInsertEXT");;
 }
 
@@ -17583,6 +18363,7 @@
     uint32_t maxDrawCount,
     uint32_t stride)
 {
+    AEMU_SCOPED_TRACE("vkCmdDrawIndirectCountAMD encode");
     mImpl->log("start vkCmdDrawIndirectCountAMD");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -17637,6 +18418,8 @@
     stream->write((VkDeviceSize*)&local_countBufferOffset, sizeof(VkDeviceSize));
     stream->write((uint32_t*)&local_maxDrawCount, sizeof(uint32_t));
     stream->write((uint32_t*)&local_stride, sizeof(uint32_t));
+    AEMU_SCOPED_TRACE("vkCmdDrawIndirectCountAMD readParams");
+    AEMU_SCOPED_TRACE("vkCmdDrawIndirectCountAMD returnUnmarshal");
     mImpl->log("finish vkCmdDrawIndirectCountAMD");;
 }
 
@@ -17649,6 +18432,7 @@
     uint32_t maxDrawCount,
     uint32_t stride)
 {
+    AEMU_SCOPED_TRACE("vkCmdDrawIndexedIndirectCountAMD encode");
     mImpl->log("start vkCmdDrawIndexedIndirectCountAMD");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -17703,6 +18487,8 @@
     stream->write((VkDeviceSize*)&local_countBufferOffset, sizeof(VkDeviceSize));
     stream->write((uint32_t*)&local_maxDrawCount, sizeof(uint32_t));
     stream->write((uint32_t*)&local_stride, sizeof(uint32_t));
+    AEMU_SCOPED_TRACE("vkCmdDrawIndexedIndirectCountAMD readParams");
+    AEMU_SCOPED_TRACE("vkCmdDrawIndexedIndirectCountAMD returnUnmarshal");
     mImpl->log("finish vkCmdDrawIndexedIndirectCountAMD");;
 }
 
@@ -17724,6 +18510,7 @@
     size_t* pInfoSize,
     void* pInfo)
 {
+    AEMU_SCOPED_TRACE("vkGetShaderInfoAMD encode");
     mImpl->log("start vkGetShaderInfoAMD");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -17792,6 +18579,7 @@
     {
         stream->write((void*)pInfo, (*(pInfoSize)) * sizeof(uint8_t));
     }
+    AEMU_SCOPED_TRACE("vkGetShaderInfoAMD readParams");
     // WARNING PTR CHECK
     size_t* check_pInfoSize;
     check_pInfoSize = (size_t*)(uintptr_t)stream->getBe64();
@@ -17814,6 +18602,7 @@
         }
         stream->read((void*)pInfo, (*(pInfoSize)) * sizeof(uint8_t));
     }
+    AEMU_SCOPED_TRACE("vkGetShaderInfoAMD returnUnmarshal");
     VkResult vkGetShaderInfoAMD_VkResult_return = (VkResult)0;
     stream->read(&vkGetShaderInfoAMD_VkResult_return, sizeof(VkResult));
     countingStream->clearPool();
@@ -17839,6 +18628,7 @@
     VkExternalMemoryHandleTypeFlagsNV externalHandleType,
     VkExternalImageFormatPropertiesNV* pExternalImageFormatProperties)
 {
+    AEMU_SCOPED_TRACE("vkGetPhysicalDeviceExternalImageFormatPropertiesNV encode");
     mImpl->log("start vkGetPhysicalDeviceExternalImageFormatPropertiesNV");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -17887,11 +18677,13 @@
     stream->write((VkImageCreateFlags*)&local_flags, sizeof(VkImageCreateFlags));
     stream->write((VkExternalMemoryHandleTypeFlagsNV*)&local_externalHandleType, sizeof(VkExternalMemoryHandleTypeFlagsNV));
     marshal_VkExternalImageFormatPropertiesNV(stream, (VkExternalImageFormatPropertiesNV*)(pExternalImageFormatProperties));
+    AEMU_SCOPED_TRACE("vkGetPhysicalDeviceExternalImageFormatPropertiesNV readParams");
     unmarshal_VkExternalImageFormatPropertiesNV(stream, (VkExternalImageFormatPropertiesNV*)(pExternalImageFormatProperties));
     if (pExternalImageFormatProperties)
     {
         transform_fromhost_VkExternalImageFormatPropertiesNV(mImpl->resources(), (VkExternalImageFormatPropertiesNV*)(pExternalImageFormatProperties));
     }
+    AEMU_SCOPED_TRACE("vkGetPhysicalDeviceExternalImageFormatPropertiesNV returnUnmarshal");
     VkResult vkGetPhysicalDeviceExternalImageFormatPropertiesNV_VkResult_return = (VkResult)0;
     stream->read(&vkGetPhysicalDeviceExternalImageFormatPropertiesNV_VkResult_return, sizeof(VkResult));
     countingStream->clearPool();
@@ -17911,6 +18703,7 @@
     VkExternalMemoryHandleTypeFlagsNV handleType,
     HANDLE* pHandle)
 {
+    AEMU_SCOPED_TRACE("vkGetMemoryWin32HandleNV encode");
     mImpl->log("start vkGetMemoryWin32HandleNV");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -17948,7 +18741,9 @@
     stream->write((uint64_t*)&cgen_var_1253, 1 * 8);
     stream->write((VkExternalMemoryHandleTypeFlagsNV*)&local_handleType, sizeof(VkExternalMemoryHandleTypeFlagsNV));
     stream->write((HANDLE*)pHandle, sizeof(HANDLE));
+    AEMU_SCOPED_TRACE("vkGetMemoryWin32HandleNV readParams");
     stream->read((HANDLE*)pHandle, sizeof(HANDLE));
+    AEMU_SCOPED_TRACE("vkGetMemoryWin32HandleNV returnUnmarshal");
     VkResult vkGetMemoryWin32HandleNV_VkResult_return = (VkResult)0;
     stream->read(&vkGetMemoryWin32HandleNV_VkResult_return, sizeof(VkResult));
     countingStream->clearPool();
@@ -17970,6 +18765,7 @@
     const VkAllocationCallbacks* pAllocator,
     VkSurfaceKHR* pSurface)
 {
+    AEMU_SCOPED_TRACE("vkCreateViSurfaceNN encode");
     mImpl->log("start vkCreateViSurfaceNN");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -18039,9 +18835,11 @@
     stream->handleMapping()->mapHandles_VkSurfaceKHR_u64(pSurface, &cgen_var_1259, 1);
     stream->write((uint64_t*)&cgen_var_1259, 8);
     stream->setHandleMapping(resources->unwrapMapping());
+    AEMU_SCOPED_TRACE("vkCreateViSurfaceNN readParams");
     uint64_t cgen_var_1260;
     stream->read((uint64_t*)&cgen_var_1260, 8);
     stream->handleMapping()->mapHandles_u64_VkSurfaceKHR(&cgen_var_1260, (VkSurfaceKHR*)pSurface, 1);
+    AEMU_SCOPED_TRACE("vkCreateViSurfaceNN returnUnmarshal");
     VkResult vkCreateViSurfaceNN_VkResult_return = (VkResult)0;
     stream->read(&vkCreateViSurfaceNN_VkResult_return, sizeof(VkResult));
     countingStream->clearPool();
@@ -18061,6 +18859,7 @@
     VkCommandBuffer commandBuffer,
     const VkConditionalRenderingBeginInfoEXT* pConditionalRenderingBegin)
 {
+    AEMU_SCOPED_TRACE("vkCmdBeginConditionalRenderingEXT encode");
     mImpl->log("start vkCmdBeginConditionalRenderingEXT");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -18096,12 +18895,15 @@
     stream->handleMapping()->mapHandles_VkCommandBuffer_u64(&local_commandBuffer, &cgen_var_1262, 1);
     stream->write((uint64_t*)&cgen_var_1262, 1 * 8);
     marshal_VkConditionalRenderingBeginInfoEXT(stream, (VkConditionalRenderingBeginInfoEXT*)(local_pConditionalRenderingBegin));
+    AEMU_SCOPED_TRACE("vkCmdBeginConditionalRenderingEXT readParams");
+    AEMU_SCOPED_TRACE("vkCmdBeginConditionalRenderingEXT returnUnmarshal");
     mImpl->log("finish vkCmdBeginConditionalRenderingEXT");;
 }
 
 void VkEncoder::vkCmdEndConditionalRenderingEXT(
     VkCommandBuffer commandBuffer)
 {
+    AEMU_SCOPED_TRACE("vkCmdEndConditionalRenderingEXT encode");
     mImpl->log("start vkCmdEndConditionalRenderingEXT");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -18124,6 +18926,8 @@
     uint64_t cgen_var_1264;
     stream->handleMapping()->mapHandles_VkCommandBuffer_u64(&local_commandBuffer, &cgen_var_1264, 1);
     stream->write((uint64_t*)&cgen_var_1264, 1 * 8);
+    AEMU_SCOPED_TRACE("vkCmdEndConditionalRenderingEXT readParams");
+    AEMU_SCOPED_TRACE("vkCmdEndConditionalRenderingEXT returnUnmarshal");
     mImpl->log("finish vkCmdEndConditionalRenderingEXT");;
 }
 
@@ -18133,6 +18937,7 @@
     VkCommandBuffer commandBuffer,
     const VkCmdProcessCommandsInfoNVX* pProcessCommandsInfo)
 {
+    AEMU_SCOPED_TRACE("vkCmdProcessCommandsNVX encode");
     mImpl->log("start vkCmdProcessCommandsNVX");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -18168,6 +18973,8 @@
     stream->handleMapping()->mapHandles_VkCommandBuffer_u64(&local_commandBuffer, &cgen_var_1266, 1);
     stream->write((uint64_t*)&cgen_var_1266, 1 * 8);
     marshal_VkCmdProcessCommandsInfoNVX(stream, (VkCmdProcessCommandsInfoNVX*)(local_pProcessCommandsInfo));
+    AEMU_SCOPED_TRACE("vkCmdProcessCommandsNVX readParams");
+    AEMU_SCOPED_TRACE("vkCmdProcessCommandsNVX returnUnmarshal");
     mImpl->log("finish vkCmdProcessCommandsNVX");;
 }
 
@@ -18175,6 +18982,7 @@
     VkCommandBuffer commandBuffer,
     const VkCmdReserveSpaceForCommandsInfoNVX* pReserveSpaceInfo)
 {
+    AEMU_SCOPED_TRACE("vkCmdReserveSpaceForCommandsNVX encode");
     mImpl->log("start vkCmdReserveSpaceForCommandsNVX");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -18210,6 +19018,8 @@
     stream->handleMapping()->mapHandles_VkCommandBuffer_u64(&local_commandBuffer, &cgen_var_1268, 1);
     stream->write((uint64_t*)&cgen_var_1268, 1 * 8);
     marshal_VkCmdReserveSpaceForCommandsInfoNVX(stream, (VkCmdReserveSpaceForCommandsInfoNVX*)(local_pReserveSpaceInfo));
+    AEMU_SCOPED_TRACE("vkCmdReserveSpaceForCommandsNVX readParams");
+    AEMU_SCOPED_TRACE("vkCmdReserveSpaceForCommandsNVX returnUnmarshal");
     mImpl->log("finish vkCmdReserveSpaceForCommandsNVX");;
 }
 
@@ -18219,6 +19029,7 @@
     const VkAllocationCallbacks* pAllocator,
     VkIndirectCommandsLayoutNVX* pIndirectCommandsLayout)
 {
+    AEMU_SCOPED_TRACE("vkCreateIndirectCommandsLayoutNVX encode");
     mImpl->log("start vkCreateIndirectCommandsLayoutNVX");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -18288,11 +19099,13 @@
     stream->handleMapping()->mapHandles_VkIndirectCommandsLayoutNVX_u64(pIndirectCommandsLayout, &cgen_var_1274, 1);
     stream->write((uint64_t*)&cgen_var_1274, 8);
     stream->setHandleMapping(resources->unwrapMapping());
+    AEMU_SCOPED_TRACE("vkCreateIndirectCommandsLayoutNVX readParams");
     stream->setHandleMapping(resources->createMapping());
     uint64_t cgen_var_1275;
     stream->read((uint64_t*)&cgen_var_1275, 8);
     stream->handleMapping()->mapHandles_u64_VkIndirectCommandsLayoutNVX(&cgen_var_1275, (VkIndirectCommandsLayoutNVX*)pIndirectCommandsLayout, 1);
     stream->unsetHandleMapping();
+    AEMU_SCOPED_TRACE("vkCreateIndirectCommandsLayoutNVX returnUnmarshal");
     VkResult vkCreateIndirectCommandsLayoutNVX_VkResult_return = (VkResult)0;
     stream->read(&vkCreateIndirectCommandsLayoutNVX_VkResult_return, sizeof(VkResult));
     countingStream->clearPool();
@@ -18307,6 +19120,7 @@
     VkIndirectCommandsLayoutNVX indirectCommandsLayout,
     const VkAllocationCallbacks* pAllocator)
 {
+    AEMU_SCOPED_TRACE("vkDestroyIndirectCommandsLayoutNVX encode");
     mImpl->log("start vkDestroyIndirectCommandsLayoutNVX");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -18363,6 +19177,8 @@
     {
         marshal_VkAllocationCallbacks(stream, (VkAllocationCallbacks*)(local_pAllocator));
     }
+    AEMU_SCOPED_TRACE("vkDestroyIndirectCommandsLayoutNVX readParams");
+    AEMU_SCOPED_TRACE("vkDestroyIndirectCommandsLayoutNVX returnUnmarshal");
     resources->destroyMapping()->mapHandles_VkIndirectCommandsLayoutNVX((VkIndirectCommandsLayoutNVX*)&indirectCommandsLayout);
     mImpl->log("finish vkDestroyIndirectCommandsLayoutNVX");;
 }
@@ -18373,6 +19189,7 @@
     const VkAllocationCallbacks* pAllocator,
     VkObjectTableNVX* pObjectTable)
 {
+    AEMU_SCOPED_TRACE("vkCreateObjectTableNVX encode");
     mImpl->log("start vkCreateObjectTableNVX");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -18442,11 +19259,13 @@
     stream->handleMapping()->mapHandles_VkObjectTableNVX_u64(pObjectTable, &cgen_var_1287, 1);
     stream->write((uint64_t*)&cgen_var_1287, 8);
     stream->setHandleMapping(resources->unwrapMapping());
+    AEMU_SCOPED_TRACE("vkCreateObjectTableNVX readParams");
     stream->setHandleMapping(resources->createMapping());
     uint64_t cgen_var_1288;
     stream->read((uint64_t*)&cgen_var_1288, 8);
     stream->handleMapping()->mapHandles_u64_VkObjectTableNVX(&cgen_var_1288, (VkObjectTableNVX*)pObjectTable, 1);
     stream->unsetHandleMapping();
+    AEMU_SCOPED_TRACE("vkCreateObjectTableNVX returnUnmarshal");
     VkResult vkCreateObjectTableNVX_VkResult_return = (VkResult)0;
     stream->read(&vkCreateObjectTableNVX_VkResult_return, sizeof(VkResult));
     countingStream->clearPool();
@@ -18461,6 +19280,7 @@
     VkObjectTableNVX objectTable,
     const VkAllocationCallbacks* pAllocator)
 {
+    AEMU_SCOPED_TRACE("vkDestroyObjectTableNVX encode");
     mImpl->log("start vkDestroyObjectTableNVX");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -18517,6 +19337,8 @@
     {
         marshal_VkAllocationCallbacks(stream, (VkAllocationCallbacks*)(local_pAllocator));
     }
+    AEMU_SCOPED_TRACE("vkDestroyObjectTableNVX readParams");
+    AEMU_SCOPED_TRACE("vkDestroyObjectTableNVX returnUnmarshal");
     resources->destroyMapping()->mapHandles_VkObjectTableNVX((VkObjectTableNVX*)&objectTable);
     mImpl->log("finish vkDestroyObjectTableNVX");;
 }
@@ -18528,6 +19350,7 @@
     const VkObjectTableEntryNVX* const* ppObjectTableEntries,
     const uint32_t* pObjectIndices)
 {
+    AEMU_SCOPED_TRACE("vkRegisterObjectsNVX encode");
     mImpl->log("start vkRegisterObjectsNVX");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -18575,6 +19398,8 @@
     stream->write((uint32_t*)&local_objectCount, sizeof(uint32_t));
     (void)local_ppObjectTableEntries;
     stream->write((uint32_t*)local_pObjectIndices, ((objectCount)) * sizeof(uint32_t));
+    AEMU_SCOPED_TRACE("vkRegisterObjectsNVX readParams");
+    AEMU_SCOPED_TRACE("vkRegisterObjectsNVX returnUnmarshal");
     VkResult vkRegisterObjectsNVX_VkResult_return = (VkResult)0;
     stream->read(&vkRegisterObjectsNVX_VkResult_return, sizeof(VkResult));
     countingStream->clearPool();
@@ -18591,6 +19416,7 @@
     const VkObjectEntryTypeNVX* pObjectEntryTypes,
     const uint32_t* pObjectIndices)
 {
+    AEMU_SCOPED_TRACE("vkUnregisterObjectsNVX encode");
     mImpl->log("start vkUnregisterObjectsNVX");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -18641,6 +19467,8 @@
     stream->write((uint32_t*)&local_objectCount, sizeof(uint32_t));
     stream->write((VkObjectEntryTypeNVX*)local_pObjectEntryTypes, ((objectCount)) * sizeof(VkObjectEntryTypeNVX));
     stream->write((uint32_t*)local_pObjectIndices, ((objectCount)) * sizeof(uint32_t));
+    AEMU_SCOPED_TRACE("vkUnregisterObjectsNVX readParams");
+    AEMU_SCOPED_TRACE("vkUnregisterObjectsNVX returnUnmarshal");
     VkResult vkUnregisterObjectsNVX_VkResult_return = (VkResult)0;
     stream->read(&vkUnregisterObjectsNVX_VkResult_return, sizeof(VkResult));
     countingStream->clearPool();
@@ -18655,6 +19483,7 @@
     VkDeviceGeneratedCommandsFeaturesNVX* pFeatures,
     VkDeviceGeneratedCommandsLimitsNVX* pLimits)
 {
+    AEMU_SCOPED_TRACE("vkGetPhysicalDeviceGeneratedCommandsPropertiesNVX encode");
     mImpl->log("start vkGetPhysicalDeviceGeneratedCommandsPropertiesNVX");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -18681,6 +19510,7 @@
     stream->write((uint64_t*)&cgen_var_1304, 1 * 8);
     marshal_VkDeviceGeneratedCommandsFeaturesNVX(stream, (VkDeviceGeneratedCommandsFeaturesNVX*)(pFeatures));
     marshal_VkDeviceGeneratedCommandsLimitsNVX(stream, (VkDeviceGeneratedCommandsLimitsNVX*)(pLimits));
+    AEMU_SCOPED_TRACE("vkGetPhysicalDeviceGeneratedCommandsPropertiesNVX readParams");
     unmarshal_VkDeviceGeneratedCommandsFeaturesNVX(stream, (VkDeviceGeneratedCommandsFeaturesNVX*)(pFeatures));
     if (pFeatures)
     {
@@ -18691,6 +19521,7 @@
     {
         transform_fromhost_VkDeviceGeneratedCommandsLimitsNVX(mImpl->resources(), (VkDeviceGeneratedCommandsLimitsNVX*)(pLimits));
     }
+    AEMU_SCOPED_TRACE("vkGetPhysicalDeviceGeneratedCommandsPropertiesNVX returnUnmarshal");
     mImpl->log("finish vkGetPhysicalDeviceGeneratedCommandsPropertiesNVX");;
 }
 
@@ -18702,6 +19533,7 @@
     uint32_t viewportCount,
     const VkViewportWScalingNV* pViewportWScalings)
 {
+    AEMU_SCOPED_TRACE("vkCmdSetViewportWScalingNV encode");
     mImpl->log("start vkCmdSetViewportWScalingNV");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -18757,6 +19589,8 @@
     {
         marshal_VkViewportWScalingNV(stream, (VkViewportWScalingNV*)(local_pViewportWScalings + i));
     }
+    AEMU_SCOPED_TRACE("vkCmdSetViewportWScalingNV readParams");
+    AEMU_SCOPED_TRACE("vkCmdSetViewportWScalingNV returnUnmarshal");
     mImpl->log("finish vkCmdSetViewportWScalingNV");;
 }
 
@@ -18766,6 +19600,7 @@
     VkPhysicalDevice physicalDevice,
     VkDisplayKHR display)
 {
+    AEMU_SCOPED_TRACE("vkReleaseDisplayEXT encode");
     mImpl->log("start vkReleaseDisplayEXT");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -18796,6 +19631,8 @@
     uint64_t cgen_var_1310;
     stream->handleMapping()->mapHandles_VkDisplayKHR_u64(&local_display, &cgen_var_1310, 1);
     stream->write((uint64_t*)&cgen_var_1310, 1 * 8);
+    AEMU_SCOPED_TRACE("vkReleaseDisplayEXT readParams");
+    AEMU_SCOPED_TRACE("vkReleaseDisplayEXT returnUnmarshal");
     VkResult vkReleaseDisplayEXT_VkResult_return = (VkResult)0;
     stream->read(&vkReleaseDisplayEXT_VkResult_return, sizeof(VkResult));
     countingStream->clearPool();
@@ -18812,6 +19649,7 @@
     Display* dpy,
     VkDisplayKHR display)
 {
+    AEMU_SCOPED_TRACE("vkAcquireXlibDisplayEXT encode");
     mImpl->log("start vkAcquireXlibDisplayEXT");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -18844,7 +19682,9 @@
     uint64_t cgen_var_1314;
     stream->handleMapping()->mapHandles_VkDisplayKHR_u64(&local_display, &cgen_var_1314, 1);
     stream->write((uint64_t*)&cgen_var_1314, 1 * 8);
+    AEMU_SCOPED_TRACE("vkAcquireXlibDisplayEXT readParams");
     stream->read((Display*)dpy, sizeof(Display));
+    AEMU_SCOPED_TRACE("vkAcquireXlibDisplayEXT returnUnmarshal");
     VkResult vkAcquireXlibDisplayEXT_VkResult_return = (VkResult)0;
     stream->read(&vkAcquireXlibDisplayEXT_VkResult_return, sizeof(VkResult));
     countingStream->clearPool();
@@ -18860,6 +19700,7 @@
     RROutput rrOutput,
     VkDisplayKHR* pDisplay)
 {
+    AEMU_SCOPED_TRACE("vkGetRandROutputDisplayEXT encode");
     mImpl->log("start vkGetRandROutputDisplayEXT");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -18896,10 +19737,12 @@
     stream->handleMapping()->mapHandles_VkDisplayKHR_u64(pDisplay, &cgen_var_1318, 1);
     stream->write((uint64_t*)&cgen_var_1318, 8);
     stream->setHandleMapping(resources->unwrapMapping());
+    AEMU_SCOPED_TRACE("vkGetRandROutputDisplayEXT readParams");
     stream->read((Display*)dpy, sizeof(Display));
     uint64_t cgen_var_1319;
     stream->read((uint64_t*)&cgen_var_1319, 8);
     stream->handleMapping()->mapHandles_u64_VkDisplayKHR(&cgen_var_1319, (VkDisplayKHR*)pDisplay, 1);
+    AEMU_SCOPED_TRACE("vkGetRandROutputDisplayEXT returnUnmarshal");
     VkResult vkGetRandROutputDisplayEXT_VkResult_return = (VkResult)0;
     stream->read(&vkGetRandROutputDisplayEXT_VkResult_return, sizeof(VkResult));
     countingStream->clearPool();
@@ -18916,6 +19759,7 @@
     VkSurfaceKHR surface,
     VkSurfaceCapabilities2EXT* pSurfaceCapabilities)
 {
+    AEMU_SCOPED_TRACE("vkGetPhysicalDeviceSurfaceCapabilities2EXT encode");
     mImpl->log("start vkGetPhysicalDeviceSurfaceCapabilities2EXT");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -18948,11 +19792,13 @@
     stream->handleMapping()->mapHandles_VkSurfaceKHR_u64(&local_surface, &cgen_var_1323, 1);
     stream->write((uint64_t*)&cgen_var_1323, 1 * 8);
     marshal_VkSurfaceCapabilities2EXT(stream, (VkSurfaceCapabilities2EXT*)(pSurfaceCapabilities));
+    AEMU_SCOPED_TRACE("vkGetPhysicalDeviceSurfaceCapabilities2EXT readParams");
     unmarshal_VkSurfaceCapabilities2EXT(stream, (VkSurfaceCapabilities2EXT*)(pSurfaceCapabilities));
     if (pSurfaceCapabilities)
     {
         transform_fromhost_VkSurfaceCapabilities2EXT(mImpl->resources(), (VkSurfaceCapabilities2EXT*)(pSurfaceCapabilities));
     }
+    AEMU_SCOPED_TRACE("vkGetPhysicalDeviceSurfaceCapabilities2EXT returnUnmarshal");
     VkResult vkGetPhysicalDeviceSurfaceCapabilities2EXT_VkResult_return = (VkResult)0;
     stream->read(&vkGetPhysicalDeviceSurfaceCapabilities2EXT_VkResult_return, sizeof(VkResult));
     countingStream->clearPool();
@@ -18969,6 +19815,7 @@
     VkDisplayKHR display,
     const VkDisplayPowerInfoEXT* pDisplayPowerInfo)
 {
+    AEMU_SCOPED_TRACE("vkDisplayPowerControlEXT encode");
     mImpl->log("start vkDisplayPowerControlEXT");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -19012,6 +19859,8 @@
     stream->handleMapping()->mapHandles_VkDisplayKHR_u64(&local_display, &cgen_var_1327, 1);
     stream->write((uint64_t*)&cgen_var_1327, 1 * 8);
     marshal_VkDisplayPowerInfoEXT(stream, (VkDisplayPowerInfoEXT*)(local_pDisplayPowerInfo));
+    AEMU_SCOPED_TRACE("vkDisplayPowerControlEXT readParams");
+    AEMU_SCOPED_TRACE("vkDisplayPowerControlEXT returnUnmarshal");
     VkResult vkDisplayPowerControlEXT_VkResult_return = (VkResult)0;
     stream->read(&vkDisplayPowerControlEXT_VkResult_return, sizeof(VkResult));
     countingStream->clearPool();
@@ -19027,6 +19876,7 @@
     const VkAllocationCallbacks* pAllocator,
     VkFence* pFence)
 {
+    AEMU_SCOPED_TRACE("vkRegisterDeviceEventEXT encode");
     mImpl->log("start vkRegisterDeviceEventEXT");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -19096,9 +19946,11 @@
     stream->handleMapping()->mapHandles_VkFence_u64(pFence, &cgen_var_1333, 1);
     stream->write((uint64_t*)&cgen_var_1333, 8);
     stream->setHandleMapping(resources->unwrapMapping());
+    AEMU_SCOPED_TRACE("vkRegisterDeviceEventEXT readParams");
     uint64_t cgen_var_1334;
     stream->read((uint64_t*)&cgen_var_1334, 8);
     stream->handleMapping()->mapHandles_u64_VkFence(&cgen_var_1334, (VkFence*)pFence, 1);
+    AEMU_SCOPED_TRACE("vkRegisterDeviceEventEXT returnUnmarshal");
     VkResult vkRegisterDeviceEventEXT_VkResult_return = (VkResult)0;
     stream->read(&vkRegisterDeviceEventEXT_VkResult_return, sizeof(VkResult));
     countingStream->clearPool();
@@ -19115,6 +19967,7 @@
     const VkAllocationCallbacks* pAllocator,
     VkFence* pFence)
 {
+    AEMU_SCOPED_TRACE("vkRegisterDisplayEventEXT encode");
     mImpl->log("start vkRegisterDisplayEventEXT");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -19192,9 +20045,11 @@
     stream->handleMapping()->mapHandles_VkFence_u64(pFence, &cgen_var_1342, 1);
     stream->write((uint64_t*)&cgen_var_1342, 8);
     stream->setHandleMapping(resources->unwrapMapping());
+    AEMU_SCOPED_TRACE("vkRegisterDisplayEventEXT readParams");
     uint64_t cgen_var_1343;
     stream->read((uint64_t*)&cgen_var_1343, 8);
     stream->handleMapping()->mapHandles_u64_VkFence(&cgen_var_1343, (VkFence*)pFence, 1);
+    AEMU_SCOPED_TRACE("vkRegisterDisplayEventEXT returnUnmarshal");
     VkResult vkRegisterDisplayEventEXT_VkResult_return = (VkResult)0;
     stream->read(&vkRegisterDisplayEventEXT_VkResult_return, sizeof(VkResult));
     countingStream->clearPool();
@@ -19210,6 +20065,7 @@
     VkSurfaceCounterFlagBitsEXT counter,
     uint64_t* pCounterValue)
 {
+    AEMU_SCOPED_TRACE("vkGetSwapchainCounterEXT encode");
     mImpl->log("start vkGetSwapchainCounterEXT");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -19246,7 +20102,9 @@
     stream->write((uint64_t*)&cgen_var_1347, 1 * 8);
     stream->write((VkSurfaceCounterFlagBitsEXT*)&local_counter, sizeof(VkSurfaceCounterFlagBitsEXT));
     stream->write((uint64_t*)pCounterValue, sizeof(uint64_t));
+    AEMU_SCOPED_TRACE("vkGetSwapchainCounterEXT readParams");
     stream->read((uint64_t*)pCounterValue, sizeof(uint64_t));
+    AEMU_SCOPED_TRACE("vkGetSwapchainCounterEXT returnUnmarshal");
     VkResult vkGetSwapchainCounterEXT_VkResult_return = (VkResult)0;
     stream->read(&vkGetSwapchainCounterEXT_VkResult_return, sizeof(VkResult));
     countingStream->clearPool();
@@ -19263,6 +20121,7 @@
     VkSwapchainKHR swapchain,
     VkRefreshCycleDurationGOOGLE* pDisplayTimingProperties)
 {
+    AEMU_SCOPED_TRACE("vkGetRefreshCycleDurationGOOGLE encode");
     mImpl->log("start vkGetRefreshCycleDurationGOOGLE");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -19295,11 +20154,13 @@
     stream->handleMapping()->mapHandles_VkSwapchainKHR_u64(&local_swapchain, &cgen_var_1351, 1);
     stream->write((uint64_t*)&cgen_var_1351, 1 * 8);
     marshal_VkRefreshCycleDurationGOOGLE(stream, (VkRefreshCycleDurationGOOGLE*)(pDisplayTimingProperties));
+    AEMU_SCOPED_TRACE("vkGetRefreshCycleDurationGOOGLE readParams");
     unmarshal_VkRefreshCycleDurationGOOGLE(stream, (VkRefreshCycleDurationGOOGLE*)(pDisplayTimingProperties));
     if (pDisplayTimingProperties)
     {
         transform_fromhost_VkRefreshCycleDurationGOOGLE(mImpl->resources(), (VkRefreshCycleDurationGOOGLE*)(pDisplayTimingProperties));
     }
+    AEMU_SCOPED_TRACE("vkGetRefreshCycleDurationGOOGLE returnUnmarshal");
     VkResult vkGetRefreshCycleDurationGOOGLE_VkResult_return = (VkResult)0;
     stream->read(&vkGetRefreshCycleDurationGOOGLE_VkResult_return, sizeof(VkResult));
     countingStream->clearPool();
@@ -19315,6 +20176,7 @@
     uint32_t* pPresentationTimingCount,
     VkPastPresentationTimingGOOGLE* pPresentationTimings)
 {
+    AEMU_SCOPED_TRACE("vkGetPastPresentationTimingGOOGLE encode");
     mImpl->log("start vkGetPastPresentationTimingGOOGLE");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -19379,6 +20241,7 @@
             marshal_VkPastPresentationTimingGOOGLE(stream, (VkPastPresentationTimingGOOGLE*)(pPresentationTimings + i));
         }
     }
+    AEMU_SCOPED_TRACE("vkGetPastPresentationTimingGOOGLE readParams");
     // WARNING PTR CHECK
     uint32_t* check_pPresentationTimingCount;
     check_pPresentationTimingCount = (uint32_t*)(uintptr_t)stream->getBe64();
@@ -19411,6 +20274,7 @@
             transform_fromhost_VkPastPresentationTimingGOOGLE(mImpl->resources(), (VkPastPresentationTimingGOOGLE*)(pPresentationTimings + i));
         }
     }
+    AEMU_SCOPED_TRACE("vkGetPastPresentationTimingGOOGLE returnUnmarshal");
     VkResult vkGetPastPresentationTimingGOOGLE_VkResult_return = (VkResult)0;
     stream->read(&vkGetPastPresentationTimingGOOGLE_VkResult_return, sizeof(VkResult));
     countingStream->clearPool();
@@ -19438,6 +20302,7 @@
     uint32_t discardRectangleCount,
     const VkRect2D* pDiscardRectangles)
 {
+    AEMU_SCOPED_TRACE("vkCmdSetDiscardRectangleEXT encode");
     mImpl->log("start vkCmdSetDiscardRectangleEXT");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -19493,6 +20358,8 @@
     {
         marshal_VkRect2D(stream, (VkRect2D*)(local_pDiscardRectangles + i));
     }
+    AEMU_SCOPED_TRACE("vkCmdSetDiscardRectangleEXT readParams");
+    AEMU_SCOPED_TRACE("vkCmdSetDiscardRectangleEXT returnUnmarshal");
     mImpl->log("finish vkCmdSetDiscardRectangleEXT");;
 }
 
@@ -19508,6 +20375,7 @@
     const VkSwapchainKHR* pSwapchains,
     const VkHdrMetadataEXT* pMetadata)
 {
+    AEMU_SCOPED_TRACE("vkSetHdrMetadataEXT encode");
     mImpl->log("start vkSetHdrMetadataEXT");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -19579,6 +20447,8 @@
     {
         marshal_VkHdrMetadataEXT(stream, (VkHdrMetadataEXT*)(local_pMetadata + i));
     }
+    AEMU_SCOPED_TRACE("vkSetHdrMetadataEXT readParams");
+    AEMU_SCOPED_TRACE("vkSetHdrMetadataEXT returnUnmarshal");
     mImpl->log("finish vkSetHdrMetadataEXT");;
 }
 
@@ -19590,6 +20460,7 @@
     const VkAllocationCallbacks* pAllocator,
     VkSurfaceKHR* pSurface)
 {
+    AEMU_SCOPED_TRACE("vkCreateIOSSurfaceMVK encode");
     mImpl->log("start vkCreateIOSSurfaceMVK");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -19659,9 +20530,11 @@
     stream->handleMapping()->mapHandles_VkSurfaceKHR_u64(pSurface, &cgen_var_1373, 1);
     stream->write((uint64_t*)&cgen_var_1373, 8);
     stream->setHandleMapping(resources->unwrapMapping());
+    AEMU_SCOPED_TRACE("vkCreateIOSSurfaceMVK readParams");
     uint64_t cgen_var_1374;
     stream->read((uint64_t*)&cgen_var_1374, 8);
     stream->handleMapping()->mapHandles_u64_VkSurfaceKHR(&cgen_var_1374, (VkSurfaceKHR*)pSurface, 1);
+    AEMU_SCOPED_TRACE("vkCreateIOSSurfaceMVK returnUnmarshal");
     VkResult vkCreateIOSSurfaceMVK_VkResult_return = (VkResult)0;
     stream->read(&vkCreateIOSSurfaceMVK_VkResult_return, sizeof(VkResult));
     countingStream->clearPool();
@@ -19679,6 +20552,7 @@
     const VkAllocationCallbacks* pAllocator,
     VkSurfaceKHR* pSurface)
 {
+    AEMU_SCOPED_TRACE("vkCreateMacOSSurfaceMVK encode");
     mImpl->log("start vkCreateMacOSSurfaceMVK");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -19748,9 +20622,11 @@
     stream->handleMapping()->mapHandles_VkSurfaceKHR_u64(pSurface, &cgen_var_1380, 1);
     stream->write((uint64_t*)&cgen_var_1380, 8);
     stream->setHandleMapping(resources->unwrapMapping());
+    AEMU_SCOPED_TRACE("vkCreateMacOSSurfaceMVK readParams");
     uint64_t cgen_var_1381;
     stream->read((uint64_t*)&cgen_var_1381, 8);
     stream->handleMapping()->mapHandles_u64_VkSurfaceKHR(&cgen_var_1381, (VkSurfaceKHR*)pSurface, 1);
+    AEMU_SCOPED_TRACE("vkCreateMacOSSurfaceMVK returnUnmarshal");
     VkResult vkCreateMacOSSurfaceMVK_VkResult_return = (VkResult)0;
     stream->read(&vkCreateMacOSSurfaceMVK_VkResult_return, sizeof(VkResult));
     countingStream->clearPool();
@@ -19770,6 +20646,7 @@
     VkDevice device,
     const VkDebugUtilsObjectNameInfoEXT* pNameInfo)
 {
+    AEMU_SCOPED_TRACE("vkSetDebugUtilsObjectNameEXT encode");
     mImpl->log("start vkSetDebugUtilsObjectNameEXT");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -19805,6 +20682,8 @@
     stream->handleMapping()->mapHandles_VkDevice_u64(&local_device, &cgen_var_1383, 1);
     stream->write((uint64_t*)&cgen_var_1383, 1 * 8);
     marshal_VkDebugUtilsObjectNameInfoEXT(stream, (VkDebugUtilsObjectNameInfoEXT*)(local_pNameInfo));
+    AEMU_SCOPED_TRACE("vkSetDebugUtilsObjectNameEXT readParams");
+    AEMU_SCOPED_TRACE("vkSetDebugUtilsObjectNameEXT returnUnmarshal");
     VkResult vkSetDebugUtilsObjectNameEXT_VkResult_return = (VkResult)0;
     stream->read(&vkSetDebugUtilsObjectNameEXT_VkResult_return, sizeof(VkResult));
     countingStream->clearPool();
@@ -19818,6 +20697,7 @@
     VkDevice device,
     const VkDebugUtilsObjectTagInfoEXT* pTagInfo)
 {
+    AEMU_SCOPED_TRACE("vkSetDebugUtilsObjectTagEXT encode");
     mImpl->log("start vkSetDebugUtilsObjectTagEXT");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -19853,6 +20733,8 @@
     stream->handleMapping()->mapHandles_VkDevice_u64(&local_device, &cgen_var_1385, 1);
     stream->write((uint64_t*)&cgen_var_1385, 1 * 8);
     marshal_VkDebugUtilsObjectTagInfoEXT(stream, (VkDebugUtilsObjectTagInfoEXT*)(local_pTagInfo));
+    AEMU_SCOPED_TRACE("vkSetDebugUtilsObjectTagEXT readParams");
+    AEMU_SCOPED_TRACE("vkSetDebugUtilsObjectTagEXT returnUnmarshal");
     VkResult vkSetDebugUtilsObjectTagEXT_VkResult_return = (VkResult)0;
     stream->read(&vkSetDebugUtilsObjectTagEXT_VkResult_return, sizeof(VkResult));
     countingStream->clearPool();
@@ -19866,6 +20748,7 @@
     VkQueue queue,
     const VkDebugUtilsLabelEXT* pLabelInfo)
 {
+    AEMU_SCOPED_TRACE("vkQueueBeginDebugUtilsLabelEXT encode");
     mImpl->log("start vkQueueBeginDebugUtilsLabelEXT");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -19901,12 +20784,15 @@
     stream->handleMapping()->mapHandles_VkQueue_u64(&local_queue, &cgen_var_1387, 1);
     stream->write((uint64_t*)&cgen_var_1387, 1 * 8);
     marshal_VkDebugUtilsLabelEXT(stream, (VkDebugUtilsLabelEXT*)(local_pLabelInfo));
+    AEMU_SCOPED_TRACE("vkQueueBeginDebugUtilsLabelEXT readParams");
+    AEMU_SCOPED_TRACE("vkQueueBeginDebugUtilsLabelEXT returnUnmarshal");
     mImpl->log("finish vkQueueBeginDebugUtilsLabelEXT");;
 }
 
 void VkEncoder::vkQueueEndDebugUtilsLabelEXT(
     VkQueue queue)
 {
+    AEMU_SCOPED_TRACE("vkQueueEndDebugUtilsLabelEXT encode");
     mImpl->log("start vkQueueEndDebugUtilsLabelEXT");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -19929,6 +20815,8 @@
     uint64_t cgen_var_1389;
     stream->handleMapping()->mapHandles_VkQueue_u64(&local_queue, &cgen_var_1389, 1);
     stream->write((uint64_t*)&cgen_var_1389, 1 * 8);
+    AEMU_SCOPED_TRACE("vkQueueEndDebugUtilsLabelEXT readParams");
+    AEMU_SCOPED_TRACE("vkQueueEndDebugUtilsLabelEXT returnUnmarshal");
     mImpl->log("finish vkQueueEndDebugUtilsLabelEXT");;
 }
 
@@ -19936,6 +20824,7 @@
     VkQueue queue,
     const VkDebugUtilsLabelEXT* pLabelInfo)
 {
+    AEMU_SCOPED_TRACE("vkQueueInsertDebugUtilsLabelEXT encode");
     mImpl->log("start vkQueueInsertDebugUtilsLabelEXT");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -19971,6 +20860,8 @@
     stream->handleMapping()->mapHandles_VkQueue_u64(&local_queue, &cgen_var_1391, 1);
     stream->write((uint64_t*)&cgen_var_1391, 1 * 8);
     marshal_VkDebugUtilsLabelEXT(stream, (VkDebugUtilsLabelEXT*)(local_pLabelInfo));
+    AEMU_SCOPED_TRACE("vkQueueInsertDebugUtilsLabelEXT readParams");
+    AEMU_SCOPED_TRACE("vkQueueInsertDebugUtilsLabelEXT returnUnmarshal");
     mImpl->log("finish vkQueueInsertDebugUtilsLabelEXT");;
 }
 
@@ -19978,6 +20869,7 @@
     VkCommandBuffer commandBuffer,
     const VkDebugUtilsLabelEXT* pLabelInfo)
 {
+    AEMU_SCOPED_TRACE("vkCmdBeginDebugUtilsLabelEXT encode");
     mImpl->log("start vkCmdBeginDebugUtilsLabelEXT");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -20013,12 +20905,15 @@
     stream->handleMapping()->mapHandles_VkCommandBuffer_u64(&local_commandBuffer, &cgen_var_1393, 1);
     stream->write((uint64_t*)&cgen_var_1393, 1 * 8);
     marshal_VkDebugUtilsLabelEXT(stream, (VkDebugUtilsLabelEXT*)(local_pLabelInfo));
+    AEMU_SCOPED_TRACE("vkCmdBeginDebugUtilsLabelEXT readParams");
+    AEMU_SCOPED_TRACE("vkCmdBeginDebugUtilsLabelEXT returnUnmarshal");
     mImpl->log("finish vkCmdBeginDebugUtilsLabelEXT");;
 }
 
 void VkEncoder::vkCmdEndDebugUtilsLabelEXT(
     VkCommandBuffer commandBuffer)
 {
+    AEMU_SCOPED_TRACE("vkCmdEndDebugUtilsLabelEXT encode");
     mImpl->log("start vkCmdEndDebugUtilsLabelEXT");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -20041,6 +20936,8 @@
     uint64_t cgen_var_1395;
     stream->handleMapping()->mapHandles_VkCommandBuffer_u64(&local_commandBuffer, &cgen_var_1395, 1);
     stream->write((uint64_t*)&cgen_var_1395, 1 * 8);
+    AEMU_SCOPED_TRACE("vkCmdEndDebugUtilsLabelEXT readParams");
+    AEMU_SCOPED_TRACE("vkCmdEndDebugUtilsLabelEXT returnUnmarshal");
     mImpl->log("finish vkCmdEndDebugUtilsLabelEXT");;
 }
 
@@ -20048,6 +20945,7 @@
     VkCommandBuffer commandBuffer,
     const VkDebugUtilsLabelEXT* pLabelInfo)
 {
+    AEMU_SCOPED_TRACE("vkCmdInsertDebugUtilsLabelEXT encode");
     mImpl->log("start vkCmdInsertDebugUtilsLabelEXT");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -20083,6 +20981,8 @@
     stream->handleMapping()->mapHandles_VkCommandBuffer_u64(&local_commandBuffer, &cgen_var_1397, 1);
     stream->write((uint64_t*)&cgen_var_1397, 1 * 8);
     marshal_VkDebugUtilsLabelEXT(stream, (VkDebugUtilsLabelEXT*)(local_pLabelInfo));
+    AEMU_SCOPED_TRACE("vkCmdInsertDebugUtilsLabelEXT readParams");
+    AEMU_SCOPED_TRACE("vkCmdInsertDebugUtilsLabelEXT returnUnmarshal");
     mImpl->log("finish vkCmdInsertDebugUtilsLabelEXT");;
 }
 
@@ -20092,6 +20992,7 @@
     const VkAllocationCallbacks* pAllocator,
     VkDebugUtilsMessengerEXT* pMessenger)
 {
+    AEMU_SCOPED_TRACE("vkCreateDebugUtilsMessengerEXT encode");
     mImpl->log("start vkCreateDebugUtilsMessengerEXT");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -20161,11 +21062,13 @@
     stream->handleMapping()->mapHandles_VkDebugUtilsMessengerEXT_u64(pMessenger, &cgen_var_1403, 1);
     stream->write((uint64_t*)&cgen_var_1403, 8);
     stream->setHandleMapping(resources->unwrapMapping());
+    AEMU_SCOPED_TRACE("vkCreateDebugUtilsMessengerEXT readParams");
     stream->setHandleMapping(resources->createMapping());
     uint64_t cgen_var_1404;
     stream->read((uint64_t*)&cgen_var_1404, 8);
     stream->handleMapping()->mapHandles_u64_VkDebugUtilsMessengerEXT(&cgen_var_1404, (VkDebugUtilsMessengerEXT*)pMessenger, 1);
     stream->unsetHandleMapping();
+    AEMU_SCOPED_TRACE("vkCreateDebugUtilsMessengerEXT returnUnmarshal");
     VkResult vkCreateDebugUtilsMessengerEXT_VkResult_return = (VkResult)0;
     stream->read(&vkCreateDebugUtilsMessengerEXT_VkResult_return, sizeof(VkResult));
     countingStream->clearPool();
@@ -20180,6 +21083,7 @@
     VkDebugUtilsMessengerEXT messenger,
     const VkAllocationCallbacks* pAllocator)
 {
+    AEMU_SCOPED_TRACE("vkDestroyDebugUtilsMessengerEXT encode");
     mImpl->log("start vkDestroyDebugUtilsMessengerEXT");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -20236,6 +21140,8 @@
     {
         marshal_VkAllocationCallbacks(stream, (VkAllocationCallbacks*)(local_pAllocator));
     }
+    AEMU_SCOPED_TRACE("vkDestroyDebugUtilsMessengerEXT readParams");
+    AEMU_SCOPED_TRACE("vkDestroyDebugUtilsMessengerEXT returnUnmarshal");
     resources->destroyMapping()->mapHandles_VkDebugUtilsMessengerEXT((VkDebugUtilsMessengerEXT*)&messenger);
     mImpl->log("finish vkDestroyDebugUtilsMessengerEXT");;
 }
@@ -20246,6 +21152,7 @@
     VkDebugUtilsMessageTypeFlagsEXT messageTypes,
     const VkDebugUtilsMessengerCallbackDataEXT* pCallbackData)
 {
+    AEMU_SCOPED_TRACE("vkSubmitDebugUtilsMessageEXT encode");
     mImpl->log("start vkSubmitDebugUtilsMessageEXT");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -20289,6 +21196,8 @@
     stream->write((VkDebugUtilsMessageSeverityFlagBitsEXT*)&local_messageSeverity, sizeof(VkDebugUtilsMessageSeverityFlagBitsEXT));
     stream->write((VkDebugUtilsMessageTypeFlagsEXT*)&local_messageTypes, sizeof(VkDebugUtilsMessageTypeFlagsEXT));
     marshal_VkDebugUtilsMessengerCallbackDataEXT(stream, (VkDebugUtilsMessengerCallbackDataEXT*)(local_pCallbackData));
+    AEMU_SCOPED_TRACE("vkSubmitDebugUtilsMessageEXT readParams");
+    AEMU_SCOPED_TRACE("vkSubmitDebugUtilsMessageEXT returnUnmarshal");
     mImpl->log("finish vkSubmitDebugUtilsMessageEXT");;
 }
 
@@ -20299,6 +21208,7 @@
     const AHardwareBuffer* buffer,
     VkAndroidHardwareBufferPropertiesANDROID* pProperties)
 {
+    AEMU_SCOPED_TRACE("vkGetAndroidHardwareBufferPropertiesANDROID encode");
     mImpl->log("start vkGetAndroidHardwareBufferPropertiesANDROID");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -20331,11 +21241,13 @@
     stream->write((uint64_t*)&cgen_var_1414, 1 * 8);
     stream->write((AHardwareBuffer*)local_buffer, sizeof(AHardwareBuffer));
     marshal_VkAndroidHardwareBufferPropertiesANDROID(stream, (VkAndroidHardwareBufferPropertiesANDROID*)(pProperties));
+    AEMU_SCOPED_TRACE("vkGetAndroidHardwareBufferPropertiesANDROID readParams");
     unmarshal_VkAndroidHardwareBufferPropertiesANDROID(stream, (VkAndroidHardwareBufferPropertiesANDROID*)(pProperties));
     if (pProperties)
     {
         transform_fromhost_VkAndroidHardwareBufferPropertiesANDROID(mImpl->resources(), (VkAndroidHardwareBufferPropertiesANDROID*)(pProperties));
     }
+    AEMU_SCOPED_TRACE("vkGetAndroidHardwareBufferPropertiesANDROID returnUnmarshal");
     VkResult vkGetAndroidHardwareBufferPropertiesANDROID_VkResult_return = (VkResult)0;
     stream->read(&vkGetAndroidHardwareBufferPropertiesANDROID_VkResult_return, sizeof(VkResult));
     countingStream->clearPool();
@@ -20350,6 +21262,7 @@
     const VkMemoryGetAndroidHardwareBufferInfoANDROID* pInfo,
     AHardwareBuffer** pBuffer)
 {
+    AEMU_SCOPED_TRACE("vkGetMemoryAndroidHardwareBufferANDROID encode");
     mImpl->log("start vkGetMemoryAndroidHardwareBufferANDROID");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -20387,7 +21300,9 @@
     stream->write((uint64_t*)&cgen_var_1416, 1 * 8);
     marshal_VkMemoryGetAndroidHardwareBufferInfoANDROID(stream, (VkMemoryGetAndroidHardwareBufferInfoANDROID*)(local_pInfo));
     stream->write((AHardwareBuffer**)pBuffer, sizeof(AHardwareBuffer*));
+    AEMU_SCOPED_TRACE("vkGetMemoryAndroidHardwareBufferANDROID readParams");
     stream->read((AHardwareBuffer**)pBuffer, sizeof(AHardwareBuffer*));
+    AEMU_SCOPED_TRACE("vkGetMemoryAndroidHardwareBufferANDROID returnUnmarshal");
     VkResult vkGetMemoryAndroidHardwareBufferANDROID_VkResult_return = (VkResult)0;
     stream->read(&vkGetMemoryAndroidHardwareBufferANDROID_VkResult_return, sizeof(VkResult));
     countingStream->clearPool();
@@ -20413,6 +21328,7 @@
     VkCommandBuffer commandBuffer,
     const VkSampleLocationsInfoEXT* pSampleLocationsInfo)
 {
+    AEMU_SCOPED_TRACE("vkCmdSetSampleLocationsEXT encode");
     mImpl->log("start vkCmdSetSampleLocationsEXT");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -20448,6 +21364,8 @@
     stream->handleMapping()->mapHandles_VkCommandBuffer_u64(&local_commandBuffer, &cgen_var_1418, 1);
     stream->write((uint64_t*)&cgen_var_1418, 1 * 8);
     marshal_VkSampleLocationsInfoEXT(stream, (VkSampleLocationsInfoEXT*)(local_pSampleLocationsInfo));
+    AEMU_SCOPED_TRACE("vkCmdSetSampleLocationsEXT readParams");
+    AEMU_SCOPED_TRACE("vkCmdSetSampleLocationsEXT returnUnmarshal");
     mImpl->log("finish vkCmdSetSampleLocationsEXT");;
 }
 
@@ -20456,6 +21374,7 @@
     VkSampleCountFlagBits samples,
     VkMultisamplePropertiesEXT* pMultisampleProperties)
 {
+    AEMU_SCOPED_TRACE("vkGetPhysicalDeviceMultisamplePropertiesEXT encode");
     mImpl->log("start vkGetPhysicalDeviceMultisamplePropertiesEXT");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -20484,11 +21403,13 @@
     stream->write((uint64_t*)&cgen_var_1420, 1 * 8);
     stream->write((VkSampleCountFlagBits*)&local_samples, sizeof(VkSampleCountFlagBits));
     marshal_VkMultisamplePropertiesEXT(stream, (VkMultisamplePropertiesEXT*)(pMultisampleProperties));
+    AEMU_SCOPED_TRACE("vkGetPhysicalDeviceMultisamplePropertiesEXT readParams");
     unmarshal_VkMultisamplePropertiesEXT(stream, (VkMultisamplePropertiesEXT*)(pMultisampleProperties));
     if (pMultisampleProperties)
     {
         transform_fromhost_VkMultisamplePropertiesEXT(mImpl->resources(), (VkMultisamplePropertiesEXT*)(pMultisampleProperties));
     }
+    AEMU_SCOPED_TRACE("vkGetPhysicalDeviceMultisamplePropertiesEXT returnUnmarshal");
     mImpl->log("finish vkGetPhysicalDeviceMultisamplePropertiesEXT");;
 }
 
@@ -20510,6 +21431,7 @@
     const VkAllocationCallbacks* pAllocator,
     VkValidationCacheEXT* pValidationCache)
 {
+    AEMU_SCOPED_TRACE("vkCreateValidationCacheEXT encode");
     mImpl->log("start vkCreateValidationCacheEXT");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -20579,11 +21501,13 @@
     stream->handleMapping()->mapHandles_VkValidationCacheEXT_u64(pValidationCache, &cgen_var_1426, 1);
     stream->write((uint64_t*)&cgen_var_1426, 8);
     stream->setHandleMapping(resources->unwrapMapping());
+    AEMU_SCOPED_TRACE("vkCreateValidationCacheEXT readParams");
     stream->setHandleMapping(resources->createMapping());
     uint64_t cgen_var_1427;
     stream->read((uint64_t*)&cgen_var_1427, 8);
     stream->handleMapping()->mapHandles_u64_VkValidationCacheEXT(&cgen_var_1427, (VkValidationCacheEXT*)pValidationCache, 1);
     stream->unsetHandleMapping();
+    AEMU_SCOPED_TRACE("vkCreateValidationCacheEXT returnUnmarshal");
     VkResult vkCreateValidationCacheEXT_VkResult_return = (VkResult)0;
     stream->read(&vkCreateValidationCacheEXT_VkResult_return, sizeof(VkResult));
     countingStream->clearPool();
@@ -20598,6 +21522,7 @@
     VkValidationCacheEXT validationCache,
     const VkAllocationCallbacks* pAllocator)
 {
+    AEMU_SCOPED_TRACE("vkDestroyValidationCacheEXT encode");
     mImpl->log("start vkDestroyValidationCacheEXT");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -20654,6 +21579,8 @@
     {
         marshal_VkAllocationCallbacks(stream, (VkAllocationCallbacks*)(local_pAllocator));
     }
+    AEMU_SCOPED_TRACE("vkDestroyValidationCacheEXT readParams");
+    AEMU_SCOPED_TRACE("vkDestroyValidationCacheEXT returnUnmarshal");
     resources->destroyMapping()->mapHandles_VkValidationCacheEXT((VkValidationCacheEXT*)&validationCache);
     mImpl->log("finish vkDestroyValidationCacheEXT");;
 }
@@ -20664,6 +21591,7 @@
     uint32_t srcCacheCount,
     const VkValidationCacheEXT* pSrcCaches)
 {
+    AEMU_SCOPED_TRACE("vkMergeValidationCachesEXT encode");
     mImpl->log("start vkMergeValidationCachesEXT");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -20718,6 +21646,8 @@
         stream->handleMapping()->mapHandles_VkValidationCacheEXT_u64(local_pSrcCaches, cgen_var_1439, ((srcCacheCount)));
         stream->write((uint64_t*)cgen_var_1439, ((srcCacheCount)) * 8);
     }
+    AEMU_SCOPED_TRACE("vkMergeValidationCachesEXT readParams");
+    AEMU_SCOPED_TRACE("vkMergeValidationCachesEXT returnUnmarshal");
     VkResult vkMergeValidationCachesEXT_VkResult_return = (VkResult)0;
     stream->read(&vkMergeValidationCachesEXT_VkResult_return, sizeof(VkResult));
     countingStream->clearPool();
@@ -20733,6 +21663,7 @@
     size_t* pDataSize,
     void* pData)
 {
+    AEMU_SCOPED_TRACE("vkGetValidationCacheDataEXT encode");
     mImpl->log("start vkGetValidationCacheDataEXT");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -20793,6 +21724,7 @@
     {
         stream->write((void*)pData, (*(pDataSize)) * sizeof(uint8_t));
     }
+    AEMU_SCOPED_TRACE("vkGetValidationCacheDataEXT readParams");
     // WARNING PTR CHECK
     size_t* check_pDataSize;
     check_pDataSize = (size_t*)(uintptr_t)stream->getBe64();
@@ -20815,6 +21747,7 @@
         }
         stream->read((void*)pData, (*(pDataSize)) * sizeof(uint8_t));
     }
+    AEMU_SCOPED_TRACE("vkGetValidationCacheDataEXT returnUnmarshal");
     VkResult vkGetValidationCacheDataEXT_VkResult_return = (VkResult)0;
     stream->read(&vkGetValidationCacheDataEXT_VkResult_return, sizeof(VkResult));
     countingStream->clearPool();
@@ -20838,6 +21771,7 @@
     const void* pHostPointer,
     VkMemoryHostPointerPropertiesEXT* pMemoryHostPointerProperties)
 {
+    AEMU_SCOPED_TRACE("vkGetMemoryHostPointerPropertiesEXT encode");
     mImpl->log("start vkGetMemoryHostPointerPropertiesEXT");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -20886,11 +21820,13 @@
         stream->write((void*)local_pHostPointer, sizeof(uint8_t));
     }
     marshal_VkMemoryHostPointerPropertiesEXT(stream, (VkMemoryHostPointerPropertiesEXT*)(pMemoryHostPointerProperties));
+    AEMU_SCOPED_TRACE("vkGetMemoryHostPointerPropertiesEXT readParams");
     unmarshal_VkMemoryHostPointerPropertiesEXT(stream, (VkMemoryHostPointerPropertiesEXT*)(pMemoryHostPointerProperties));
     if (pMemoryHostPointerProperties)
     {
         transform_fromhost_VkMemoryHostPointerPropertiesEXT(mImpl->resources(), (VkMemoryHostPointerPropertiesEXT*)(pMemoryHostPointerProperties));
     }
+    AEMU_SCOPED_TRACE("vkGetMemoryHostPointerPropertiesEXT returnUnmarshal");
     VkResult vkGetMemoryHostPointerPropertiesEXT_VkResult_return = (VkResult)0;
     stream->read(&vkGetMemoryHostPointerPropertiesEXT_VkResult_return, sizeof(VkResult));
     countingStream->clearPool();
@@ -20909,6 +21845,7 @@
     VkDeviceSize dstOffset,
     uint32_t marker)
 {
+    AEMU_SCOPED_TRACE("vkCmdWriteBufferMarkerAMD encode");
     mImpl->log("start vkCmdWriteBufferMarkerAMD");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -20951,6 +21888,8 @@
     stream->write((uint64_t*)&cgen_var_1460, 1 * 8);
     stream->write((VkDeviceSize*)&local_dstOffset, sizeof(VkDeviceSize));
     stream->write((uint32_t*)&local_marker, sizeof(uint32_t));
+    AEMU_SCOPED_TRACE("vkCmdWriteBufferMarkerAMD readParams");
+    AEMU_SCOPED_TRACE("vkCmdWriteBufferMarkerAMD returnUnmarshal");
     mImpl->log("finish vkCmdWriteBufferMarkerAMD");;
 }
 
@@ -20966,6 +21905,7 @@
     VkCommandBuffer commandBuffer,
     const void* pCheckpointMarker)
 {
+    AEMU_SCOPED_TRACE("vkCmdSetCheckpointNV encode");
     mImpl->log("start vkCmdSetCheckpointNV");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -21008,6 +21948,8 @@
     {
         stream->write((void*)local_pCheckpointMarker, sizeof(uint8_t));
     }
+    AEMU_SCOPED_TRACE("vkCmdSetCheckpointNV readParams");
+    AEMU_SCOPED_TRACE("vkCmdSetCheckpointNV returnUnmarshal");
     mImpl->log("finish vkCmdSetCheckpointNV");;
 }
 
@@ -21016,6 +21958,7 @@
     uint32_t* pCheckpointDataCount,
     VkCheckpointDataNV* pCheckpointData)
 {
+    AEMU_SCOPED_TRACE("vkGetQueueCheckpointDataNV encode");
     mImpl->log("start vkGetQueueCheckpointDataNV");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -21072,6 +22015,7 @@
             marshal_VkCheckpointDataNV(stream, (VkCheckpointDataNV*)(pCheckpointData + i));
         }
     }
+    AEMU_SCOPED_TRACE("vkGetQueueCheckpointDataNV readParams");
     // WARNING PTR CHECK
     uint32_t* check_pCheckpointDataCount;
     check_pCheckpointDataCount = (uint32_t*)(uintptr_t)stream->getBe64();
@@ -21104,6 +22048,7 @@
             transform_fromhost_VkCheckpointDataNV(mImpl->resources(), (VkCheckpointDataNV*)(pCheckpointData + i));
         }
     }
+    AEMU_SCOPED_TRACE("vkGetQueueCheckpointDataNV returnUnmarshal");
     mImpl->log("finish vkGetQueueCheckpointDataNV");;
 }
 
@@ -21114,6 +22059,7 @@
     VkDeviceMemory memory,
     uint64_t* pAddress)
 {
+    AEMU_SCOPED_TRACE("vkMapMemoryIntoAddressSpaceGOOGLE encode");
     mImpl->log("start vkMapMemoryIntoAddressSpaceGOOGLE");
     mImpl->resources()->on_vkMapMemoryIntoAddressSpaceGOOGLE_pre(this, VK_SUCCESS, device, memory, pAddress);
     auto stream = mImpl->stream();
@@ -21160,6 +22106,7 @@
     {
         stream->write((uint64_t*)pAddress, sizeof(uint64_t));
     }
+    AEMU_SCOPED_TRACE("vkMapMemoryIntoAddressSpaceGOOGLE readParams");
     // WARNING PTR CHECK
     uint64_t* check_pAddress;
     check_pAddress = (uint64_t*)(uintptr_t)stream->getBe64();
@@ -21171,6 +22118,7 @@
         }
         stream->read((uint64_t*)pAddress, sizeof(uint64_t));
     }
+    AEMU_SCOPED_TRACE("vkMapMemoryIntoAddressSpaceGOOGLE returnUnmarshal");
     VkResult vkMapMemoryIntoAddressSpaceGOOGLE_VkResult_return = (VkResult)0;
     stream->read(&vkMapMemoryIntoAddressSpaceGOOGLE_VkResult_return, sizeof(VkResult));
     countingStream->clearPool();
@@ -21188,6 +22136,7 @@
     VkImage image,
     uint32_t colorBuffer)
 {
+    AEMU_SCOPED_TRACE("vkRegisterImageColorBufferGOOGLE encode");
     mImpl->log("start vkRegisterImageColorBufferGOOGLE");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -21222,6 +22171,8 @@
     stream->handleMapping()->mapHandles_VkImage_u64(&local_image, &cgen_var_1483, 1);
     stream->write((uint64_t*)&cgen_var_1483, 1 * 8);
     stream->write((uint32_t*)&local_colorBuffer, sizeof(uint32_t));
+    AEMU_SCOPED_TRACE("vkRegisterImageColorBufferGOOGLE readParams");
+    AEMU_SCOPED_TRACE("vkRegisterImageColorBufferGOOGLE returnUnmarshal");
     VkResult vkRegisterImageColorBufferGOOGLE_VkResult_return = (VkResult)0;
     stream->read(&vkRegisterImageColorBufferGOOGLE_VkResult_return, sizeof(VkResult));
     countingStream->clearPool();
@@ -21236,6 +22187,7 @@
     VkBuffer buffer,
     uint32_t colorBuffer)
 {
+    AEMU_SCOPED_TRACE("vkRegisterBufferColorBufferGOOGLE encode");
     mImpl->log("start vkRegisterBufferColorBufferGOOGLE");
     auto stream = mImpl->stream();
     auto countingStream = mImpl->countingStream();
@@ -21270,6 +22222,8 @@
     stream->handleMapping()->mapHandles_VkBuffer_u64(&local_buffer, &cgen_var_1487, 1);
     stream->write((uint64_t*)&cgen_var_1487, 1 * 8);
     stream->write((uint32_t*)&local_colorBuffer, sizeof(uint32_t));
+    AEMU_SCOPED_TRACE("vkRegisterBufferColorBufferGOOGLE readParams");
+    AEMU_SCOPED_TRACE("vkRegisterBufferColorBufferGOOGLE returnUnmarshal");
     VkResult vkRegisterBufferColorBufferGOOGLE_VkResult_return = (VkResult)0;
     stream->read(&vkRegisterBufferColorBufferGOOGLE_VkResult_return, sizeof(VkResult));
     countingStream->clearPool();
