{"id":1885,"date":"2016-11-22T21:39:41","date_gmt":"2016-11-22T21:39:41","guid":{"rendered":"https:\/\/blogs.msdn.microsoft.com\/pix\/?page_id=1885"},"modified":"2016-11-22T21:39:41","modified_gmt":"2016-11-22T21:39:41","slug":"the-butterfly-view-in-function-summary-and-callgraph-captures","status":"publish","type":"page","link":"https:\/\/devblogs.microsoft.com\/pix\/the-butterfly-view-in-function-summary-and-callgraph-captures\/","title":{"rendered":"The Butterfly View in Function Summary and Callgraph Captures"},"content":{"rendered":"<p><span style=\"color: #000000;font-family: Calibri\">The default layouts for <a href=\"https:\/\/blogs.msdn.microsoft.com\/pix\/function-summary-captures\/\">Function Summary<\/a> and <a href=\"https:\/\/devblogs.microsoft.com\/pix\/callgraph-captures\/\">Callgraph<\/a> captures include a Butterfly View.<\/span><span><span style=\"color: #000000;font-family: Calibri\">\u00a0 <\/span><\/span><span style=\"color: #000000;font-family: Calibri\">The Butterfly View shows you the callers and callees for the function that is currently selected in the main events list.<\/span><\/p>\n<p><span style=\"color: #000000;font-family: Calibri\">The selected function is shown in the middle of the Butterfly View.<\/span><span><span style=\"color: #000000;font-family: Calibri\">\u00a0 <\/span><\/span><span style=\"color: #000000;font-family: Calibri\">Tables on the top and bottom of the view show the callers and callees, respectively.\u00a0 The following figure shows the contents of the Butterfly View when PhysicsEngine::BuildIslands is selected in the main event list.<\/span><\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/41\/2019\/03\/butterflw_view.jpg\"><img decoding=\"async\" width=\"1540\" height=\"613\" class=\"alignnone size-full wp-image-1905\" alt=\"butterflw_view\" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/41\/2019\/03\/butterflw_view.jpg\" \/><\/a><\/p>\n<p><span style=\"color: #000000;font-family: Calibri\">Double clicking on any row in the Butterfly View will cause the data in the view to be centered around that function.<\/span><span><span style=\"color: #000000;font-family: Calibri\">\u00a0 <\/span><\/span><span style=\"color: #000000;font-family: Calibri\">The function you double clicked on will become the center row and it\u2019s callers and callees will be displayed above and below it.<\/span><span><span style=\"color: #000000;font-family: Calibri\">\u00a0 <\/span><\/span><span style=\"color: #000000;font-family: Calibri\">Double clicking on any row in the butterfly view will also select that function in the main event list.<\/span><span><span style=\"color: #000000;font-family: Calibri\">\u00a0 <\/span><\/span><span style=\"color: #000000;font-family: Calibri\">If the function ran on multiple threads and\/or cores, multiple rows in the event list will be selected: one for each combination of thread and core.<\/span><\/p>\n<p><span style=\"color: #000000;font-family: Calibri\">The counters shown in the Butterfly View are the Inclusive and Exclusive Duration percentages and the call counts for each function.<\/span><span><span style=\"color: #000000;font-family: Calibri\">\u00a0 <\/span><\/span><span style=\"color: #000000;font-family: Calibri\">The data is aggregated across cores and across the entire duration of the callgraph capture. Values greater than 100 percent are common and indicate that a function is in use by more than one core. Inclusive duration can theoretically be as high as 100% multiplied by the number of cores on your PC.<\/span><span><span style=\"color: #000000;font-family: Calibri\">\u00a0 <\/span><\/span><span style=\"color: #000000;font-family: Calibri\">However, a more realistic example would be a function that has an inclusive percentage of 20 for one core, and 90 for another core, so the butterfly view would show 110%. <\/span><\/p>\n<p><span style=\"color: #000000;font-family: Calibri\"> Calling functions and called functions are also aggregated across the capture. So if a function calls both GetInt() and GetFloat() at some point during the capture, but not in the same call tree, both GetInt() and GetFloat() will appear as called functions.<\/span><\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The default layouts for Function Summary and Callgraph captures include a Butterfly View.\u00a0 The Butterfly View shows you the callers and callees for the function that is currently selected in the main events list. The selected function is shown in the middle of the Butterfly View.\u00a0 Tables on the top and bottom of the view [&hellip;]<\/p>\n","protected":false},"author":1719,"featured_media":4769,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_acf_changed":false,"footnotes":""},"class_list":["post-1885","page","type-page","status-publish","has-post-thumbnail","hentry"],"acf":[],"_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/pix\/wp-json\/wp\/v2\/pages\/1885","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/pix\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/pix\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/pix\/wp-json\/wp\/v2\/users\/1719"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/pix\/wp-json\/wp\/v2\/comments?post=1885"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/pix\/wp-json\/wp\/v2\/pages\/1885\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/pix\/wp-json\/wp\/v2\/media\/4769"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/pix\/wp-json\/wp\/v2\/media?parent=1885"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}