Created attachment 274968 [details] [IMAGE] Call Tree with "bound" clutter * SUMMARY Improve handling of Bound functions in samples. Currently bound functions show up in the sample twice. The "[N] bound foo" and its immediate call to "[ƒ] foo". Ending up with: [ƒ] doStuff [N] bound foo [ƒ] foo [N] bound foo [ƒ] foo Note we do not show these bound functions in our call stack. If we were paused in the inner foo here we would have a call stack like: [ƒ] foo [ƒ] foo [ƒ] doStuff So the profile here could be: [ƒ] doStuff [ƒ] foo [ƒ] foo Or: [ƒ] doStuff [ƒ] bound foo [ƒ] bound foo Removing a bunch of extra, unnecessary duplication in the call tree. * TEST <script> setInterval(function() { // anonymous (function foo() { // bound foo => foo var until = Date.now() + 2; while (Date.now() <= until); console.log(Date.now()); }).bind(null)() }, 1000); </script>
<rdar://problem/25371989>