Skip to content
This repository has been archived by the owner on Jan 23, 2023. It is now read-only.

Improve DumpAsync SOS command #20807

Closed
wants to merge 4 commits into from
Closed

Conversation

stephentoub
Copy link
Member

  • Add a stats summary at the beginning of the output
  • Improved single-line-per-entry default behavior for increased readability
  • Add option to include all tasks, not just async state machine objects
  • Include state value for each async object, the state field for async state machines or the state flags for other tasks
  • Support following continuation chains, rendered as "async stacks"
  • Support resolving delegate names so that Task.Run and related items have the associated method name displayed
  • Optional (experimental) DGML rendering of the graph
  • Optionally include completed tasks, by default filtering them out
  • Optionally display the fields of state machines

Some examples. This is based on creating a new ASP.NET Core Web Application, and updating its Index page with the following (silly) code:

using System.Threading;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc.RazorPages;

namespace WebApplication1.Pages
{
    public class IndexModel : PageModel
    {
        public async Task OnGetAsync()
        {
            await Task.WhenAll(
                Task.Run(() => SomeMethod()),
                Task.Delay(int.MaxValue));
        }

        public static void SomeMethod() => Thread.Sleep(int.MaxValue);
    }
}

When I then make two requests to this from the browser (both of which will hang), attach WinDBG, and load SOS, I'm able to run commands like the following:

Basic dumpasync

0:024> !dumpasync
Statistics:
              MT    Count    TotalSize Class Name
00007ffe0b97d698        1          120 System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1+AsyncStateMachineBox`1[[System.Threading.Tasks.VoidTaskResult, System.Private.CoreLib],[Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.SocketTransport+<RunAcceptLoopAsync>d__16, Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets]]
00007ffe0b97dbb8        1          136 System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1+AsyncStateMachineBox`1[[System.Threading.Tasks.VoidTaskResult, System.Private.CoreLib],[Microsoft.AspNetCore.Hosting.WebHostExtensions+<WaitForTokenShutdownAsync>d__7, Microsoft.AspNetCore.Hosting]]
00007ffe0b97e7c8        1          144 System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1+AsyncStateMachineBox`1[[System.Threading.Tasks.VoidTaskResult, System.Private.CoreLib],[Microsoft.AspNetCore.Hosting.WebHostExtensions+<RunAsync>d__4, Microsoft.AspNetCore.Hosting]]
00007ffe0b97e208        1          144 System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1+AsyncStateMachineBox`1[[System.Threading.Tasks.VoidTaskResult, System.Private.CoreLib],[Microsoft.AspNetCore.Hosting.WebHostExtensions+<RunAsync>d__5, Microsoft.AspNetCore.Hosting]]
00007ffe0bbf1248        2          224 System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1+AsyncStateMachineBox`1[[System.Threading.Tasks.VoidTaskResult, System.Private.CoreLib],[WebApplication1.Pages.IndexModel+<OnGetAsync>d__0, WebApplication1]]
00007ffe0bbf3520        2          240 System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1+AsyncStateMachineBox`1[[Microsoft.AspNetCore.Mvc.Filters.PageHandlerExecutedContext, Microsoft.AspNetCore.Mvc.RazorPages],[Microsoft.AspNetCore.Mvc.RazorPages.Internal.PageActionInvoker+<InvokeNextPageFilterAwaitedAsync>d__33, Microsoft.AspNetCore.Mvc.RazorPages]]
00007ffe0bbf2450        2          256 System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1+AsyncStateMachineBox`1[[System.Threading.Tasks.VoidTaskResult, System.Private.CoreLib],[Microsoft.AspNetCore.Mvc.RazorPages.Internal.PageActionInvoker+<InvokeHandlerMethodAsync>d__30, Microsoft.AspNetCore.Mvc.RazorPages]]
00007ffe0b9ab7d8        2          256 System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1+AsyncStateMachineBox`1[[System.Threading.Tasks.VoidTaskResult, System.Private.CoreLib],[Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.Internal.SocketConnection+<StartAsync>d__22, Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets]]
00007ffe0b9aa2d0        2          256 System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1+AsyncStateMachineBox`1[[System.Threading.Tasks.VoidTaskResult, System.Private.CoreLib],[Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.Internal.SocketConnection+<DoSend>d__26, Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets]]
00007ffe0b9a6cf8        2          256 System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1+AsyncStateMachineBox`1[[System.Threading.Tasks.VoidTaskResult, System.Private.CoreLib],[Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.Internal.SocketConnection+<DoReceive>d__24, Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets]]
00007ffe0bbf69a8        2          272 System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1+AsyncStateMachineBox`1[[System.Threading.Tasks.VoidTaskResult, System.Private.CoreLib],[Microsoft.AspNetCore.Server.IISIntegration.IISMiddleware+<Invoke>d__13, Microsoft.AspNetCore.Server.IISIntegration]]
00007ffe0bbf5818        2          272 System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1+AsyncStateMachineBox`1[[System.Threading.Tasks.VoidTaskResult, System.Private.CoreLib],[Microsoft.AspNetCore.Builder.RouterMiddleware+<Invoke>d__4, Microsoft.AspNetCore.Routing]]
00007ffe0bbf5278        2          272 System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1+AsyncStateMachineBox`1[[System.Threading.Tasks.VoidTaskResult, System.Private.CoreLib],[Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker+<InvokeAsync>d__16, Microsoft.AspNetCore.Mvc.Core]]
00007ffe0bbf4cd8        2          272 System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1+AsyncStateMachineBox`1[[System.Threading.Tasks.VoidTaskResult, System.Private.CoreLib],[Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker+<InvokeFilterPipelineAsync>d__18, Microsoft.AspNetCore.Mvc.Core]]
00007ffe0bbf4738        2          272 System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1+AsyncStateMachineBox`1[[System.Threading.Tasks.VoidTaskResult, System.Private.CoreLib],[Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker+<InvokeNextResourceFilter>d__23, Microsoft.AspNetCore.Mvc.Core]]
00007ffe0bbf4198        2          272 System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1+AsyncStateMachineBox`1[[System.Threading.Tasks.VoidTaskResult, System.Private.CoreLib],[Microsoft.AspNetCore.Mvc.RazorPages.Internal.PageActionInvoker+<InvokeInnerFilterAsync>d__22, Microsoft.AspNetCore.Mvc.RazorPages]]
00007ffe0bbf3bf8        2          272 System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1+AsyncStateMachineBox`1[[System.Threading.Tasks.VoidTaskResult, System.Private.CoreLib],[Microsoft.AspNetCore.Mvc.RazorPages.PageModel+<OnPageHandlerExecutionAsync>d__134, Microsoft.AspNetCore.Mvc.RazorPages]]
00007ffe0bbf29f0        2          272 System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1+AsyncStateMachineBox`1[[System.Threading.Tasks.VoidTaskResult, System.Private.CoreLib],[Microsoft.AspNetCore.Mvc.RazorPages.Internal.PageActionInvoker+<InvokeNextPageFilterAsync>d__32, Microsoft.AspNetCore.Mvc.RazorPages]]
00007ffe0bbf1ce8        2          272 System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1+AsyncStateMachineBox`1[[Microsoft.AspNetCore.Mvc.IActionResult, Microsoft.AspNetCore.Mvc.Abstractions],[Microsoft.AspNetCore.Mvc.RazorPages.Internal.ExecutorFactory+NonGenericTaskHandlerMethod+<Execute>d__2, Microsoft.AspNetCore.Mvc.RazorPages]]
00007ffe0b9a3710        2          272 System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1+AsyncStateMachineBox`1[[System.Threading.Tasks.VoidTaskResult, System.Private.CoreLib],[Microsoft.AspNetCore.Server.Kestrel.Core.Internal.ConnectionDispatcher+<Execute>d__6, Microsoft.AspNetCore.Server.Kestrel.Core]]
00007ffe0b9a11d8        2          272 System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1+AsyncStateMachineBox`1[[System.Threading.Tasks.VoidTaskResult, System.Private.CoreLib],[Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpProtocol+<ProcessRequestsAsync>d__187`1[[Microsoft.AspNetCore.Hosting.Internal.HostingApplication+Context, Microsoft.AspNetCore.Hosting]], Microsoft.AspNetCore.Server.Kestrel.Core]]
00007ffe0bbf6378        2          288 System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1+AsyncStateMachineBox`1[[System.Threading.Tasks.VoidTaskResult, System.Private.CoreLib],[Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddleware+<Invoke>d__7, Microsoft.AspNetCore.Diagnostics]]
00007ffe0b9a3170        2          288 System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1+AsyncStateMachineBox`1[[System.Threading.Tasks.VoidTaskResult, System.Private.CoreLib],[Microsoft.AspNetCore.Server.Kestrel.Core.Internal.HttpConnectionMiddleware`1+<OnConnectionAsync>d__6[[Microsoft.AspNetCore.Hosting.Internal.HostingApplication+Context, Microsoft.AspNetCore.Hosting]], Microsoft.AspNetCore.Server.Kestrel.Core]]
00007ffe0b9a6748        2          336 System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1+AsyncStateMachineBox`1[[System.Threading.Tasks.VoidTaskResult, System.Private.CoreLib],[Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.Internal.SocketConnection+<ProcessReceives>d__25, Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets]]
00007ffe0b9a16d8        2          336 System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1+AsyncStateMachineBox`1[[System.Threading.Tasks.VoidTaskResult, System.Private.CoreLib],[Microsoft.AspNetCore.Server.Kestrel.Core.Internal.HttpConnection+<ProcessRequestsAsync>d__47`1[[Microsoft.AspNetCore.Hosting.Internal.HostingApplication+Context, Microsoft.AspNetCore.Hosting]], Microsoft.AspNetCore.Server.Kestrel.Core]]
00007ffe0b9a9328        2          448 System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1+AsyncStateMachineBox`1[[System.Threading.Tasks.VoidTaskResult, System.Private.CoreLib],[Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.Internal.SocketConnection+<ProcessSends>d__27, Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets]]
00007ffe0b9a0cb8        2          464 System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1+AsyncStateMachineBox`1[[System.Threading.Tasks.VoidTaskResult, System.Private.CoreLib],[Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpProtocol+<ProcessRequests>d__188`1[[Microsoft.AspNetCore.Hosting.Internal.HostingApplication+Context, Microsoft.AspNetCore.Hosting]], Microsoft.AspNetCore.Server.Kestrel.Core]]
00007ffe0bbf5d28        2          608 System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1+AsyncStateMachineBox`1[[System.Threading.Tasks.VoidTaskResult, System.Private.CoreLib],[Microsoft.AspNetCore.StaticFiles.StaticFileMiddleware+<Invoke>d__7, Microsoft.AspNetCore.StaticFiles]]
Total 52 objects
         Address               MT     Size      State Description
000002494aa461d0 00007ffe0b97dbb8      136          0  Microsoft.AspNetCore.Hosting.WebHostExtensions+<WaitForTokenShutdownAsync>d__7
000002494aa46258 00007ffe0b97e208      144          1  Microsoft.AspNetCore.Hosting.WebHostExtensions+<RunAsync>d__5
000002494aa462e8 00007ffe0b97e7c8      144          1  Microsoft.AspNetCore.Hosting.WebHostExtensions+<RunAsync>d__4
000002494aa47fe8 00007ffe0b9a11d8      136          0  Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpProtocol+<ProcessRequestsAsync>d__187`1[[Microsoft.AspNetCore.Hosting.Internal.HostingApplication+Context, Microsoft.AspNetCore.Hosting]]
000002494aa48070 00007ffe0b9a16d8      168          1  Microsoft.AspNetCore.Server.Kestrel.Core.Internal.HttpConnection+<ProcessRequestsAsync>d__47`1[[Microsoft.AspNetCore.Hosting.Internal.HostingApplication+Context, Microsoft.AspNetCore.Hosting]]
000002494aa484c0 00007ffe0b9a3170      144          0  Microsoft.AspNetCore.Server.Kestrel.Core.Internal.HttpConnectionMiddleware`1+<OnConnectionAsync>d__6[[Microsoft.AspNetCore.Hosting.Internal.HostingApplication+Context, Microsoft.AspNetCore.Hosting]]
000002494aa48550 00007ffe0b9a3710      136          0  Microsoft.AspNetCore.Server.Kestrel.Core.Internal.ConnectionDispatcher+<Execute>d__6
000002494aa48678 00007ffe0b9a6748      168          0  Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.Internal.SocketConnection+<ProcessReceives>d__25
000002494aa48760 00007ffe0b9a6cf8      128          0  Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.Internal.SocketConnection+<DoReceive>d__24
000002494aa487e0 00007ffe0b9a9328      224          0  Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.Internal.SocketConnection+<ProcessSends>d__27
000002494aa488c0 00007ffe0b9aa2d0      128          0  Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.Internal.SocketConnection+<DoSend>d__26
000002494aa48940 00007ffe0b9ab7d8      128          0  Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.Internal.SocketConnection+<StartAsync>d__22
0000024b4a998a70 00007ffe0b9a0cb8      232          1  Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpProtocol+<ProcessRequests>d__188`1[[Microsoft.AspNetCore.Hosting.Internal.HostingApplication+Context, Microsoft.AspNetCore.Hosting]]
0000024b4a998bf0 00007ffe0b9a11d8      136          0  Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpProtocol+<ProcessRequestsAsync>d__187`1[[Microsoft.AspNetCore.Hosting.Internal.HostingApplication+Context, Microsoft.AspNetCore.Hosting]]
0000024b4a998c78 00007ffe0b9a16d8      168          1  Microsoft.AspNetCore.Server.Kestrel.Core.Internal.HttpConnection+<ProcessRequestsAsync>d__47`1[[Microsoft.AspNetCore.Hosting.Internal.HostingApplication+Context, Microsoft.AspNetCore.Hosting]]
0000024b4a999448 00007ffe0b9a3170      144          0  Microsoft.AspNetCore.Server.Kestrel.Core.Internal.HttpConnectionMiddleware`1+<OnConnectionAsync>d__6[[Microsoft.AspNetCore.Hosting.Internal.HostingApplication+Context, Microsoft.AspNetCore.Hosting]]
0000024b4a9994d8 00007ffe0b9a3710      136          0  Microsoft.AspNetCore.Server.Kestrel.Core.Internal.ConnectionDispatcher+<Execute>d__6
0000024b4a999e18 00007ffe0b9a6748      168          0  Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.Internal.SocketConnection+<ProcessReceives>d__25
0000024b4a999f00 00007ffe0b9a6cf8      128          0  Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.Internal.SocketConnection+<DoReceive>d__24
0000024b4a999f80 00007ffe0b9a9328      224          0  Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.Internal.SocketConnection+<ProcessSends>d__27
0000024b4a99a060 00007ffe0b9aa2d0      128          0  Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.Internal.SocketConnection+<DoSend>d__26
0000024b4a99a0e0 00007ffe0b9ab7d8      128          0  Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.Internal.SocketConnection+<StartAsync>d__22
0000024b4a99bed8 00007ffe0b9a0cb8      232          1  Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpProtocol+<ProcessRequests>d__188`1[[Microsoft.AspNetCore.Hosting.Internal.HostingApplication+Context, Microsoft.AspNetCore.Hosting]]
0000024b4a99f8c8 00007ffe0bbf1248      112          0  WebApplication1.Pages.IndexModel+<OnGetAsync>d__0
0000024b4a99f938 00007ffe0bbf1ce8      136          0  Microsoft.AspNetCore.Mvc.RazorPages.Internal.ExecutorFactory+NonGenericTaskHandlerMethod+<Execute>d__2
0000024b4a99f9c0 00007ffe0bbf2450      128          0  Microsoft.AspNetCore.Mvc.RazorPages.Internal.PageActionInvoker+<InvokeHandlerMethodAsync>d__30
0000024b4a99fa40 00007ffe0bbf29f0      136          0  Microsoft.AspNetCore.Mvc.RazorPages.Internal.PageActionInvoker+<InvokeNextPageFilterAsync>d__32
0000024b4a99fac8 00007ffe0bbf3520      120          0  Microsoft.AspNetCore.Mvc.RazorPages.Internal.PageActionInvoker+<InvokeNextPageFilterAwaitedAsync>d__33
0000024b4a99fb40 00007ffe0bbf3bf8      136          0  Microsoft.AspNetCore.Mvc.RazorPages.PageModel+<OnPageHandlerExecutionAsync>d__134
0000024b4a99fbc8 00007ffe0bbf4198      136          0  Microsoft.AspNetCore.Mvc.RazorPages.Internal.PageActionInvoker+<InvokeInnerFilterAsync>d__22
0000024b4a99fc50 00007ffe0bbf4738      136          0  Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker+<InvokeNextResourceFilter>d__23
0000024b4a99fcd8 00007ffe0bbf4cd8      136          0  Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker+<InvokeFilterPipelineAsync>d__18
0000024b4a99fd60 00007ffe0bbf5278      136          0  Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker+<InvokeAsync>d__16
0000024b4a99fde8 00007ffe0bbf5818      136          2  Microsoft.AspNetCore.Builder.RouterMiddleware+<Invoke>d__4
0000024b4a99fe70 00007ffe0bbf5d28      304          5  Microsoft.AspNetCore.StaticFiles.StaticFileMiddleware+<Invoke>d__7
0000024b4a99ffa0 00007ffe0bbf6378      144          0  Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddleware+<Invoke>d__7
0000024b4a9a0030 00007ffe0bbf69a8      136          1  Microsoft.AspNetCore.Server.IISIntegration.IISMiddleware+<Invoke>d__13
0000024c4aafb540 00007ffe0b97d698      120          0  Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.SocketTransport+<RunAcceptLoopAsync>d__16
0000024c4ab5bee8 00007ffe0bbf1248      112          0  WebApplication1.Pages.IndexModel+<OnGetAsync>d__0
0000024c4ab5bf58 00007ffe0bbf1ce8      136          0  Microsoft.AspNetCore.Mvc.RazorPages.Internal.ExecutorFactory+NonGenericTaskHandlerMethod+<Execute>d__2
0000024c4ab5bfe0 00007ffe0bbf2450      128          0  Microsoft.AspNetCore.Mvc.RazorPages.Internal.PageActionInvoker+<InvokeHandlerMethodAsync>d__30
0000024c4ab5c060 00007ffe0bbf29f0      136          0  Microsoft.AspNetCore.Mvc.RazorPages.Internal.PageActionInvoker+<InvokeNextPageFilterAsync>d__32
0000024c4ab5c0e8 00007ffe0bbf3520      120          0  Microsoft.AspNetCore.Mvc.RazorPages.Internal.PageActionInvoker+<InvokeNextPageFilterAwaitedAsync>d__33
0000024c4ab5c160 00007ffe0bbf3bf8      136          0  Microsoft.AspNetCore.Mvc.RazorPages.PageModel+<OnPageHandlerExecutionAsync>d__134
0000024c4ab5c1e8 00007ffe0bbf4198      136          0  Microsoft.AspNetCore.Mvc.RazorPages.Internal.PageActionInvoker+<InvokeInnerFilterAsync>d__22
0000024c4ab5c270 00007ffe0bbf4738      136          0  Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker+<InvokeNextResourceFilter>d__23
0000024c4ab5c2f8 00007ffe0bbf4cd8      136          0  Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker+<InvokeFilterPipelineAsync>d__18
0000024c4ab5c380 00007ffe0bbf5278      136          0  Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker+<InvokeAsync>d__16
0000024c4ab5c408 00007ffe0bbf5818      136          2  Microsoft.AspNetCore.Builder.RouterMiddleware+<Invoke>d__4
0000024c4ab5c490 00007ffe0bbf5d28      304          5  Microsoft.AspNetCore.StaticFiles.StaticFileMiddleware+<Invoke>d__7
0000024c4ab5c5c0 00007ffe0bbf6378      144          0  Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddleware+<Invoke>d__7
0000024c4ab5c650 00007ffe0bbf69a8      136          1  Microsoft.AspNetCore.Server.IISIntegration.IISMiddleware+<Invoke>d__13

Note:

  • The summary table at the beginning, counting the number of each object type, ala Dumpheap
  • The one-line-per-entry for each async state machine
  • The additional state column, showing the current state field value of the state machine. This is the number of the await the state machine is currently at, 0-indexed. If it's -1, that means it's currently running code.

Adding -tasks

0:024> !dumpasync -tasks
Statistics:
              MT    Count    TotalSize Class Name
00007ffe5a0db4b0        1           72 System.Threading.Tasks.UnwrapPromise`1[[System.Threading.Tasks.VoidTaskResult, System.Private.CoreLib]]
00007ffe0b97cea8        1           72 System.Threading.Tasks.Task`1[[System.Net.Sockets.Socket, System.Net.Sockets]]
00007ffe0b97d698        1          120 System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1+AsyncStateMachineBox`1[[System.Threading.Tasks.VoidTaskResult, System.Private.CoreLib],[Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.SocketTransport+<RunAcceptLoopAsync>d__16, Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets]]
00007ffe5a0d86a0        2          128 System.Threading.Tasks.Task
00007ffe0b97dbb8        1          136 System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1+AsyncStateMachineBox`1[[System.Threading.Tasks.VoidTaskResult, System.Private.CoreLib],[Microsoft.AspNetCore.Hosting.WebHostExtensions+<WaitForTokenShutdownAsync>d__7, Microsoft.AspNetCore.Hosting]]
00007ffe0b97e7c8        1          144 System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1+AsyncStateMachineBox`1[[System.Threading.Tasks.VoidTaskResult, System.Private.CoreLib],[Microsoft.AspNetCore.Hosting.WebHostExtensions+<RunAsync>d__4, Microsoft.AspNetCore.Hosting]]
00007ffe0b97e208        1          144 System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1+AsyncStateMachineBox`1[[System.Threading.Tasks.VoidTaskResult, System.Private.CoreLib],[Microsoft.AspNetCore.Hosting.WebHostExtensions+<RunAsync>d__5, Microsoft.AspNetCore.Hosting]]
00007ffe5a0db840        2          160 System.Threading.Tasks.Task+WhenAllPromise
00007ffe5a0db750        2          208 System.Threading.Tasks.Task+DelayPromise
00007ffe0bbf1248        2          224 System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1+AsyncStateMachineBox`1[[System.Threading.Tasks.VoidTaskResult, System.Private.CoreLib],[WebApplication1.Pages.IndexModel+<OnGetAsync>d__0, WebApplication1]]
00007ffe0bbf3520        2          240 System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1+AsyncStateMachineBox`1[[Microsoft.AspNetCore.Mvc.Filters.PageHandlerExecutedContext, Microsoft.AspNetCore.Mvc.RazorPages],[Microsoft.AspNetCore.Mvc.RazorPages.Internal.PageActionInvoker+<InvokeNextPageFilterAwaitedAsync>d__33, Microsoft.AspNetCore.Mvc.RazorPages]]
00007ffe0bbf2450        2          256 System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1+AsyncStateMachineBox`1[[System.Threading.Tasks.VoidTaskResult, System.Private.CoreLib],[Microsoft.AspNetCore.Mvc.RazorPages.Internal.PageActionInvoker+<InvokeHandlerMethodAsync>d__30, Microsoft.AspNetCore.Mvc.RazorPages]]
00007ffe0b9ab7d8        2          256 System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1+AsyncStateMachineBox`1[[System.Threading.Tasks.VoidTaskResult, System.Private.CoreLib],[Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.Internal.SocketConnection+<StartAsync>d__22, Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets]]
00007ffe0b9aa2d0        2          256 System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1+AsyncStateMachineBox`1[[System.Threading.Tasks.VoidTaskResult, System.Private.CoreLib],[Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.Internal.SocketConnection+<DoSend>d__26, Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets]]
00007ffe0b9a6cf8        2          256 System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1+AsyncStateMachineBox`1[[System.Threading.Tasks.VoidTaskResult, System.Private.CoreLib],[Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.Internal.SocketConnection+<DoReceive>d__24, Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets]]
00007ffe0bbf69a8        2          272 System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1+AsyncStateMachineBox`1[[System.Threading.Tasks.VoidTaskResult, System.Private.CoreLib],[Microsoft.AspNetCore.Server.IISIntegration.IISMiddleware+<Invoke>d__13, Microsoft.AspNetCore.Server.IISIntegration]]
00007ffe0bbf5818        2          272 System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1+AsyncStateMachineBox`1[[System.Threading.Tasks.VoidTaskResult, System.Private.CoreLib],[Microsoft.AspNetCore.Builder.RouterMiddleware+<Invoke>d__4, Microsoft.AspNetCore.Routing]]
00007ffe0bbf5278        2          272 System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1+AsyncStateMachineBox`1[[System.Threading.Tasks.VoidTaskResult, System.Private.CoreLib],[Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker+<InvokeAsync>d__16, Microsoft.AspNetCore.Mvc.Core]]
00007ffe0bbf4cd8        2          272 System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1+AsyncStateMachineBox`1[[System.Threading.Tasks.VoidTaskResult, System.Private.CoreLib],[Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker+<InvokeFilterPipelineAsync>d__18, Microsoft.AspNetCore.Mvc.Core]]
00007ffe0bbf4738        2          272 System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1+AsyncStateMachineBox`1[[System.Threading.Tasks.VoidTaskResult, System.Private.CoreLib],[Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker+<InvokeNextResourceFilter>d__23, Microsoft.AspNetCore.Mvc.Core]]
00007ffe0bbf4198        2          272 System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1+AsyncStateMachineBox`1[[System.Threading.Tasks.VoidTaskResult, System.Private.CoreLib],[Microsoft.AspNetCore.Mvc.RazorPages.Internal.PageActionInvoker+<InvokeInnerFilterAsync>d__22, Microsoft.AspNetCore.Mvc.RazorPages]]
00007ffe0bbf3bf8        2          272 System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1+AsyncStateMachineBox`1[[System.Threading.Tasks.VoidTaskResult, System.Private.CoreLib],[Microsoft.AspNetCore.Mvc.RazorPages.PageModel+<OnPageHandlerExecutionAsync>d__134, Microsoft.AspNetCore.Mvc.RazorPages]]
00007ffe0bbf29f0        2          272 System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1+AsyncStateMachineBox`1[[System.Threading.Tasks.VoidTaskResult, System.Private.CoreLib],[Microsoft.AspNetCore.Mvc.RazorPages.Internal.PageActionInvoker+<InvokeNextPageFilterAsync>d__32, Microsoft.AspNetCore.Mvc.RazorPages]]
00007ffe0bbf1ce8        2          272 System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1+AsyncStateMachineBox`1[[Microsoft.AspNetCore.Mvc.IActionResult, Microsoft.AspNetCore.Mvc.Abstractions],[Microsoft.AspNetCore.Mvc.RazorPages.Internal.ExecutorFactory+NonGenericTaskHandlerMethod+<Execute>d__2, Microsoft.AspNetCore.Mvc.RazorPages]]
00007ffe0b9a3710        2          272 System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1+AsyncStateMachineBox`1[[System.Threading.Tasks.VoidTaskResult, System.Private.CoreLib],[Microsoft.AspNetCore.Server.Kestrel.Core.Internal.ConnectionDispatcher+<Execute>d__6, Microsoft.AspNetCore.Server.Kestrel.Core]]
00007ffe0b9a11d8        2          272 System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1+AsyncStateMachineBox`1[[System.Threading.Tasks.VoidTaskResult, System.Private.CoreLib],[Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpProtocol+<ProcessRequestsAsync>d__187`1[[Microsoft.AspNetCore.Hosting.Internal.HostingApplication+Context, Microsoft.AspNetCore.Hosting]], Microsoft.AspNetCore.Server.Kestrel.Core]]
00007ffe0bbf6378        2          288 System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1+AsyncStateMachineBox`1[[System.Threading.Tasks.VoidTaskResult, System.Private.CoreLib],[Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddleware+<Invoke>d__7, Microsoft.AspNetCore.Diagnostics]]
00007ffe0b9a3170        2          288 System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1+AsyncStateMachineBox`1[[System.Threading.Tasks.VoidTaskResult, System.Private.CoreLib],[Microsoft.AspNetCore.Server.Kestrel.Core.Internal.HttpConnectionMiddleware`1+<OnConnectionAsync>d__6[[Microsoft.AspNetCore.Hosting.Internal.HostingApplication+Context, Microsoft.AspNetCore.Hosting]], Microsoft.AspNetCore.Server.Kestrel.Core]]
00007ffe0b9a6748        2          336 System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1+AsyncStateMachineBox`1[[System.Threading.Tasks.VoidTaskResult, System.Private.CoreLib],[Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.Internal.SocketConnection+<ProcessReceives>d__25, Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets]]
00007ffe0b9a16d8        2          336 System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1+AsyncStateMachineBox`1[[System.Threading.Tasks.VoidTaskResult, System.Private.CoreLib],[Microsoft.AspNetCore.Server.Kestrel.Core.Internal.HttpConnection+<ProcessRequestsAsync>d__47`1[[Microsoft.AspNetCore.Hosting.Internal.HostingApplication+Context, Microsoft.AspNetCore.Hosting]], Microsoft.AspNetCore.Server.Kestrel.Core]]
00007ffe0b591008        6          432 System.Threading.Tasks.Task`1[[System.Object, System.Private.CoreLib]]
00007ffe0b9a9328        2          448 System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1+AsyncStateMachineBox`1[[System.Threading.Tasks.VoidTaskResult, System.Private.CoreLib],[Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.Internal.SocketConnection+<ProcessSends>d__27, Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets]]
00007ffe0b9a0cb8        2          464 System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1+AsyncStateMachineBox`1[[System.Threading.Tasks.VoidTaskResult, System.Private.CoreLib],[Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpProtocol+<ProcessRequests>d__188`1[[Microsoft.AspNetCore.Hosting.Internal.HostingApplication+Context, Microsoft.AspNetCore.Hosting]], Microsoft.AspNetCore.Server.Kestrel.Core]]
00007ffe0bbf5d28        2          608 System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1+AsyncStateMachineBox`1[[System.Threading.Tasks.VoidTaskResult, System.Private.CoreLib],[Microsoft.AspNetCore.StaticFiles.StaticFileMiddleware+<Invoke>d__7, Microsoft.AspNetCore.StaticFiles]]
Total 66 objects
         Address               MT     Size      State Description
000002494aa455e0 00007ffe5a0db4b0       72 [02000400]  System.Threading.Tasks.UnwrapPromise`1[[System.Threading.Tasks.VoidTaskResult, System.Private.CoreLib]] 
000002494aa46088 00007ffe0b591008       72 [02000440]  System.Threading.Tasks.Task`1[[System.Object, System.Private.CoreLib]] 
000002494aa461d0 00007ffe0b97dbb8      136          0  Microsoft.AspNetCore.Hosting.WebHostExtensions+<WaitForTokenShutdownAsync>d__7
000002494aa46258 00007ffe0b97e208      144          1  Microsoft.AspNetCore.Hosting.WebHostExtensions+<RunAsync>d__5
000002494aa462e8 00007ffe0b97e7c8      144          1  Microsoft.AspNetCore.Hosting.WebHostExtensions+<RunAsync>d__4
000002494aa47fe8 00007ffe0b9a11d8      136          0  Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpProtocol+<ProcessRequestsAsync>d__187`1[[Microsoft.AspNetCore.Hosting.Internal.HostingApplication+Context, Microsoft.AspNetCore.Hosting]]
000002494aa48070 00007ffe0b9a16d8      168          1  Microsoft.AspNetCore.Server.Kestrel.Core.Internal.HttpConnection+<ProcessRequestsAsync>d__47`1[[Microsoft.AspNetCore.Hosting.Internal.HostingApplication+Context, Microsoft.AspNetCore.Hosting]]
000002494aa48378 00007ffe0b591008       72 [02000400]  System.Threading.Tasks.Task`1[[System.Object, System.Private.CoreLib]] 
000002494aa484c0 00007ffe0b9a3170      144          0  Microsoft.AspNetCore.Server.Kestrel.Core.Internal.HttpConnectionMiddleware`1+<OnConnectionAsync>d__6[[Microsoft.AspNetCore.Hosting.Internal.HostingApplication+Context, Microsoft.AspNetCore.Hosting]]
000002494aa48550 00007ffe0b9a3710      136          0  Microsoft.AspNetCore.Server.Kestrel.Core.Internal.ConnectionDispatcher+<Execute>d__6
000002494aa48678 00007ffe0b9a6748      168          0  Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.Internal.SocketConnection+<ProcessReceives>d__25
000002494aa48760 00007ffe0b9a6cf8      128          0  Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.Internal.SocketConnection+<DoReceive>d__24
000002494aa487e0 00007ffe0b9a9328      224          0  Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.Internal.SocketConnection+<ProcessSends>d__27
000002494aa488c0 00007ffe0b9aa2d0      128          0  Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.Internal.SocketConnection+<DoSend>d__26
000002494aa48940 00007ffe0b9ab7d8      128          0  Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.Internal.SocketConnection+<StartAsync>d__22
000002494aa48aa8 00007ffe0b97cea8       72 [02000400]  System.Threading.Tasks.Task`1[[System.Net.Sockets.Socket, System.Net.Sockets]] 
0000024b4a98f8d0 00007ffe0b591008       72 [02000440]  System.Threading.Tasks.Task`1[[System.Object, System.Private.CoreLib]] 
0000024b4a998a70 00007ffe0b9a0cb8      232          1  Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpProtocol+<ProcessRequests>d__188`1[[Microsoft.AspNetCore.Hosting.Internal.HostingApplication+Context, Microsoft.AspNetCore.Hosting]]
0000024b4a998bf0 00007ffe0b9a11d8      136          0  Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpProtocol+<ProcessRequestsAsync>d__187`1[[Microsoft.AspNetCore.Hosting.Internal.HostingApplication+Context, Microsoft.AspNetCore.Hosting]]
0000024b4a998c78 00007ffe0b9a16d8      168          1  Microsoft.AspNetCore.Server.Kestrel.Core.Internal.HttpConnection+<ProcessRequestsAsync>d__47`1[[Microsoft.AspNetCore.Hosting.Internal.HostingApplication+Context, Microsoft.AspNetCore.Hosting]]
0000024b4a9992a8 00007ffe0b591008       72 [02000400]  System.Threading.Tasks.Task`1[[System.Object, System.Private.CoreLib]] 
0000024b4a999448 00007ffe0b9a3170      144          0  Microsoft.AspNetCore.Server.Kestrel.Core.Internal.HttpConnectionMiddleware`1+<OnConnectionAsync>d__6[[Microsoft.AspNetCore.Hosting.Internal.HostingApplication+Context, Microsoft.AspNetCore.Hosting]]
0000024b4a9994d8 00007ffe0b9a3710      136          0  Microsoft.AspNetCore.Server.Kestrel.Core.Internal.ConnectionDispatcher+<Execute>d__6
0000024b4a999e18 00007ffe0b9a6748      168          0  Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.Internal.SocketConnection+<ProcessReceives>d__25
0000024b4a999f00 00007ffe0b9a6cf8      128          0  Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.Internal.SocketConnection+<DoReceive>d__24
0000024b4a999f80 00007ffe0b9a9328      224          0  Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.Internal.SocketConnection+<ProcessSends>d__27
0000024b4a99a060 00007ffe0b9aa2d0      128          0  Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.Internal.SocketConnection+<DoSend>d__26
0000024b4a99a0e0 00007ffe0b9ab7d8      128          0  Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.Internal.SocketConnection+<StartAsync>d__22
0000024b4a99b168 00007ffe0b591008       72 [02000440]  System.Threading.Tasks.Task`1[[System.Object, System.Private.CoreLib]] 
0000024b4a99bed8 00007ffe0b9a0cb8      232          1  Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpProtocol+<ProcessRequests>d__188`1[[Microsoft.AspNetCore.Hosting.Internal.HostingApplication+Context, Microsoft.AspNetCore.Hosting]]
0000024b4a99f6f8 00007ffe5a0d86a0       64 [00032008]  System.Threading.Tasks.Task (WebApplication1.Pages.IndexModel+<>c.<OnGetAsync>b__0_0()) 
0000024b4a99f788 00007ffe5a0db750      104 [02000400]  System.Threading.Tasks.Task+DelayPromise 
0000024b4a99f878 00007ffe5a0db840       80 [02000400]  System.Threading.Tasks.Task+WhenAllPromise 
0000024b4a99f8c8 00007ffe0bbf1248      112          0  WebApplication1.Pages.IndexModel+<OnGetAsync>d__0
0000024b4a99f938 00007ffe0bbf1ce8      136          0  Microsoft.AspNetCore.Mvc.RazorPages.Internal.ExecutorFactory+NonGenericTaskHandlerMethod+<Execute>d__2
0000024b4a99f9c0 00007ffe0bbf2450      128          0  Microsoft.AspNetCore.Mvc.RazorPages.Internal.PageActionInvoker+<InvokeHandlerMethodAsync>d__30
0000024b4a99fa40 00007ffe0bbf29f0      136          0  Microsoft.AspNetCore.Mvc.RazorPages.Internal.PageActionInvoker+<InvokeNextPageFilterAsync>d__32
0000024b4a99fac8 00007ffe0bbf3520      120          0  Microsoft.AspNetCore.Mvc.RazorPages.Internal.PageActionInvoker+<InvokeNextPageFilterAwaitedAsync>d__33
0000024b4a99fb40 00007ffe0bbf3bf8      136          0  Microsoft.AspNetCore.Mvc.RazorPages.PageModel+<OnPageHandlerExecutionAsync>d__134
0000024b4a99fbc8 00007ffe0bbf4198      136          0  Microsoft.AspNetCore.Mvc.RazorPages.Internal.PageActionInvoker+<InvokeInnerFilterAsync>d__22
0000024b4a99fc50 00007ffe0bbf4738      136          0  Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker+<InvokeNextResourceFilter>d__23
0000024b4a99fcd8 00007ffe0bbf4cd8      136          0  Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker+<InvokeFilterPipelineAsync>d__18
0000024b4a99fd60 00007ffe0bbf5278      136          0  Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker+<InvokeAsync>d__16
0000024b4a99fde8 00007ffe0bbf5818      136          2  Microsoft.AspNetCore.Builder.RouterMiddleware+<Invoke>d__4
0000024b4a99fe70 00007ffe0bbf5d28      304          5  Microsoft.AspNetCore.StaticFiles.StaticFileMiddleware+<Invoke>d__7
0000024b4a99ffa0 00007ffe0bbf6378      144          0  Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddleware+<Invoke>d__7
0000024b4a9a0030 00007ffe0bbf69a8      136          1  Microsoft.AspNetCore.Server.IISIntegration.IISMiddleware+<Invoke>d__13
0000024c4aa544e0 00007ffe0b591008       72 [02000400]  System.Threading.Tasks.Task`1[[System.Object, System.Private.CoreLib]] 
0000024c4aafb540 00007ffe0b97d698      120          0  Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.SocketTransport+<RunAcceptLoopAsync>d__16
0000024c4ab5bc50 00007ffe5a0d86a0       64 [00032008]  System.Threading.Tasks.Task (WebApplication1.Pages.IndexModel+<>c.<OnGetAsync>b__0_0()) 
0000024c4ab5bce0 00007ffe5a0db750      104 [02000400]  System.Threading.Tasks.Task+DelayPromise 
0000024c4ab5be60 00007ffe5a0db840       80 [02000400]  System.Threading.Tasks.Task+WhenAllPromise 
0000024c4ab5bee8 00007ffe0bbf1248      112          0  WebApplication1.Pages.IndexModel+<OnGetAsync>d__0
0000024c4ab5bf58 00007ffe0bbf1ce8      136          0  Microsoft.AspNetCore.Mvc.RazorPages.Internal.ExecutorFactory+NonGenericTaskHandlerMethod+<Execute>d__2
0000024c4ab5bfe0 00007ffe0bbf2450      128          0  Microsoft.AspNetCore.Mvc.RazorPages.Internal.PageActionInvoker+<InvokeHandlerMethodAsync>d__30
0000024c4ab5c060 00007ffe0bbf29f0      136          0  Microsoft.AspNetCore.Mvc.RazorPages.Internal.PageActionInvoker+<InvokeNextPageFilterAsync>d__32
0000024c4ab5c0e8 00007ffe0bbf3520      120          0  Microsoft.AspNetCore.Mvc.RazorPages.Internal.PageActionInvoker+<InvokeNextPageFilterAwaitedAsync>d__33
0000024c4ab5c160 00007ffe0bbf3bf8      136          0  Microsoft.AspNetCore.Mvc.RazorPages.PageModel+<OnPageHandlerExecutionAsync>d__134
0000024c4ab5c1e8 00007ffe0bbf4198      136          0  Microsoft.AspNetCore.Mvc.RazorPages.Internal.PageActionInvoker+<InvokeInnerFilterAsync>d__22
0000024c4ab5c270 00007ffe0bbf4738      136          0  Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker+<InvokeNextResourceFilter>d__23
0000024c4ab5c2f8 00007ffe0bbf4cd8      136          0  Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker+<InvokeFilterPipelineAsync>d__18
0000024c4ab5c380 00007ffe0bbf5278      136          0  Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker+<InvokeAsync>d__16
0000024c4ab5c408 00007ffe0bbf5818      136          2  Microsoft.AspNetCore.Builder.RouterMiddleware+<Invoke>d__4
0000024c4ab5c490 00007ffe0bbf5d28      304          5  Microsoft.AspNetCore.StaticFiles.StaticFileMiddleware+<Invoke>d__7
0000024c4ab5c5c0 00007ffe0bbf6378      144          0  Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddleware+<Invoke>d__7
0000024c4ab5c650 00007ffe0bbf69a8      136          1  Microsoft.AspNetCore.Server.IISIntegration.IISMiddleware+<Invoke>d__13

Note:

  • This now includes non-async state machine task objects, like those for the WhenAny, the Delay, and the Task.Run.
  • For non state machine tasks, the state column includes the hex value for Task's state flags.
  • For the Task.Run tasks, the name includes not only "Task" but also the referenced method name ("WebApplication1.Pages.IndexModel+<>c.b__0_0()")

Adding -stacks

0:024> !dumpasync -stacks
Statistics:
              MT    Count    TotalSize Class Name
00007ffe0b97d698        1          120 System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1+AsyncStateMachineBox`1[[System.Threading.Tasks.VoidTaskResult, System.Private.CoreLib],[Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.SocketTransport+<RunAcceptLoopAsync>d__16, Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets]]
00007ffe0b97dbb8        1          136 System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1+AsyncStateMachineBox`1[[System.Threading.Tasks.VoidTaskResult, System.Private.CoreLib],[Microsoft.AspNetCore.Hosting.WebHostExtensions+<WaitForTokenShutdownAsync>d__7, Microsoft.AspNetCore.Hosting]]
00007ffe0b97e7c8        1          144 System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1+AsyncStateMachineBox`1[[System.Threading.Tasks.VoidTaskResult, System.Private.CoreLib],[Microsoft.AspNetCore.Hosting.WebHostExtensions+<RunAsync>d__4, Microsoft.AspNetCore.Hosting]]
00007ffe0b97e208        1          144 System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1+AsyncStateMachineBox`1[[System.Threading.Tasks.VoidTaskResult, System.Private.CoreLib],[Microsoft.AspNetCore.Hosting.WebHostExtensions+<RunAsync>d__5, Microsoft.AspNetCore.Hosting]]
00007ffe0bbf1248        2          224 System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1+AsyncStateMachineBox`1[[System.Threading.Tasks.VoidTaskResult, System.Private.CoreLib],[WebApplication1.Pages.IndexModel+<OnGetAsync>d__0, WebApplication1]]
00007ffe0bbf3520        2          240 System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1+AsyncStateMachineBox`1[[Microsoft.AspNetCore.Mvc.Filters.PageHandlerExecutedContext, Microsoft.AspNetCore.Mvc.RazorPages],[Microsoft.AspNetCore.Mvc.RazorPages.Internal.PageActionInvoker+<InvokeNextPageFilterAwaitedAsync>d__33, Microsoft.AspNetCore.Mvc.RazorPages]]
00007ffe0bbf2450        2          256 System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1+AsyncStateMachineBox`1[[System.Threading.Tasks.VoidTaskResult, System.Private.CoreLib],[Microsoft.AspNetCore.Mvc.RazorPages.Internal.PageActionInvoker+<InvokeHandlerMethodAsync>d__30, Microsoft.AspNetCore.Mvc.RazorPages]]
00007ffe0b9ab7d8        2          256 System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1+AsyncStateMachineBox`1[[System.Threading.Tasks.VoidTaskResult, System.Private.CoreLib],[Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.Internal.SocketConnection+<StartAsync>d__22, Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets]]
00007ffe0b9aa2d0        2          256 System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1+AsyncStateMachineBox`1[[System.Threading.Tasks.VoidTaskResult, System.Private.CoreLib],[Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.Internal.SocketConnection+<DoSend>d__26, Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets]]
00007ffe0b9a6cf8        2          256 System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1+AsyncStateMachineBox`1[[System.Threading.Tasks.VoidTaskResult, System.Private.CoreLib],[Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.Internal.SocketConnection+<DoReceive>d__24, Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets]]
00007ffe0bbf69a8        2          272 System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1+AsyncStateMachineBox`1[[System.Threading.Tasks.VoidTaskResult, System.Private.CoreLib],[Microsoft.AspNetCore.Server.IISIntegration.IISMiddleware+<Invoke>d__13, Microsoft.AspNetCore.Server.IISIntegration]]
00007ffe0bbf5818        2          272 System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1+AsyncStateMachineBox`1[[System.Threading.Tasks.VoidTaskResult, System.Private.CoreLib],[Microsoft.AspNetCore.Builder.RouterMiddleware+<Invoke>d__4, Microsoft.AspNetCore.Routing]]
00007ffe0bbf5278        2          272 System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1+AsyncStateMachineBox`1[[System.Threading.Tasks.VoidTaskResult, System.Private.CoreLib],[Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker+<InvokeAsync>d__16, Microsoft.AspNetCore.Mvc.Core]]
00007ffe0bbf4cd8        2          272 System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1+AsyncStateMachineBox`1[[System.Threading.Tasks.VoidTaskResult, System.Private.CoreLib],[Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker+<InvokeFilterPipelineAsync>d__18, Microsoft.AspNetCore.Mvc.Core]]
00007ffe0bbf4738        2          272 System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1+AsyncStateMachineBox`1[[System.Threading.Tasks.VoidTaskResult, System.Private.CoreLib],[Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker+<InvokeNextResourceFilter>d__23, Microsoft.AspNetCore.Mvc.Core]]
00007ffe0bbf4198        2          272 System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1+AsyncStateMachineBox`1[[System.Threading.Tasks.VoidTaskResult, System.Private.CoreLib],[Microsoft.AspNetCore.Mvc.RazorPages.Internal.PageActionInvoker+<InvokeInnerFilterAsync>d__22, Microsoft.AspNetCore.Mvc.RazorPages]]
00007ffe0bbf3bf8        2          272 System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1+AsyncStateMachineBox`1[[System.Threading.Tasks.VoidTaskResult, System.Private.CoreLib],[Microsoft.AspNetCore.Mvc.RazorPages.PageModel+<OnPageHandlerExecutionAsync>d__134, Microsoft.AspNetCore.Mvc.RazorPages]]
00007ffe0bbf29f0        2          272 System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1+AsyncStateMachineBox`1[[System.Threading.Tasks.VoidTaskResult, System.Private.CoreLib],[Microsoft.AspNetCore.Mvc.RazorPages.Internal.PageActionInvoker+<InvokeNextPageFilterAsync>d__32, Microsoft.AspNetCore.Mvc.RazorPages]]
00007ffe0bbf1ce8        2          272 System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1+AsyncStateMachineBox`1[[Microsoft.AspNetCore.Mvc.IActionResult, Microsoft.AspNetCore.Mvc.Abstractions],[Microsoft.AspNetCore.Mvc.RazorPages.Internal.ExecutorFactory+NonGenericTaskHandlerMethod+<Execute>d__2, Microsoft.AspNetCore.Mvc.RazorPages]]
00007ffe0b9a3710        2          272 System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1+AsyncStateMachineBox`1[[System.Threading.Tasks.VoidTaskResult, System.Private.CoreLib],[Microsoft.AspNetCore.Server.Kestrel.Core.Internal.ConnectionDispatcher+<Execute>d__6, Microsoft.AspNetCore.Server.Kestrel.Core]]
00007ffe0b9a11d8        2          272 System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1+AsyncStateMachineBox`1[[System.Threading.Tasks.VoidTaskResult, System.Private.CoreLib],[Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpProtocol+<ProcessRequestsAsync>d__187`1[[Microsoft.AspNetCore.Hosting.Internal.HostingApplication+Context, Microsoft.AspNetCore.Hosting]], Microsoft.AspNetCore.Server.Kestrel.Core]]
00007ffe0bbf6378        2          288 System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1+AsyncStateMachineBox`1[[System.Threading.Tasks.VoidTaskResult, System.Private.CoreLib],[Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddleware+<Invoke>d__7, Microsoft.AspNetCore.Diagnostics]]
00007ffe0b9a3170        2          288 System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1+AsyncStateMachineBox`1[[System.Threading.Tasks.VoidTaskResult, System.Private.CoreLib],[Microsoft.AspNetCore.Server.Kestrel.Core.Internal.HttpConnectionMiddleware`1+<OnConnectionAsync>d__6[[Microsoft.AspNetCore.Hosting.Internal.HostingApplication+Context, Microsoft.AspNetCore.Hosting]], Microsoft.AspNetCore.Server.Kestrel.Core]]
00007ffe0b9a6748        2          336 System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1+AsyncStateMachineBox`1[[System.Threading.Tasks.VoidTaskResult, System.Private.CoreLib],[Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.Internal.SocketConnection+<ProcessReceives>d__25, Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets]]
00007ffe0b9a16d8        2          336 System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1+AsyncStateMachineBox`1[[System.Threading.Tasks.VoidTaskResult, System.Private.CoreLib],[Microsoft.AspNetCore.Server.Kestrel.Core.Internal.HttpConnection+<ProcessRequestsAsync>d__47`1[[Microsoft.AspNetCore.Hosting.Internal.HostingApplication+Context, Microsoft.AspNetCore.Hosting]], Microsoft.AspNetCore.Server.Kestrel.Core]]
00007ffe0b9a9328        2          448 System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1+AsyncStateMachineBox`1[[System.Threading.Tasks.VoidTaskResult, System.Private.CoreLib],[Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.Internal.SocketConnection+<ProcessSends>d__27, Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets]]
00007ffe0b9a0cb8        2          464 System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1+AsyncStateMachineBox`1[[System.Threading.Tasks.VoidTaskResult, System.Private.CoreLib],[Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpProtocol+<ProcessRequests>d__188`1[[Microsoft.AspNetCore.Hosting.Internal.HostingApplication+Context, Microsoft.AspNetCore.Hosting]], Microsoft.AspNetCore.Server.Kestrel.Core]]
00007ffe0bbf5d28        2          608 System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1+AsyncStateMachineBox`1[[System.Threading.Tasks.VoidTaskResult, System.Private.CoreLib],[Microsoft.AspNetCore.StaticFiles.StaticFileMiddleware+<Invoke>d__7, Microsoft.AspNetCore.StaticFiles]]
Total 52 objects
In 10 chains.
         Address               MT     Size      State Description
000002494aa461d0 00007ffe0b97dbb8      136          0  Microsoft.AspNetCore.Hosting.WebHostExtensions+<WaitForTokenShutdownAsync>d__7
Async "stack":
.000002494aa46258 (1) Microsoft.AspNetCore.Hosting.WebHostExtensions+<RunAsync>d__5
..000002494aa462e8 (1) Microsoft.AspNetCore.Hosting.WebHostExtensions+<RunAsync>d__4
...000002494aa46378 System.Threading.Tasks.Task+SetOnInvokeMres
--------------------------------------------------------------------------------
000002494aa484c0 00007ffe0b9a3170      144          0  Microsoft.AspNetCore.Server.Kestrel.Core.Internal.HttpConnectionMiddleware`1+<OnConnectionAsync>d__6[[Microsoft.AspNetCore.Hosting.Internal.HostingApplication+Context, Microsoft.AspNetCore.Hosting]]
Async "stack":
.000002494aa48550 (0) Microsoft.AspNetCore.Server.Kestrel.Core.Internal.ConnectionDispatcher+<Execute>d__6
--------------------------------------------------------------------------------
000002494aa48678 00007ffe0b9a6748      168          0  Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.Internal.SocketConnection+<ProcessReceives>d__25
Async "stack":
.000002494aa48760 (0) Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.Internal.SocketConnection+<DoReceive>d__24
..000002494aa48940 (0) Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.Internal.SocketConnection+<StartAsync>d__22
--------------------------------------------------------------------------------
000002494aa487e0 00007ffe0b9a9328      224          0  Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.Internal.SocketConnection+<ProcessSends>d__27
Async "stack":
.000002494aa488c0 (0) Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.Internal.SocketConnection+<DoSend>d__26
--------------------------------------------------------------------------------
0000024b4a999448 00007ffe0b9a3170      144          0  Microsoft.AspNetCore.Server.Kestrel.Core.Internal.HttpConnectionMiddleware`1+<OnConnectionAsync>d__6[[Microsoft.AspNetCore.Hosting.Internal.HostingApplication+Context, Microsoft.AspNetCore.Hosting]]
Async "stack":
.0000024b4a9994d8 (0) Microsoft.AspNetCore.Server.Kestrel.Core.Internal.ConnectionDispatcher+<Execute>d__6
--------------------------------------------------------------------------------
0000024b4a999e18 00007ffe0b9a6748      168          0  Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.Internal.SocketConnection+<ProcessReceives>d__25
Async "stack":
.0000024b4a999f00 (0) Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.Internal.SocketConnection+<DoReceive>d__24
..0000024b4a99a0e0 (0) Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.Internal.SocketConnection+<StartAsync>d__22
--------------------------------------------------------------------------------
0000024b4a999f80 00007ffe0b9a9328      224          0  Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.Internal.SocketConnection+<ProcessSends>d__27
Async "stack":
.0000024b4a99a060 (0) Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.Internal.SocketConnection+<DoSend>d__26
--------------------------------------------------------------------------------
0000024b4a99f8c8 00007ffe0bbf1248      112          0  WebApplication1.Pages.IndexModel+<OnGetAsync>d__0
Async "stack":
.0000024b4a99f938 (0) Microsoft.AspNetCore.Mvc.RazorPages.Internal.ExecutorFactory+NonGenericTaskHandlerMethod+<Execute>d__2
..0000024b4a99f9c0 (0) Microsoft.AspNetCore.Mvc.RazorPages.Internal.PageActionInvoker+<InvokeHandlerMethodAsync>d__30
...0000024b4a99fa40 (0) Microsoft.AspNetCore.Mvc.RazorPages.Internal.PageActionInvoker+<InvokeNextPageFilterAsync>d__32
....0000024b4a99fac8 (0) Microsoft.AspNetCore.Mvc.RazorPages.Internal.PageActionInvoker+<InvokeNextPageFilterAwaitedAsync>d__33
.....0000024b4a99fb40 (0) Microsoft.AspNetCore.Mvc.RazorPages.PageModel+<OnPageHandlerExecutionAsync>d__134
......0000024b4a99fbc8 (0) Microsoft.AspNetCore.Mvc.RazorPages.Internal.PageActionInvoker+<InvokeInnerFilterAsync>d__22
.......0000024b4a99fc50 (0) Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker+<InvokeNextResourceFilter>d__23
........0000024b4a99fcd8 (0) Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker+<InvokeFilterPipelineAsync>d__18
.........0000024b4a99fd60 (0) Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker+<InvokeAsync>d__16
..........0000024b4a99fde8 (2) Microsoft.AspNetCore.Builder.RouterMiddleware+<Invoke>d__4
...........0000024b4a99fe70 (5) Microsoft.AspNetCore.StaticFiles.StaticFileMiddleware+<Invoke>d__7
............0000024b4a99ffa0 (0) Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddleware+<Invoke>d__7
.............0000024b4a9a0030 (1) Microsoft.AspNetCore.Server.IISIntegration.IISMiddleware+<Invoke>d__13
..............0000024b4a99bed8 (1) Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpProtocol+<ProcessRequests>d__188`1[[Microsoft.AspNetCore.Hosting.Internal.HostingApplication+Context, Microsoft.AspNetCore.Hosting]]
...............000002494aa47fe8 (0) Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpProtocol+<ProcessRequestsAsync>d__187`1[[Microsoft.AspNetCore.Hosting.Internal.HostingApplication+Context, Microsoft.AspNetCore.Hosting]]
................000002494aa48070 (1) Microsoft.AspNetCore.Server.Kestrel.Core.Internal.HttpConnection+<ProcessRequestsAsync>d__47`1[[Microsoft.AspNetCore.Hosting.Internal.HostingApplication+Context, Microsoft.AspNetCore.Hosting]]
--------------------------------------------------------------------------------
0000024c4aafb540 00007ffe0b97d698      120          0  Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.SocketTransport+<RunAcceptLoopAsync>d__16
Async "stack":
.000002494aa455e0 System.Threading.Tasks.UnwrapPromise`1[[System.Threading.Tasks.VoidTaskResult, System.Private.CoreLib]]
--------------------------------------------------------------------------------
0000024c4ab5bee8 00007ffe0bbf1248      112          0  WebApplication1.Pages.IndexModel+<OnGetAsync>d__0
Async "stack":
.0000024c4ab5bf58 (0) Microsoft.AspNetCore.Mvc.RazorPages.Internal.ExecutorFactory+NonGenericTaskHandlerMethod+<Execute>d__2
..0000024c4ab5bfe0 (0) Microsoft.AspNetCore.Mvc.RazorPages.Internal.PageActionInvoker+<InvokeHandlerMethodAsync>d__30
...0000024c4ab5c060 (0) Microsoft.AspNetCore.Mvc.RazorPages.Internal.PageActionInvoker+<InvokeNextPageFilterAsync>d__32
....0000024c4ab5c0e8 (0) Microsoft.AspNetCore.Mvc.RazorPages.Internal.PageActionInvoker+<InvokeNextPageFilterAwaitedAsync>d__33
.....0000024c4ab5c160 (0) Microsoft.AspNetCore.Mvc.RazorPages.PageModel+<OnPageHandlerExecutionAsync>d__134
......0000024c4ab5c1e8 (0) Microsoft.AspNetCore.Mvc.RazorPages.Internal.PageActionInvoker+<InvokeInnerFilterAsync>d__22
.......0000024c4ab5c270 (0) Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker+<InvokeNextResourceFilter>d__23
........0000024c4ab5c2f8 (0) Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker+<InvokeFilterPipelineAsync>d__18
.........0000024c4ab5c380 (0) Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker+<InvokeAsync>d__16
..........0000024c4ab5c408 (2) Microsoft.AspNetCore.Builder.RouterMiddleware+<Invoke>d__4
...........0000024c4ab5c490 (5) Microsoft.AspNetCore.StaticFiles.StaticFileMiddleware+<Invoke>d__7
............0000024c4ab5c5c0 (0) Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddleware+<Invoke>d__7
.............0000024c4ab5c650 (1) Microsoft.AspNetCore.Server.IISIntegration.IISMiddleware+<Invoke>d__13
..............0000024b4a998a70 (1) Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpProtocol+<ProcessRequests>d__188`1[[Microsoft.AspNetCore.Hosting.Internal.HostingApplication+Context, Microsoft.AspNetCore.Hosting]]
...............0000024b4a998bf0 (0) Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpProtocol+<ProcessRequestsAsync>d__187`1[[Microsoft.AspNetCore.Hosting.Internal.HostingApplication+Context, Microsoft.AspNetCore.Hosting]]
................0000024b4a998c78 (1) Microsoft.AspNetCore.Server.Kestrel.Core.Internal.HttpConnection+<ProcessRequestsAsync>d__47`1[[Microsoft.AspNetCore.Hosting.Internal.HostingApplication+Context, Microsoft.AspNetCore.Hosting]]
--------------------------------------------------------------------------------

Note:

  • There are 52 objects, but it coalesces them into 10 chains, and then only outputs once for each.
  • Each top-level output object then includes its continuation chain, which is derived by following the continuation field from object to object.
  • Each continuation includes the continuation address, its state value, and state machine name.

Adding -dgmlPath

0:024> !dumpasync -dgmlPath c:\users\stoub\desktop\test.dgml
Statistics:
              MT    Count    TotalSize Class Name
00007ffe0b97d698        1          120 System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1+AsyncStateMachineBox`1[[System.Threading.Tasks.VoidTaskResult, System.Private.CoreLib],[Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.SocketTransport+<RunAcceptLoopAsync>d__16, Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets]]
00007ffe0b97dbb8        1          136 System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1+AsyncStateMachineBox`1[[System.Threading.Tasks.VoidTaskResult, System.Private.CoreLib],[Microsoft.AspNetCore.Hosting.WebHostExtensions+<WaitForTokenShutdownAsync>d__7, Microsoft.AspNetCore.Hosting]]
00007ffe0b97e7c8        1          144 System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1+AsyncStateMachineBox`1[[System.Threading.Tasks.VoidTaskResult, System.Private.CoreLib],[Microsoft.AspNetCore.Hosting.WebHostExtensions+<RunAsync>d__4, Microsoft.AspNetCore.Hosting]]
00007ffe0b97e208        1          144 System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1+AsyncStateMachineBox`1[[System.Threading.Tasks.VoidTaskResult, System.Private.CoreLib],[Microsoft.AspNetCore.Hosting.WebHostExtensions+<RunAsync>d__5, Microsoft.AspNetCore.Hosting]]
00007ffe0bbf1248        2          224 System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1+AsyncStateMachineBox`1[[System.Threading.Tasks.VoidTaskResult, System.Private.CoreLib],[WebApplication1.Pages.IndexModel+<OnGetAsync>d__0, WebApplication1]]
00007ffe0bbf3520        2          240 System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1+AsyncStateMachineBox`1[[Microsoft.AspNetCore.Mvc.Filters.PageHandlerExecutedContext, Microsoft.AspNetCore.Mvc.RazorPages],[Microsoft.AspNetCore.Mvc.RazorPages.Internal.PageActionInvoker+<InvokeNextPageFilterAwaitedAsync>d__33, Microsoft.AspNetCore.Mvc.RazorPages]]
00007ffe0bbf2450        2          256 System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1+AsyncStateMachineBox`1[[System.Threading.Tasks.VoidTaskResult, System.Private.CoreLib],[Microsoft.AspNetCore.Mvc.RazorPages.Internal.PageActionInvoker+<InvokeHandlerMethodAsync>d__30, Microsoft.AspNetCore.Mvc.RazorPages]]
00007ffe0b9ab7d8        2          256 System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1+AsyncStateMachineBox`1[[System.Threading.Tasks.VoidTaskResult, System.Private.CoreLib],[Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.Internal.SocketConnection+<StartAsync>d__22, Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets]]
00007ffe0b9aa2d0        2          256 System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1+AsyncStateMachineBox`1[[System.Threading.Tasks.VoidTaskResult, System.Private.CoreLib],[Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.Internal.SocketConnection+<DoSend>d__26, Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets]]
00007ffe0b9a6cf8        2          256 System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1+AsyncStateMachineBox`1[[System.Threading.Tasks.VoidTaskResult, System.Private.CoreLib],[Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.Internal.SocketConnection+<DoReceive>d__24, Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets]]
00007ffe0bbf69a8        2          272 System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1+AsyncStateMachineBox`1[[System.Threading.Tasks.VoidTaskResult, System.Private.CoreLib],[Microsoft.AspNetCore.Server.IISIntegration.IISMiddleware+<Invoke>d__13, Microsoft.AspNetCore.Server.IISIntegration]]
00007ffe0bbf5818        2          272 System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1+AsyncStateMachineBox`1[[System.Threading.Tasks.VoidTaskResult, System.Private.CoreLib],[Microsoft.AspNetCore.Builder.RouterMiddleware+<Invoke>d__4, Microsoft.AspNetCore.Routing]]
00007ffe0bbf5278        2          272 System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1+AsyncStateMachineBox`1[[System.Threading.Tasks.VoidTaskResult, System.Private.CoreLib],[Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker+<InvokeAsync>d__16, Microsoft.AspNetCore.Mvc.Core]]
00007ffe0bbf4cd8        2          272 System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1+AsyncStateMachineBox`1[[System.Threading.Tasks.VoidTaskResult, System.Private.CoreLib],[Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker+<InvokeFilterPipelineAsync>d__18, Microsoft.AspNetCore.Mvc.Core]]
00007ffe0bbf4738        2          272 System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1+AsyncStateMachineBox`1[[System.Threading.Tasks.VoidTaskResult, System.Private.CoreLib],[Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker+<InvokeNextResourceFilter>d__23, Microsoft.AspNetCore.Mvc.Core]]
00007ffe0bbf4198        2          272 System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1+AsyncStateMachineBox`1[[System.Threading.Tasks.VoidTaskResult, System.Private.CoreLib],[Microsoft.AspNetCore.Mvc.RazorPages.Internal.PageActionInvoker+<InvokeInnerFilterAsync>d__22, Microsoft.AspNetCore.Mvc.RazorPages]]
00007ffe0bbf3bf8        2          272 System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1+AsyncStateMachineBox`1[[System.Threading.Tasks.VoidTaskResult, System.Private.CoreLib],[Microsoft.AspNetCore.Mvc.RazorPages.PageModel+<OnPageHandlerExecutionAsync>d__134, Microsoft.AspNetCore.Mvc.RazorPages]]
00007ffe0bbf29f0        2          272 System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1+AsyncStateMachineBox`1[[System.Threading.Tasks.VoidTaskResult, System.Private.CoreLib],[Microsoft.AspNetCore.Mvc.RazorPages.Internal.PageActionInvoker+<InvokeNextPageFilterAsync>d__32, Microsoft.AspNetCore.Mvc.RazorPages]]
00007ffe0bbf1ce8        2          272 System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1+AsyncStateMachineBox`1[[Microsoft.AspNetCore.Mvc.IActionResult, Microsoft.AspNetCore.Mvc.Abstractions],[Microsoft.AspNetCore.Mvc.RazorPages.Internal.ExecutorFactory+NonGenericTaskHandlerMethod+<Execute>d__2, Microsoft.AspNetCore.Mvc.RazorPages]]
00007ffe0b9a3710        2          272 System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1+AsyncStateMachineBox`1[[System.Threading.Tasks.VoidTaskResult, System.Private.CoreLib],[Microsoft.AspNetCore.Server.Kestrel.Core.Internal.ConnectionDispatcher+<Execute>d__6, Microsoft.AspNetCore.Server.Kestrel.Core]]
00007ffe0b9a11d8        2          272 System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1+AsyncStateMachineBox`1[[System.Threading.Tasks.VoidTaskResult, System.Private.CoreLib],[Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpProtocol+<ProcessRequestsAsync>d__187`1[[Microsoft.AspNetCore.Hosting.Internal.HostingApplication+Context, Microsoft.AspNetCore.Hosting]], Microsoft.AspNetCore.Server.Kestrel.Core]]
00007ffe0bbf6378        2          288 System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1+AsyncStateMachineBox`1[[System.Threading.Tasks.VoidTaskResult, System.Private.CoreLib],[Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddleware+<Invoke>d__7, Microsoft.AspNetCore.Diagnostics]]
00007ffe0b9a3170        2          288 System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1+AsyncStateMachineBox`1[[System.Threading.Tasks.VoidTaskResult, System.Private.CoreLib],[Microsoft.AspNetCore.Server.Kestrel.Core.Internal.HttpConnectionMiddleware`1+<OnConnectionAsync>d__6[[Microsoft.AspNetCore.Hosting.Internal.HostingApplication+Context, Microsoft.AspNetCore.Hosting]], Microsoft.AspNetCore.Server.Kestrel.Core]]
00007ffe0b9a6748        2          336 System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1+AsyncStateMachineBox`1[[System.Threading.Tasks.VoidTaskResult, System.Private.CoreLib],[Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.Internal.SocketConnection+<ProcessReceives>d__25, Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets]]
00007ffe0b9a16d8        2          336 System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1+AsyncStateMachineBox`1[[System.Threading.Tasks.VoidTaskResult, System.Private.CoreLib],[Microsoft.AspNetCore.Server.Kestrel.Core.Internal.HttpConnection+<ProcessRequestsAsync>d__47`1[[Microsoft.AspNetCore.Hosting.Internal.HostingApplication+Context, Microsoft.AspNetCore.Hosting]], Microsoft.AspNetCore.Server.Kestrel.Core]]
00007ffe0b9a9328        2          448 System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1+AsyncStateMachineBox`1[[System.Threading.Tasks.VoidTaskResult, System.Private.CoreLib],[Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.Internal.SocketConnection+<ProcessSends>d__27, Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets]]
00007ffe0b9a0cb8        2          464 System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1+AsyncStateMachineBox`1[[System.Threading.Tasks.VoidTaskResult, System.Private.CoreLib],[Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpProtocol+<ProcessRequests>d__188`1[[Microsoft.AspNetCore.Hosting.Internal.HostingApplication+Context, Microsoft.AspNetCore.Hosting]], Microsoft.AspNetCore.Server.Kestrel.Core]]
00007ffe0bbf5d28        2          608 System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1+AsyncStateMachineBox`1[[System.Threading.Tasks.VoidTaskResult, System.Private.CoreLib],[Microsoft.AspNetCore.StaticFiles.StaticFileMiddleware+<Invoke>d__7, Microsoft.AspNetCore.StaticFiles]]
Total 52 objects
In 10 chains.
Graph saved to c:\users\stoub\desktop\test.dgml.

and opening the .dgml file in Visual Studio:
image

cc: @noahfalk, @mikem8361
Fixes https://github.com/dotnet/coreclr/issues/20434

@davidfowl
Copy link
Member

Instead of just showing the state number it would be good to show a textual representation with the number in parenthesis (I know they map to arbitrary code but it's better to show that and it's helpful for the terminal states as well).

@davidfowl
Copy link
Member

Decoding the Task flags would also be amazing:

000002494aa455e0 00007ffe5a0db4b0 72 [02000400] System.Threading.Tasks.UnwrapPromise`1[[System.Threading.Tasks.VoidTaskResult, System.Private.CoreLib]]

@stephentoub
Copy link
Member Author

stephentoub commented Nov 5, 2018

Instead of just showing the state number it would be good to show a textual representation with the number in parenthesis

You're referring to the async method state? Can you give me an example of what you mean by textual representation?

Do you mean actually pull the relevant line of code out of the source file based on the PDB? I'm not planning to do that, but I'd welcome a PR from you that did :)

@stephentoub
Copy link
Member Author

Decoding the Task flags would also be amazing

Yeah... I actually experimented with that, but I lacked a particularly good representation for it, at least in the single-line case, e.g. the

000002494aa455e0 00007ffe5a0db4b0       72 [02000400]  System.Threading.Tasks.UnwrapPromise`1[[System.Threading.Tasks.VoidTaskResult, System.Private.CoreLib]] 

example becomes something like:

000002494aa455e0 00007ffe5a0db4b0       72 [02000400 = InternalTaskOptions.PromiseTask | TASK_STATE_WAITINGFORACTIVATION]  System.Threading.Tasks.UnwrapPromise`1[[System.Threading.Tasks.VoidTaskResult, System.Private.CoreLib]] 

which is long and throws off the column alignment.

Suggestion?

@davidfowl
Copy link
Member

You're referring to the async method state? Can you give me an example of what you mean by textual representation?

I guess there are only 2 states:

Waiting (number)
Failed (-2)
Completed (-2)

Yeah... I actually experimented with that, but I lacked a particularly good representation for it, at least in the single-line case, e.g. the

Maybe we only show the flags that matter to people and the internal flags stay hidden. We can use a single character for each of the states and show that?

What are the relevant states? WaitingForActivation, Completed, Cancelled, what else?

@stephentoub
Copy link
Member Author

stephentoub commented Nov 5, 2018

I guess there are only 2 states:

There are three:

>= 0: the number of the await it's currently waiting at
-1: it's running code
-2: it's done

The -2 case won't show up by default, since it's filtering out completed objects and you'd need to explicitly bring them back in with the -completed option, which I expect most devs won't.

That just leaves -1 vs >= 0, and I don't think it's worth adding a bunch of "Waiting" into the output to differentiate the -1 from the >= 0 case.

@davidfowl
Copy link
Member

That just leaves -1 vs >= 0, and I don't think it's worth adding a bunch of "Waiting" into the output to differentiate the -1 from the >= 0 case.

It does look nicer than seeing a bunch of numbers though.

@stephentoub
Copy link
Member Author

stephentoub commented Nov 5, 2018

What are the relevant states? WaitingForActivation, Completed, Cancelled, what else?

By default if it's showing up in the list, it's not in a completed state (meaning it's not yet transitioned to any of the RanToCompletion/Faulted/Canceled final states)... if it were, we'd have filtered it out.

The list of states are the combination of:

internal const int TASK_STATE_STARTED = 0x10000; //bin: 0000 0000 0000 0001 0000 0000 0000 0000
internal const int TASK_STATE_DELEGATE_INVOKED = 0x20000; //bin: 0000 0000 0000 0010 0000 0000 0000 0000
internal const int TASK_STATE_DISPOSED = 0x40000; //bin: 0000 0000 0000 0100 0000 0000 0000 0000
internal const int TASK_STATE_EXCEPTIONOBSERVEDBYPARENT = 0x80000; //bin: 0000 0000 0000 1000 0000 0000 0000 0000
internal const int TASK_STATE_CANCELLATIONACKNOWLEDGED = 0x100000; //bin: 0000 0000 0001 0000 0000 0000 0000 0000
internal const int TASK_STATE_FAULTED = 0x200000; //bin: 0000 0000 0010 0000 0000 0000 0000 0000
internal const int TASK_STATE_CANCELED = 0x400000; //bin: 0000 0000 0100 0000 0000 0000 0000 0000
internal const int TASK_STATE_WAITING_ON_CHILDREN = 0x800000; //bin: 0000 0000 1000 0000 0000 0000 0000 0000
internal const int TASK_STATE_RAN_TO_COMPLETION = 0x1000000; //bin: 0000 0001 0000 0000 0000 0000 0000 0000
internal const int TASK_STATE_WAITINGFORACTIVATION = 0x2000000; //bin: 0000 0010 0000 0000 0000 0000 0000 0000
internal const int TASK_STATE_COMPLETION_RESERVED = 0x4000000; //bin: 0000 0100 0000 0000 0000 0000 0000 0000
internal const int TASK_STATE_THREAD_WAS_ABORTED = 0x8000000; //bin: 0000 1000 0000 0000 0000 0000 0000 0000
internal const int TASK_STATE_WAIT_COMPLETION_NOTIFICATION = 0x10000000; //bin: 0001 0000 0000 0000 0000 0000 0000 0000
//This could be moved to InternalTaskOptions enum
internal const int TASK_STATE_EXECUTIONCONTEXT_IS_NULL = 0x20000000; //bin: 0010 0000 0000 0000 0000 0000 0000 0000
internal const int TASK_STATE_TASKSCHEDULED_WAS_FIRED = 0x40000000; //bin: 0100 0000 0000 0000 0000 0000 0000 0000

and
public enum TaskCreationOptions
{
/// <summary>
/// Specifies that the default behavior should be used.
/// </summary>
None = 0x0,
/// <summary>
/// A hint to a <see cref="System.Threading.Tasks.TaskScheduler">TaskScheduler</see> to schedule a
/// task in as fair a manner as possible, meaning that tasks scheduled sooner will be more likely to
/// be run sooner, and tasks scheduled later will be more likely to be run later.
/// </summary>
PreferFairness = 0x01,
/// <summary>
/// Specifies that a task will be a long-running, course-grained operation. It provides a hint to the
/// <see cref="System.Threading.Tasks.TaskScheduler">TaskScheduler</see> that oversubscription may be
/// warranted.
/// </summary>
LongRunning = 0x02,
/// <summary>
/// Specifies that a task is attached to a parent in the task hierarchy.
/// </summary>
AttachedToParent = 0x04,
/// <summary>
/// Specifies that an InvalidOperationException will be thrown if an attempt is made to attach a child task to the created task.
/// </summary>
DenyChildAttach = 0x08,
/// <summary>
/// Prevents the ambient scheduler from being seen as the current scheduler in the created task. This means that operations
/// like StartNew or ContinueWith that are performed in the created task will see TaskScheduler.Default as the current scheduler.
/// </summary>
HideScheduler = 0x10,
// 0x20 is already being used in TaskContinuationOptions
/// <summary>
/// Forces continuations added to the current task to be executed asynchronously.
/// This option has precedence over TaskContinuationOptions.ExecuteSynchronously
/// </summary>
RunContinuationsAsynchronously = 0x40
}

and
internal enum InternalTaskOptions
{
/// <summary> Specifies "No internal task options" </summary>
None,
/// <summary>Used to filter out internal vs. public task creation options.</summary>
InternalOptionsMask = 0x0000FF00,
ContinuationTask = 0x0200,
PromiseTask = 0x0400,
/// <summary>
/// Store the presence of TaskContinuationOptions.LazyCancellation, since it does not directly
/// translate into any TaskCreationOptions.
/// </summary>
LazyCancellation = 0x1000,
/// <summary>Specifies that the task will be queued by the runtime before handing it over to the user.
/// This flag will be used to skip the cancellationtoken registration step, which is only meant for unstarted tasks.</summary>
QueuedByRuntime = 0x2000,
/// <summary>
/// Denotes that Dispose should be a complete nop for a Task. Used when constructing tasks that are meant to be cached/reused.
/// </summary>
DoNotDispose = 0x4000
}

@stephentoub
Copy link
Member Author

It does look nicer than seeing a bunch of numbers though.

But you're not asking for the numbers to be replaced, are you? You were suggesting we just add "Waiting" in addition but still show the numbers? So you'd still be "seeing a bunch of numbers" :)

@davidfowl
Copy link
Member

But you're not asking for the numbers to be replaced, are you? You were suggesting we just add "Waiting" in addition but still show the numbers? So you'd still be "seeing a bunch of numbers" :)

Yea, but it's secondary.

@stephentoub
Copy link
Member Author

Yea, but it's secondary.

I'm still trying to understand what value this would add. You're asking for this:

000002494aa461d0 00007ffe0b97dbb8      136          0  Microsoft.AspNetCore.Hosting.WebHostExtensions+<WaitForTokenShutdownAsync>d__7
000002494aa46258 00007ffe0b97e208      144          1  Microsoft.AspNetCore.Hosting.WebHostExtensions+<RunAsync>d__5
000002494aa462e8 00007ffe0b97e7c8      144          1  Microsoft.AspNetCore.Hosting.WebHostExtensions+<RunAsync>d__4
000002494aa47fe8 00007ffe0b9a11d8      136          0  Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpProtocol+<ProcessRequestsAsync>d__187`1[[Microsoft.AspNetCore.Hosting.Internal.HostingApplication+Context, Microsoft.AspNetCore.Hosting]]
000002494aa48070 00007ffe0b9a16d8      168          1  Microsoft.AspNetCore.Server.Kestrel.Core.Internal.HttpConnection+<ProcessRequestsAsync>d__47`1[[Microsoft.AspNetCore.Hosting.Internal.HostingApplication+Context, Microsoft.AspNetCore.Hosting]]
000002494aa484c0 00007ffe0b9a3170      144          0  Microsoft.AspNetCore.Server.Kestrel.Core.Internal.HttpConnectionMiddleware`1+<OnConnectionAsync>d__6[[Microsoft.AspNetCore.Hosting.Internal.HostingApplication+Context, Microsoft.AspNetCore.Hosting]]
000002494aa48550 00007ffe0b9a3710      136          0  Microsoft.AspNetCore.Server.Kestrel.Core.Internal.ConnectionDispatcher+<Execute>d__6
000002494aa48678 00007ffe0b9a6748      168          0  Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.Internal.SocketConnection+<ProcessReceives>d__25
000002494aa48760 00007ffe0b9a6cf8      128          0  Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.Internal.SocketConnection+<DoReceive>d__24
000002494aa487e0 00007ffe0b9a9328      224          0  Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.Internal.SocketConnection+<ProcessSends>d__27
000002494aa488c0 00007ffe0b9aa2d0      128          0  Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.Internal.SocketConnection+<DoSend>d__26
000002494aa48940 00007ffe0b9ab7d8      128          0  Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.Internal.SocketConnection+<StartAsync>d__22
0000024b4a998a70 00007ffe0b9a0cb8      232          1  Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpProtocol+<ProcessRequests>d__188`1[[Microsoft.AspNetCore.Hosting.Internal.HostingApplication+Context, Microsoft.AspNetCore.Hosting]]
0000024b4a998bf0 00007ffe0b9a11d8      136          0  Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpProtocol+<ProcessRequestsAsync>d__187`1[[Microsoft.AspNetCore.Hosting.Internal.HostingApplication+Context, Microsoft.AspNetCore.Hosting]]
0000024b4a998c78 00007ffe0b9a16d8      168          1  Microsoft.AspNetCore.Server.Kestrel.Core.Internal.HttpConnection+<ProcessRequestsAsync>d__47`1[[Microsoft.AspNetCore.Hosting.Internal.HostingApplication+Context, Microsoft.AspNetCore.Hosting]]
0000024b4a999448 00007ffe0b9a3170      144          0  Microsoft.AspNetCore.Server.Kestrel.Core.Internal.HttpConnectionMiddleware`1+<OnConnectionAsync>d__6[[Microsoft.AspNetCore.Hosting.Internal.HostingApplication+Context, Microsoft.AspNetCore.Hosting]]
0000024b4a9994d8 00007ffe0b9a3710      136          0  Microsoft.AspNetCore.Server.Kestrel.Core.Internal.ConnectionDispatcher+<Execute>d__6
0000024b4a999e18 00007ffe0b9a6748      168          0  Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.Internal.SocketConnection+<ProcessReceives>d__25
0000024b4a999f00 00007ffe0b9a6cf8      128          0  Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.Internal.SocketConnection+<DoReceive>d__24
0000024b4a999f80 00007ffe0b9a9328      224          0  Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.Internal.SocketConnection+<ProcessSends>d__27
0000024b4a99a060 00007ffe0b9aa2d0      128          0  Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.Internal.SocketConnection+<DoSend>d__26
0000024b4a99a0e0 00007ffe0b9ab7d8      128          0  Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.Internal.SocketConnection+<StartAsync>d__22
0000024b4a99bed8 00007ffe0b9a0cb8      232          1  Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpProtocol+<ProcessRequests>d__188`1[[Microsoft.AspNetCore.Hosting.Internal.HostingApplication+Context, Microsoft.AspNetCore.Hosting]]
0000024b4a99f8c8 00007ffe0bbf1248      112          0  WebApplication1.Pages.IndexModel+<OnGetAsync>d__0
0000024b4a99f938 00007ffe0bbf1ce8      136          0  Microsoft.AspNetCore.Mvc.RazorPages.Internal.ExecutorFactory+NonGenericTaskHandlerMethod+<Execute>d__2
0000024b4a99f9c0 00007ffe0bbf2450      128          0  Microsoft.AspNetCore.Mvc.RazorPages.Internal.PageActionInvoker+<InvokeHandlerMethodAsync>d__30
0000024b4a99fa40 00007ffe0bbf29f0      136          0  Microsoft.AspNetCore.Mvc.RazorPages.Internal.PageActionInvoker+<InvokeNextPageFilterAsync>d__32
0000024b4a99fac8 00007ffe0bbf3520      120          0  Microsoft.AspNetCore.Mvc.RazorPages.Internal.PageActionInvoker+<InvokeNextPageFilterAwaitedAsync>d__33
0000024b4a99fb40 00007ffe0bbf3bf8      136          0  Microsoft.AspNetCore.Mvc.RazorPages.PageModel+<OnPageHandlerExecutionAsync>d__134
0000024b4a99fbc8 00007ffe0bbf4198      136          0  Microsoft.AspNetCore.Mvc.RazorPages.Internal.PageActionInvoker+<InvokeInnerFilterAsync>d__22
0000024b4a99fc50 00007ffe0bbf4738      136          0  Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker+<InvokeNextResourceFilter>d__23
0000024b4a99fcd8 00007ffe0bbf4cd8      136          0  Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker+<InvokeFilterPipelineAsync>d__18
0000024b4a99fd60 00007ffe0bbf5278      136          0  Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker+<InvokeAsync>d__16
0000024b4a99fde8 00007ffe0bbf5818      136          2  Microsoft.AspNetCore.Builder.RouterMiddleware+<Invoke>d__4
0000024b4a99fe70 00007ffe0bbf5d28      304          5  Microsoft.AspNetCore.StaticFiles.StaticFileMiddleware+<Invoke>d__7
0000024b4a99ffa0 00007ffe0bbf6378      144          0  Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddleware+<Invoke>d__7
0000024b4a9a0030 00007ffe0bbf69a8      136          1  Microsoft.AspNetCore.Server.IISIntegration.IISMiddleware+<Invoke>d__13
0000024c4aafb540 00007ffe0b97d698      120          0  Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.SocketTransport+<RunAcceptLoopAsync>d__16
0000024c4ab5bee8 00007ffe0bbf1248      112          0  WebApplication1.Pages.IndexModel+<OnGetAsync>d__0
0000024c4ab5bf58 00007ffe0bbf1ce8      136          0  Microsoft.AspNetCore.Mvc.RazorPages.Internal.ExecutorFactory+NonGenericTaskHandlerMethod+<Execute>d__2
0000024c4ab5bfe0 00007ffe0bbf2450      128          0  Microsoft.AspNetCore.Mvc.RazorPages.Internal.PageActionInvoker+<InvokeHandlerMethodAsync>d__30
0000024c4ab5c060 00007ffe0bbf29f0      136          0  Microsoft.AspNetCore.Mvc.RazorPages.Internal.PageActionInvoker+<InvokeNextPageFilterAsync>d__32
0000024c4ab5c0e8 00007ffe0bbf3520      120          0  Microsoft.AspNetCore.Mvc.RazorPages.Internal.PageActionInvoker+<InvokeNextPageFilterAwaitedAsync>d__33
0000024c4ab5c160 00007ffe0bbf3bf8      136          0  Microsoft.AspNetCore.Mvc.RazorPages.PageModel+<OnPageHandlerExecutionAsync>d__134
0000024c4ab5c1e8 00007ffe0bbf4198      136          0  Microsoft.AspNetCore.Mvc.RazorPages.Internal.PageActionInvoker+<InvokeInnerFilterAsync>d__22
0000024c4ab5c270 00007ffe0bbf4738      136          0  Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker+<InvokeNextResourceFilter>d__23
0000024c4ab5c2f8 00007ffe0bbf4cd8      136          0  Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker+<InvokeFilterPipelineAsync>d__18
0000024c4ab5c380 00007ffe0bbf5278      136          0  Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker+<InvokeAsync>d__16
0000024c4ab5c408 00007ffe0bbf5818      136          2  Microsoft.AspNetCore.Builder.RouterMiddleware+<Invoke>d__4
0000024c4ab5c490 00007ffe0bbf5d28      304          5  Microsoft.AspNetCore.StaticFiles.StaticFileMiddleware+<Invoke>d__7
0000024c4ab5c5c0 00007ffe0bbf6378      144          0  Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddleware+<Invoke>d__7
0000024c4ab5c650 00007ffe0bbf69a8      136          1  Microsoft.AspNetCore.Server.IISIntegration.IISMiddleware+<Invoke>d__13

to instead be:

000002494aa461d0 00007ffe0b97dbb8      136  Waiting 0  Microsoft.AspNetCore.Hosting.WebHostExtensions+<WaitForTokenShutdownAsync>d__7
000002494aa46258 00007ffe0b97e208      144  Waiting 1  Microsoft.AspNetCore.Hosting.WebHostExtensions+<RunAsync>d__5
000002494aa462e8 00007ffe0b97e7c8      144  Waiting 1  Microsoft.AspNetCore.Hosting.WebHostExtensions+<RunAsync>d__4
000002494aa47fe8 00007ffe0b9a11d8      136  Waiting 0  Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpProtocol+<ProcessRequestsAsync>d__187`1[[Microsoft.AspNetCore.Hosting.Internal.HostingApplication+Context, Microsoft.AspNetCore.Hosting]]
000002494aa48070 00007ffe0b9a16d8      168  Waiting 1  Microsoft.AspNetCore.Server.Kestrel.Core.Internal.HttpConnection+<ProcessRequestsAsync>d__47`1[[Microsoft.AspNetCore.Hosting.Internal.HostingApplication+Context, Microsoft.AspNetCore.Hosting]]
000002494aa484c0 00007ffe0b9a3170      144  Waiting 0  Microsoft.AspNetCore.Server.Kestrel.Core.Internal.HttpConnectionMiddleware`1+<OnConnectionAsync>d__6[[Microsoft.AspNetCore.Hosting.Internal.HostingApplication+Context, Microsoft.AspNetCore.Hosting]]
000002494aa48550 00007ffe0b9a3710      136  Waiting 0  Microsoft.AspNetCore.Server.Kestrel.Core.Internal.ConnectionDispatcher+<Execute>d__6
000002494aa48678 00007ffe0b9a6748      168  Waiting 0  Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.Internal.SocketConnection+<ProcessReceives>d__25
000002494aa48760 00007ffe0b9a6cf8      128  Waiting 0  Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.Internal.SocketConnection+<DoReceive>d__24
000002494aa487e0 00007ffe0b9a9328      224  Waiting 0  Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.Internal.SocketConnection+<ProcessSends>d__27
000002494aa488c0 00007ffe0b9aa2d0      128  Waiting 0  Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.Internal.SocketConnection+<DoSend>d__26
000002494aa48940 00007ffe0b9ab7d8      128  Waiting 0  Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.Internal.SocketConnection+<StartAsync>d__22
0000024b4a998a70 00007ffe0b9a0cb8      232  Waiting 1  Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpProtocol+<ProcessRequests>d__188`1[[Microsoft.AspNetCore.Hosting.Internal.HostingApplication+Context, Microsoft.AspNetCore.Hosting]]
0000024b4a998bf0 00007ffe0b9a11d8      136  Waiting 0  Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpProtocol+<ProcessRequestsAsync>d__187`1[[Microsoft.AspNetCore.Hosting.Internal.HostingApplication+Context, Microsoft.AspNetCore.Hosting]]
0000024b4a998c78 00007ffe0b9a16d8      168  Waiting 1  Microsoft.AspNetCore.Server.Kestrel.Core.Internal.HttpConnection+<ProcessRequestsAsync>d__47`1[[Microsoft.AspNetCore.Hosting.Internal.HostingApplication+Context, Microsoft.AspNetCore.Hosting]]
0000024b4a999448 00007ffe0b9a3170      144  Waiting 0  Microsoft.AspNetCore.Server.Kestrel.Core.Internal.HttpConnectionMiddleware`1+<OnConnectionAsync>d__6[[Microsoft.AspNetCore.Hosting.Internal.HostingApplication+Context, Microsoft.AspNetCore.Hosting]]
0000024b4a9994d8 00007ffe0b9a3710      136  Waiting 0  Microsoft.AspNetCore.Server.Kestrel.Core.Internal.ConnectionDispatcher+<Execute>d__6
0000024b4a999e18 00007ffe0b9a6748      168  Waiting 0  Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.Internal.SocketConnection+<ProcessReceives>d__25
0000024b4a999f00 00007ffe0b9a6cf8      128  Waiting 0  Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.Internal.SocketConnection+<DoReceive>d__24
0000024b4a999f80 00007ffe0b9a9328      224  Waiting 0  Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.Internal.SocketConnection+<ProcessSends>d__27
0000024b4a99a060 00007ffe0b9aa2d0      128  Waiting 0  Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.Internal.SocketConnection+<DoSend>d__26
0000024b4a99a0e0 00007ffe0b9ab7d8      128  Waiting 0  Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.Internal.SocketConnection+<StartAsync>d__22
0000024b4a99bed8 00007ffe0b9a0cb8      232  Waiting 1  Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpProtocol+<ProcessRequests>d__188`1[[Microsoft.AspNetCore.Hosting.Internal.HostingApplication+Context, Microsoft.AspNetCore.Hosting]]
0000024b4a99f8c8 00007ffe0bbf1248      112  Waiting 0  WebApplication1.Pages.IndexModel+<OnGetAsync>d__0
0000024b4a99f938 00007ffe0bbf1ce8      136  Waiting 0  Microsoft.AspNetCore.Mvc.RazorPages.Internal.ExecutorFactory+NonGenericTaskHandlerMethod+<Execute>d__2
0000024b4a99f9c0 00007ffe0bbf2450      128  Waiting 0  Microsoft.AspNetCore.Mvc.RazorPages.Internal.PageActionInvoker+<InvokeHandlerMethodAsync>d__30
0000024b4a99fa40 00007ffe0bbf29f0      136  Waiting 0  Microsoft.AspNetCore.Mvc.RazorPages.Internal.PageActionInvoker+<InvokeNextPageFilterAsync>d__32
0000024b4a99fac8 00007ffe0bbf3520      120  Waiting 0  Microsoft.AspNetCore.Mvc.RazorPages.Internal.PageActionInvoker+<InvokeNextPageFilterAwaitedAsync>d__33
0000024b4a99fb40 00007ffe0bbf3bf8      136  Waiting 0  Microsoft.AspNetCore.Mvc.RazorPages.PageModel+<OnPageHandlerExecutionAsync>d__134
0000024b4a99fbc8 00007ffe0bbf4198      136  Waiting 0  Microsoft.AspNetCore.Mvc.RazorPages.Internal.PageActionInvoker+<InvokeInnerFilterAsync>d__22
0000024b4a99fc50 00007ffe0bbf4738      136  Waiting 0  Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker+<InvokeNextResourceFilter>d__23
0000024b4a99fcd8 00007ffe0bbf4cd8      136  Waiting 0  Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker+<InvokeFilterPipelineAsync>d__18
0000024b4a99fd60 00007ffe0bbf5278      136  Waiting 0  Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker+<InvokeAsync>d__16
0000024b4a99fde8 00007ffe0bbf5818      136  Waiting 2  Microsoft.AspNetCore.Builder.RouterMiddleware+<Invoke>d__4
0000024b4a99fe70 00007ffe0bbf5d28      304  Waiting 5  Microsoft.AspNetCore.StaticFiles.StaticFileMiddleware+<Invoke>d__7
0000024b4a99ffa0 00007ffe0bbf6378      144  Waiting 0  Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddleware+<Invoke>d__7
0000024b4a9a0030 00007ffe0bbf69a8      136  Waiting 1  Microsoft.AspNetCore.Server.IISIntegration.IISMiddleware+<Invoke>d__13
0000024c4aafb540 00007ffe0b97d698      120  Waiting 0  Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.SocketTransport+<RunAcceptLoopAsync>d__16
0000024c4ab5bee8 00007ffe0bbf1248      112  Waiting 0  WebApplication1.Pages.IndexModel+<OnGetAsync>d__0
0000024c4ab5bf58 00007ffe0bbf1ce8      136  Waiting 0  Microsoft.AspNetCore.Mvc.RazorPages.Internal.ExecutorFactory+NonGenericTaskHandlerMethod+<Execute>d__2
0000024c4ab5bfe0 00007ffe0bbf2450      128  Waiting 0  Microsoft.AspNetCore.Mvc.RazorPages.Internal.PageActionInvoker+<InvokeHandlerMethodAsync>d__30
0000024c4ab5c060 00007ffe0bbf29f0      136  Waiting 0  Microsoft.AspNetCore.Mvc.RazorPages.Internal.PageActionInvoker+<InvokeNextPageFilterAsync>d__32
0000024c4ab5c0e8 00007ffe0bbf3520      120  Waiting 0  Microsoft.AspNetCore.Mvc.RazorPages.Internal.PageActionInvoker+<InvokeNextPageFilterAwaitedAsync>d__33
0000024c4ab5c160 00007ffe0bbf3bf8      136  Waiting 0  Microsoft.AspNetCore.Mvc.RazorPages.PageModel+<OnPageHandlerExecutionAsync>d__134
0000024c4ab5c1e8 00007ffe0bbf4198      136  Waiting 0  Microsoft.AspNetCore.Mvc.RazorPages.Internal.PageActionInvoker+<InvokeInnerFilterAsync>d__22
0000024c4ab5c270 00007ffe0bbf4738      136  Waiting 0  Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker+<InvokeNextResourceFilter>d__23
0000024c4ab5c2f8 00007ffe0bbf4cd8      136  Waiting 0  Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker+<InvokeFilterPipelineAsync>d__18
0000024c4ab5c380 00007ffe0bbf5278      136  Waiting 0  Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker+<InvokeAsync>d__16
0000024c4ab5c408 00007ffe0bbf5818      136  Waiting 2  Microsoft.AspNetCore.Builder.RouterMiddleware+<Invoke>d__4
0000024c4ab5c490 00007ffe0bbf5d28      304  Waiting 5  Microsoft.AspNetCore.StaticFiles.StaticFileMiddleware+<Invoke>d__7
0000024c4ab5c5c0 00007ffe0bbf6378      144  Waiting 0  Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddleware+<Invoke>d__7
0000024c4ab5c650 00007ffe0bbf69a8      136  Waiting 1  Microsoft.AspNetCore.Server.IISIntegration.IISMiddleware+<Invoke>d__13

just adding repetitive text? What does that help?

@davidfowl
Copy link
Member

When you add the -completed flag it wouldn't be repeated anymore right?

@stephentoub
Copy link
Member Author

When you add the -completed flag it wouldn't be repeated anymore right?

Any that hadn't yet been GC'd would be added to the list and they wouldn't have Waiting (they'd have a negative number).

Is your desire just to visually separate completed from non-completed when the -complete flag is there, beyond having a negative value? Would a "*" meaning completed be sufficient? Adding all this "Waiting" text just looks like a lot of noise to me.

@stephentoub
Copy link
Member Author

stephentoub commented Nov 6, 2018

What if we we boiled states down to:

  • Pending
  • Success
  • Failed
  • Canceled

and we only showed any of them when you use -completed, since otherwise they're all pending?

@davidfowl
Copy link
Member

That sounds like a good compromise. Do you think the number is immediately useful?

@stephentoub
Copy link
Member Author

stephentoub commented Nov 6, 2018

Do you think the number is immediately useful?

Yes. It tells you where it's waiting. In my experience it's one of the more useful pieces of information here.

Or did you mean for non-async method tasks? It's not as useful there.

@stephentoub
Copy link
Member Author

@davidfowl, I've addressed the request in the following way (locally... will push shortly)...

By default, since only non-completed objects are shown, we don't show any English version of status (i.e. nothing's changed here):

0:019> !dumpasync -tasks
Statistics:
              MT    Count    TotalSize Class Name
00007fff4204c988        2          128 System.Threading.Tasks.Task
Total 2 objects
         Address               MT     Size      State Description
0000023a341238f0 00007fff4204c988       64 [00032008] System.Threading.Tasks.Task (ConsoleApp66.Program.Sleeps()) 
0000023a34123e50 00007fff4204c988       64 [00032008] System.Threading.Tasks.Task (ConsoleApp66.Program.Sleeps()) 

If you bring in -completed, then it includes the English summary of Success/Failed/Canceled/Pending in the summary line:

0:019> !dumpasync -tasks -completed
Statistics:
              MT    Count    TotalSize Class Name
00007fff4204f3c8        2          144 System.Threading.Tasks.UnwrapPromise`1[[System.Threading.Tasks.VoidTaskResult, System.Private.CoreLib]]
00007fff4204ec70        2          144 System.Threading.Tasks.Task`1[[System.Threading.Tasks.Task, System.Private.CoreLib]]
00007fff4204c988       19         1216 System.Threading.Tasks.Task
Total 23 objects
         Address               MT     Size   Status      State Description
0000023a34122a80 00007fff4204ec70       72   Failed [00232008] System.Threading.Tasks.Task`1[[System.Threading.Tasks.Task, System.Private.CoreLib]] 
0000023a34122c58 00007fff4204c988       64  Success [01004000] System.Threading.Tasks.Task 
0000023a34123610 00007fff4204f3c8       72   Failed [06200400] System.Threading.Tasks.UnwrapPromise`1[[System.Threading.Tasks.VoidTaskResult, System.Private.CoreLib]] 
0000023a341237a0 00007fff4204c988       64 Canceled [00432000] System.Threading.Tasks.Task 
0000023a34123870 00007fff4204c988       64  Success [01032008] System.Threading.Tasks.Task 
0000023a341238f0 00007fff4204c988       64  Pending [00032008] System.Threading.Tasks.Task (ConsoleApp66.Program.Sleeps()) 
0000023a34123970 00007fff4204c988       64  Success [01032008] System.Threading.Tasks.Task 
0000023a341239f0 00007fff4204c988       64  Success [01032008] System.Threading.Tasks.Task 
0000023a34123a70 00007fff4204c988       64  Success [01032008] System.Threading.Tasks.Task 
0000023a34123af0 00007fff4204c988       64  Success [01032008] System.Threading.Tasks.Task 
0000023a34123b70 00007fff4204c988       64  Success [01032008] System.Threading.Tasks.Task 
0000023a34123bf0 00007fff4204c988       64  Success [01032008] System.Threading.Tasks.Task 
0000023a34123c30 00007fff4204ec70       72   Failed [00232008] System.Threading.Tasks.Task`1[[System.Threading.Tasks.Task, System.Private.CoreLib]] 
0000023a34123c78 00007fff4204f3c8       72   Failed [06200400] System.Threading.Tasks.UnwrapPromise`1[[System.Threading.Tasks.VoidTaskResult, System.Private.CoreLib]] 
0000023a34123d00 00007fff4204c988       64 Canceled [00432000] System.Threading.Tasks.Task 
0000023a34123dd0 00007fff4204c988       64  Success [01032008] System.Threading.Tasks.Task 
0000023a34123e50 00007fff4204c988       64  Pending [00032008] System.Threading.Tasks.Task (ConsoleApp66.Program.Sleeps()) 
0000023a34123ed0 00007fff4204c988       64  Success [01032008] System.Threading.Tasks.Task 
0000023a34123f50 00007fff4204c988       64  Success [01032008] System.Threading.Tasks.Task 
0000023a34127fe8 00007fff4204c988       64  Success [01032008] System.Threading.Tasks.Task 
0000023a34128068 00007fff4204c988       64  Success [01032008] System.Threading.Tasks.Task 
0000023a341280e8 00007fff4204c988       64  Success [01032008] System.Threading.Tasks.Task 
0000023a34128168 00007fff4204c988       64  Success [01032008] System.Threading.Tasks.Task

If you then also ask to see -fields, whereas for async methods we show the builder, for other tasks we show the state flags decoded:

0:019> !dumpasync -tasks -completed -fields
Statistics:
              MT    Count    TotalSize Class Name
00007fff4204f3c8        2          144 System.Threading.Tasks.UnwrapPromise`1[[System.Threading.Tasks.VoidTaskResult, System.Private.CoreLib]]
00007fff4204ec70        2          144 System.Threading.Tasks.Task`1[[System.Threading.Tasks.Task, System.Private.CoreLib]]
00007fff4204c988       19         1216 System.Threading.Tasks.Task
Total 23 objects
         Address               MT     Size   Status      State Description
0000023a34122a80 00007fff4204ec70       72   Failed [00232008] System.Threading.Tasks.Task`1[[System.Threading.Tasks.Task, System.Private.CoreLib]] 
State Flags: DenyChildAttach QueuedByRuntime STARTED DELEGATE_INVOKED FAULTED 
--------------------------------------------------------------------------------
0000023a34122c58 00007fff4204c988       64  Success [01004000] System.Threading.Tasks.Task 
State Flags: DoNotDispose RAN_TO_COMPLETION 
--------------------------------------------------------------------------------
0000023a34123610 00007fff4204f3c8       72   Failed [06200400] System.Threading.Tasks.UnwrapPromise`1[[System.Threading.Tasks.VoidTaskResult, System.Private.CoreLib]] 
State Flags: PromiseTask FAULTED WAITINGFORACTIVATION COMPLETION_RESERVED 
--------------------------------------------------------------------------------
0000023a341237a0 00007fff4204c988       64 Canceled [00432000] System.Threading.Tasks.Task 
State Flags: QueuedByRuntime STARTED DELEGATE_INVOKED CANCELED 
...

- Add a stats summary at the beginning of the output
- Improved single-line-per-entry default behavior for increased readability
- Add option to include all tasks, not just async state machine objects
- Include state value for each async object, the state field for async state machines or the state flags for other tasks
- Support following continuation chains, rendered as "async stacks"
- Support resolving delegate names so that Task.Run and related items have the associated method name displayed
- Optional (experimental) DGML rendering of the graph
- Optionally include completed tasks, by default filtering them out
- Optionally display the fields of state machines
@stephentoub
Copy link
Member Author

@dotnet-bot test this please

@stephentoub
Copy link
Member Author

Something seems to be wrong with the PR, getting very strange infrastructures issues. Going to close the PR and open a replacement.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants