{"id":6553,"date":"2024-08-20T14:14:24","date_gmt":"2024-08-20T21:14:24","guid":{"rendered":"https:\/\/devblogs.microsoft.com\/pix\/?p=6553"},"modified":"2024-09-12T14:51:23","modified_gmt":"2024-09-12T21:51:23","slug":"multi-process-profiling-support-in-timing-captures","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/pix\/multi-process-profiling-support-in-timing-captures\/","title":{"rendered":"Multi-process profiling support in Timing Captures"},"content":{"rendered":"<p>Starting with the <a href=\"https:\/\/devblogs.microsoft.com\/pix\/pix-2408-05\/\">2408.05 release of PIX on Windows<\/a>, performance data from multiple processes can be analyzed with a single <a href=\"https:\/\/devblogs.microsoft.com\/pix\/timing-captures-new\/\">Timing Capture<\/a>.\u00a0 The ability to analyze multiple processes simultaneously is useful in scenarios where multiple copies of a game server are running on the same machine, for example.<\/p>\n<p>PIX will capture data from all running processes on a machine when a Timing Capture is taken.\u00a0 However, callstacks are only captured for the title process that you started, or attached to, from the PIX UI.\u00a0 In multi-process scenarios, you&#8217;ll want to check the <strong>Callstacks for non-title processes<\/strong> checkbox before starting a capture.<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/pix\/wp-content\/uploads\/sites\/41\/2024\/08\/winpix_multi_proc_capture_options.png\"><img decoding=\"async\" class=\"alignnone size-full wp-image-6557\" src=\"https:\/\/devblogs.microsoft.com\/pix\/wp-content\/uploads\/sites\/41\/2024\/08\/winpix_multi_proc_capture_options.png\" alt=\"Image winpix multi proc capture options\" width=\"376\" height=\"672\" srcset=\"https:\/\/devblogs.microsoft.com\/pix\/wp-content\/uploads\/sites\/41\/2024\/08\/winpix_multi_proc_capture_options.png 376w, https:\/\/devblogs.microsoft.com\/pix\/wp-content\/uploads\/sites\/41\/2024\/08\/winpix_multi_proc_capture_options-168x300.png 168w\" sizes=\"(max-width: 376px) 100vw, 376px\" \/><\/a><\/p>\n<p>By default, the performance data from the title you started, or attached to, from the PIX UI will be displayed in the Timing Capture.\u00a0 Access the <strong>Manage Visible Processes<\/strong> dropdown from the gears icon in the upper right corner of the PIX UI to specify additional processes for which to view performance data.<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/pix\/wp-content\/uploads\/sites\/41\/2024\/08\/winpix_multi_proc_capture_manage_visible_processes.png\"><img decoding=\"async\" class=\"alignnone size-full wp-image-6563\" src=\"https:\/\/devblogs.microsoft.com\/pix\/wp-content\/uploads\/sites\/41\/2024\/08\/winpix_multi_proc_capture_manage_visible_processes.png\" alt=\"Image winpix multi proc capture manage visible processes\" width=\"605\" height=\"332\" srcset=\"https:\/\/devblogs.microsoft.com\/pix\/wp-content\/uploads\/sites\/41\/2024\/08\/winpix_multi_proc_capture_manage_visible_processes.png 605w, https:\/\/devblogs.microsoft.com\/pix\/wp-content\/uploads\/sites\/41\/2024\/08\/winpix_multi_proc_capture_manage_visible_processes-300x165.png 300w\" sizes=\"(max-width: 605px) 100vw, 605px\" \/><\/a><\/p>\n<p>When performance data from multiple processes is viewed, PIX appends the name of the executable and the process ID in all places where information about CPU threads is shown.\u00a0 For example, the following figure shows a thread named AP1 from two different processes in the Timeline.<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/pix\/wp-content\/uploads\/sites\/41\/2024\/08\/winpix_multi_proc_capture_timeline.png\"><img decoding=\"async\" class=\"alignnone size-full wp-image-6564\" src=\"https:\/\/devblogs.microsoft.com\/pix\/wp-content\/uploads\/sites\/41\/2024\/08\/winpix_multi_proc_capture_timeline.png\" alt=\"Image winpix multi proc capture timeline\" width=\"617\" height=\"227\" srcset=\"https:\/\/devblogs.microsoft.com\/pix\/wp-content\/uploads\/sites\/41\/2024\/08\/winpix_multi_proc_capture_timeline.png 617w, https:\/\/devblogs.microsoft.com\/pix\/wp-content\/uploads\/sites\/41\/2024\/08\/winpix_multi_proc_capture_timeline-300x110.png 300w\" sizes=\"(max-width: 617px) 100vw, 617px\" \/><\/a><\/p>\n<p>You&#8217;ll see the executable name and process ID in various places in the other views as well, including the Range Details and Element Details view.<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/pix\/wp-content\/uploads\/sites\/41\/2024\/08\/winpix_multi_proc_capture_range_details.png\"><img decoding=\"async\" class=\"alignnone size-full wp-image-6568\" src=\"https:\/\/devblogs.microsoft.com\/pix\/wp-content\/uploads\/sites\/41\/2024\/08\/winpix_multi_proc_capture_range_details.png\" alt=\"Image winpix multi proc capture range details\" width=\"1226\" height=\"342\" srcset=\"https:\/\/devblogs.microsoft.com\/pix\/wp-content\/uploads\/sites\/41\/2024\/08\/winpix_multi_proc_capture_range_details.png 1226w, https:\/\/devblogs.microsoft.com\/pix\/wp-content\/uploads\/sites\/41\/2024\/08\/winpix_multi_proc_capture_range_details-300x84.png 300w, https:\/\/devblogs.microsoft.com\/pix\/wp-content\/uploads\/sites\/41\/2024\/08\/winpix_multi_proc_capture_range_details-1024x286.png 1024w, https:\/\/devblogs.microsoft.com\/pix\/wp-content\/uploads\/sites\/41\/2024\/08\/winpix_multi_proc_capture_range_details-768x214.png 768w\" sizes=\"(max-width: 1226px) 100vw, 1226px\" \/><\/a><\/p>\n<p>There are a few things to keep in mind when viewing data from multiple processes in the Range Details view.\u00a0 First, memory allocations are only captured for the game you launched or attached to, not for all processes.\u00a0 The volume of memory data, especially for heap allocations, makes it impractical to capture for all processes.\u00a0 Second, file io data is not filtered by process at all.<\/p>\n<p>Finally, when viewing <strong>Sampled Functions<\/strong> data, use the <strong>Group By<\/strong> dropdown in the <strong>Display Options<\/strong> panel to group the stack trees by <strong>Threads<\/strong>, <strong>Cores<\/strong>, or<strong> Cores and Threads<\/strong>.\u00a0 Without this grouping, you&#8217;ll likely see the same stack tree displayed multiple times, with no indication of which process it came from.<\/p>\n<p>&nbsp;<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/pix\/wp-content\/uploads\/sites\/41\/2024\/08\/winpix_multi_proc_capture_sampled_functions.png\"><img decoding=\"async\" class=\"alignnone size-full wp-image-6565\" src=\"https:\/\/devblogs.microsoft.com\/pix\/wp-content\/uploads\/sites\/41\/2024\/08\/winpix_multi_proc_capture_sampled_functions.png\" alt=\"Image winpix multi proc capture sampled functions\" width=\"741\" height=\"357\" srcset=\"https:\/\/devblogs.microsoft.com\/pix\/wp-content\/uploads\/sites\/41\/2024\/08\/winpix_multi_proc_capture_sampled_functions.png 741w, https:\/\/devblogs.microsoft.com\/pix\/wp-content\/uploads\/sites\/41\/2024\/08\/winpix_multi_proc_capture_sampled_functions-300x145.png 300w\" sizes=\"(max-width: 741px) 100vw, 741px\" \/><\/a><\/p>\n<p>The tree in the Metrics selector panel in both the Metrics layout and the Comparison layout is partitioned by process as well.<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/pix\/wp-content\/uploads\/sites\/41\/2024\/08\/winpix_multi_proc_capture_metrics_selector.png\"><img decoding=\"async\" class=\"alignnone size-full wp-image-6577\" src=\"https:\/\/devblogs.microsoft.com\/pix\/wp-content\/uploads\/sites\/41\/2024\/08\/winpix_multi_proc_capture_metrics_selector.png\" alt=\"Image winpix multi proc capture metrics selector\" width=\"434\" height=\"972\" srcset=\"https:\/\/devblogs.microsoft.com\/pix\/wp-content\/uploads\/sites\/41\/2024\/08\/winpix_multi_proc_capture_metrics_selector.png 434w, https:\/\/devblogs.microsoft.com\/pix\/wp-content\/uploads\/sites\/41\/2024\/08\/winpix_multi_proc_capture_metrics_selector-134x300.png 134w\" sizes=\"(max-width: 434px) 100vw, 434px\" \/><\/a><\/p>\n<p>As always, please continue sending us feature requests and bug reports using the PIX Feedback button in the upper right corner of the UI.<\/p>\n<p>Thanks,<\/p>\n<p>Steven.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Starting with the 2408.05 release of PIX on Windows, performance data from multiple processes can be analyzed with a single Timing Capture.\u00a0 The ability to analyze multiple processes simultaneously is useful in scenarios where multiple copies of a game server are running on the same machine, for example. PIX will capture data from all running [&hellip;]<\/p>\n","protected":false},"author":1915,"featured_media":6564,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1],"tags":[],"class_list":["post-6553","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-pix"],"acf":[],"blog_post_summary":"<p>Starting with the 2408.05 release of PIX on Windows, performance data from multiple processes can be analyzed with a single Timing Capture.\u00a0 The ability to analyze multiple processes simultaneously is useful in scenarios where multiple copies of a game server are running on the same machine, for example. PIX will capture data from all running [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/pix\/wp-json\/wp\/v2\/posts\/6553","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/pix\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/pix\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/pix\/wp-json\/wp\/v2\/users\/1915"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/pix\/wp-json\/wp\/v2\/comments?post=6553"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/pix\/wp-json\/wp\/v2\/posts\/6553\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/pix\/wp-json\/wp\/v2\/media\/6564"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/pix\/wp-json\/wp\/v2\/media?parent=6553"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/pix\/wp-json\/wp\/v2\/categories?post=6553"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/pix\/wp-json\/wp\/v2\/tags?post=6553"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}