From 1b93f58d0f4f417738a91e5278fda30e4954f7f9 Mon Sep 17 00:00:00 2001 From: Dave Lee Date: Thu, 10 Jul 2025 13:40:29 -0700 Subject: [PATCH] [6.2] RemoteInspection: Add AsyncTaskInfo.IsSuspended based on HasTaskDependency --- include/swift/RemoteInspection/ReflectionContext.h | 3 +++ include/swift/RemoteInspection/RuntimeInternals.h | 1 + 2 files changed, 4 insertions(+) diff --git a/include/swift/RemoteInspection/ReflectionContext.h b/include/swift/RemoteInspection/ReflectionContext.h index be6bd27670d41..05fc51e652e66 100644 --- a/include/swift/RemoteInspection/ReflectionContext.h +++ b/include/swift/RemoteInspection/ReflectionContext.h @@ -198,6 +198,7 @@ class ReflectionContext bool IsRunning; bool IsEnqueued; bool IsComplete; + bool IsSuspended; bool HasThreadPort; uint32_t ThreadPort; @@ -1793,6 +1794,8 @@ class ReflectionContext Info.IsEscalated = TaskStatusFlags & ActiveTaskStatusFlags::IsEscalated; Info.IsEnqueued = TaskStatusFlags & ActiveTaskStatusFlags::IsEnqueued; Info.IsComplete = TaskStatusFlags & ActiveTaskStatusFlags::IsComplete; + Info.IsSuspended = + TaskStatusFlags & ActiveTaskStatusFlags::HasTaskDependency; setIsRunning(Info, AsyncTaskObj.get()); std::tie(Info.HasThreadPort, Info.ThreadPort) = diff --git a/include/swift/RemoteInspection/RuntimeInternals.h b/include/swift/RemoteInspection/RuntimeInternals.h index b61723579c53f..f2600dbad9aa4 100644 --- a/include/swift/RemoteInspection/RuntimeInternals.h +++ b/include/swift/RemoteInspection/RuntimeInternals.h @@ -113,6 +113,7 @@ struct ActiveTaskStatusFlags { static const uint32_t IsRunning = 0x800; static const uint32_t IsEnqueued = 0x1000; static const uint32_t IsComplete = 0x2000; + static const uint32_t HasTaskDependency = 0x4000; }; template