[Webkit-unassigned] [Bug 155916] New: Web Inspector: Improve handling of Bound functions in samples

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Mar 25 20:26:59 PDT 2016


https://bugs.webkit.org/show_bug.cgi?id=155916

            Bug ID: 155916
           Summary: Web Inspector: Improve handling of Bound functions in
                    samples
    Classification: Unclassified
           Product: WebKit
           Version: WebKit Nightly Build
          Hardware: All
                OS: All
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: Web Inspector
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: joepeck at webkit.org
                CC: bburg at apple.com, graouts at webkit.org,
                    joepeck at webkit.org, mattbaker at apple.com,
                    nvasilyev at apple.com, sbarati at apple.com,
                    timothy at apple.com, webkit-bug-importer at group.apple.com

Created attachment 274968
  --> https://bugs.webkit.org/attachment.cgi?id=274968&action=review
[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>

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-unassigned/attachments/20160326/83681050/attachment.html>


More information about the webkit-unassigned mailing list