Changeset 163140 in webkit


Ignore:
Timestamp:
Jan 30, 2014 5:34:54 PM (10 years ago)
Author:
timothy@apple.com
Message:

Add column number and call timing support to LegacyProfiler.

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

Reviewed by Joseph Pecoraro.

Source/JavaScriptCore:

  • interpreter/Interpreter.cpp:

(JSC::Interpreter::execute):

  • profiler/CallIdentifier.h:

(JSC::CallIdentifier::CallIdentifier):
(JSC::CallIdentifier::functionName):
(JSC::CallIdentifier::url):
(JSC::CallIdentifier::lineNumber):
(JSC::CallIdentifier::columnNumber):
(JSC::CallIdentifier::operator==):
(JSC::CallIdentifier::operator!=):
(JSC::CallIdentifier::Hash::hash):
(WTF::HashTraits<JSC::CallIdentifier>::constructDeletedValue):
(WTF::HashTraits<JSC::CallIdentifier>::isDeletedValue):

  • profiler/LegacyProfiler.cpp:

(JSC::LegacyProfiler::willExecute):
(JSC::LegacyProfiler::didExecute):
(JSC::LegacyProfiler::exceptionUnwind):
(JSC::LegacyProfiler::createCallIdentifier):
(JSC::createCallIdentifierFromFunctionImp):

  • profiler/LegacyProfiler.h:
  • profiler/Profile.cpp:

(JSC::Profile::Profile):

  • profiler/Profile.h:

(JSC::Profile::uid):
(JSC::Profile::idleTime):
(JSC::Profile::setIdleTime):

  • profiler/ProfileGenerator.cpp:

(JSC::AddParentForConsoleStartFunctor::operator()):
(JSC::ProfileGenerator::addParentForConsoleStart):
(JSC::ProfileGenerator::willExecute):
(JSC::ProfileGenerator::didExecute):
(JSC::ProfileGenerator::stopProfiling):
(JSC::ProfileGenerator::removeProfileStart):
(JSC::ProfileGenerator::removeProfileEnd):

  • profiler/ProfileNode.cpp:

(JSC::ProfileNode::ProfileNode):
(JSC::ProfileNode::stopProfiling):
(JSC::ProfileNode::endAndRecordCall):
(JSC::ProfileNode::startTimer):
(JSC::ProfileNode::debugPrintData):

  • profiler/ProfileNode.h:

(JSC::ProfileNode::Call::Call):
(JSC::ProfileNode::Call::startTime):
(JSC::ProfileNode::Call::setStartTime):
(JSC::ProfileNode::Call::totalTime):
(JSC::ProfileNode::Call::setTotalTime):
(JSC::ProfileNode::id):
(JSC::ProfileNode::functionName):
(JSC::ProfileNode::url):
(JSC::ProfileNode::lineNumber):
(JSC::ProfileNode::columnNumber):
(JSC::ProfileNode::calls):
(JSC::ProfileNode::lastCall):
(JSC::ProfileNode::numberOfCalls):

Source/WebCore:

  • bindings/js/ScriptProfile.cpp:

(WebCore::ScriptProfile::idleTime):
(WebCore::buildInspectorObjectFor):
(WebCore::ScriptProfile::buildInspectorObject):

  • bindings/js/ScriptProfile.h:
  • inspector/InspectorHeapProfilerAgent.cpp:

(WebCore::InspectorHeapProfilerAgent::createSnapshotHeader):

  • inspector/InspectorProfilerAgent.cpp:

(WebCore::InspectorProfilerAgent::createSnapshotHeader):
(WebCore::InspectorProfilerAgent::getCPUProfile):

  • inspector/ScriptProfileNode.idl:
  • inspector/TimelineRecordFactory.cpp:

(WebCore::TimelineRecordFactory::appendProfile):

  • inspector/protocol/Profiler.json:

LayoutTests:

Update test and results to include column numbers.

  • fast/profiler/anonymous-event-handler-expected.txt:
  • fast/profiler/anonymous-function-called-from-different-contexts-expected.txt:
  • fast/profiler/anonymous-function-calls-built-in-functions-expected.txt:
  • fast/profiler/anonymous-function-calls-eval-expected.txt:
  • fast/profiler/anonymous-functions-with-display-names-expected.txt:
  • fast/profiler/apply-expected.txt:
  • fast/profiler/built-in-function-calls-anonymous-expected.txt:
  • fast/profiler/built-in-function-calls-user-defined-function-expected.txt:
  • fast/profiler/call-expected.txt:
  • fast/profiler/calling-the-function-that-started-the-profiler-from-another-scope-expected.txt:
  • fast/profiler/compare-multiple-profiles-expected.txt:
  • fast/profiler/constructor-expected.txt:
  • fast/profiler/dead-time-expected.txt:
  • fast/profiler/document-dot-write-expected.txt:
  • fast/profiler/event-handler-expected.txt:
  • fast/profiler/execution-context-and-eval-on-same-line-expected.txt:
  • fast/profiler/inline-event-handler-expected.txt:
  • fast/profiler/many-calls-in-the-same-scope-expected.txt:
  • fast/profiler/multiple-and-different-scoped-anonymous-function-calls-expected.txt:
  • fast/profiler/multiple-and-different-scoped-function-calls-expected.txt:
  • fast/profiler/multiple-anonymous-functions-called-from-the-same-function-expected.txt:
  • fast/profiler/multiple-frames-expected.txt:
  • fast/profiler/named-functions-with-display-names-expected.txt:
  • fast/profiler/nested-anonymous-functon-expected.txt:
  • fast/profiler/nested-start-and-stop-profiler-expected.txt:
  • fast/profiler/one-execution-context-expected.txt:
  • fast/profiler/profile-calls-in-included-file-expected.txt:
  • fast/profiler/profile-with-no-title-expected.txt:
  • fast/profiler/profiling-from-a-nested-location-but-stop-profiling-outside-the-nesting-expected.txt:
  • fast/profiler/profiling-from-a-nested-location-expected.txt:
  • fast/profiler/resources/profiler-test-JS-resources.js:

(printProfileNodeWithoutTime):

  • fast/profiler/simple-event-call-expected.txt:
  • fast/profiler/simple-no-level-change-expected.txt:
  • fast/profiler/start-and-stop-profiler-multiple-times-expected.txt:
  • fast/profiler/start-and-stop-profiling-in-the-same-function-expected.txt:
  • fast/profiler/stop-profiling-after-setTimeout-expected.txt:
  • fast/profiler/stop-then-function-call-expected.txt:
  • fast/profiler/two-execution-contexts-expected.txt:
  • fast/profiler/user-defined-function-calls-built-in-functions-expected.txt:
  • fast/profiler/window-dot-eval-expected.txt:
Location:
trunk
Files:
60 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r163128 r163140  
     12014-01-28  Timothy Hatcher  <timothy@apple.com>
     2
     3        Add column number and call timing support to LegacyProfiler.
     4
     5        https://bugs.webkit.org/show_bug.cgi?id=127764
     6
     7        Reviewed by Joseph Pecoraro.
     8
     9        Update test and results to include column numbers.
     10
     11        * fast/profiler/anonymous-event-handler-expected.txt:
     12        * fast/profiler/anonymous-function-called-from-different-contexts-expected.txt:
     13        * fast/profiler/anonymous-function-calls-built-in-functions-expected.txt:
     14        * fast/profiler/anonymous-function-calls-eval-expected.txt:
     15        * fast/profiler/anonymous-functions-with-display-names-expected.txt:
     16        * fast/profiler/apply-expected.txt:
     17        * fast/profiler/built-in-function-calls-anonymous-expected.txt:
     18        * fast/profiler/built-in-function-calls-user-defined-function-expected.txt:
     19        * fast/profiler/call-expected.txt:
     20        * fast/profiler/calling-the-function-that-started-the-profiler-from-another-scope-expected.txt:
     21        * fast/profiler/compare-multiple-profiles-expected.txt:
     22        * fast/profiler/constructor-expected.txt:
     23        * fast/profiler/dead-time-expected.txt:
     24        * fast/profiler/document-dot-write-expected.txt:
     25        * fast/profiler/event-handler-expected.txt:
     26        * fast/profiler/execution-context-and-eval-on-same-line-expected.txt:
     27        * fast/profiler/inline-event-handler-expected.txt:
     28        * fast/profiler/many-calls-in-the-same-scope-expected.txt:
     29        * fast/profiler/multiple-and-different-scoped-anonymous-function-calls-expected.txt:
     30        * fast/profiler/multiple-and-different-scoped-function-calls-expected.txt:
     31        * fast/profiler/multiple-anonymous-functions-called-from-the-same-function-expected.txt:
     32        * fast/profiler/multiple-frames-expected.txt:
     33        * fast/profiler/named-functions-with-display-names-expected.txt:
     34        * fast/profiler/nested-anonymous-functon-expected.txt:
     35        * fast/profiler/nested-start-and-stop-profiler-expected.txt:
     36        * fast/profiler/one-execution-context-expected.txt:
     37        * fast/profiler/profile-calls-in-included-file-expected.txt:
     38        * fast/profiler/profile-with-no-title-expected.txt:
     39        * fast/profiler/profiling-from-a-nested-location-but-stop-profiling-outside-the-nesting-expected.txt:
     40        * fast/profiler/profiling-from-a-nested-location-expected.txt:
     41        * fast/profiler/resources/profiler-test-JS-resources.js:
     42        (printProfileNodeWithoutTime):
     43        * fast/profiler/simple-event-call-expected.txt:
     44        * fast/profiler/simple-no-level-change-expected.txt:
     45        * fast/profiler/start-and-stop-profiler-multiple-times-expected.txt:
     46        * fast/profiler/start-and-stop-profiling-in-the-same-function-expected.txt:
     47        * fast/profiler/stop-profiling-after-setTimeout-expected.txt:
     48        * fast/profiler/stop-then-function-call-expected.txt:
     49        * fast/profiler/two-execution-contexts-expected.txt:
     50        * fast/profiler/user-defined-function-calls-built-in-functions-expected.txt:
     51        * fast/profiler/window-dot-eval-expected.txt:
     52
    1532014-01-30  Alexey Proskuryakov  <ap@apple.com>
    254
  • trunk/LayoutTests/fast/profiler/anonymous-event-handler-expected.txt

    r106504 r163140  
    44
    55Profile title: Anonymous event handler
    6 Thread_1 (no file) (line 0)
    7    startTest anonymous-event-handler.html (line 11)
    8       getElementById (no file) (line 0)
    9       click (no file) (line 0)
    10          onclick anonymous-event-handler.html (line 15)
    11             insertNewText profiler-test-JS-resources.js (line 17)
    12                createElement (no file) (line 0)
    13                createTextNode (no file) (line 0)
    14                appendChild (no file) (line 0)
    15                getElementById (no file) (line 0)
    16       endTest profiler-test-JS-resources.js (line 1)
     6Thread_1 (no file) (line 0:0)
     7   startTest anonymous-event-handler.html (line 11:1)
     8      getElementById (no file) (line 0:0)
     9      click (no file) (line 0:0)
     10         onclick anonymous-event-handler.html (line 15:54)
     11            insertNewText profiler-test-JS-resources.js (line 17:26)
     12               createElement (no file) (line 0:0)
     13               createTextNode (no file) (line 0:0)
     14               appendChild (no file) (line 0:0)
     15               getElementById (no file) (line 0:0)
     16      endTest profiler-test-JS-resources.js (line 1:20)
    1717
    1818
  • trunk/LayoutTests/fast/profiler/anonymous-function-called-from-different-contexts-expected.txt

    r106504 r163140  
    44
    55Profile title: Same anonymous function called from different contexts
    6 Thread_1 (no file) (line 0)
    7    startTest anonymous-function-called-from-different-contexts.html (line 11)
    8       anonymousFunction profiler-test-JS-resources.js (line 29)
    9          insertNewText profiler-test-JS-resources.js (line 17)
    10             createElement (no file) (line 0)
    11             createTextNode (no file) (line 0)
    12             appendChild (no file) (line 0)
    13             getElementById (no file) (line 0)
    14       eval (no file) (line 0)
    15          (program) (no file) (line 1)
    16             anonymousFunction profiler-test-JS-resources.js (line 29)
    17                insertNewText profiler-test-JS-resources.js (line 17)
    18                   createElement (no file) (line 0)
    19                   createTextNode (no file) (line 0)
    20                   appendChild (no file) (line 0)
    21                   getElementById (no file) (line 0)
    22       endTest profiler-test-JS-resources.js (line 1)
     6Thread_1 (no file) (line 0:0)
     7   startTest anonymous-function-called-from-different-contexts.html (line 11:1)
     8      anonymousFunction profiler-test-JS-resources.js (line 29:37)
     9         insertNewText profiler-test-JS-resources.js (line 17:26)
     10            createElement (no file) (line 0:0)
     11            createTextNode (no file) (line 0:0)
     12            appendChild (no file) (line 0:0)
     13            getElementById (no file) (line 0:0)
     14      eval (no file) (line 0:0)
     15         (program) (no file) (line 1:1)
     16            anonymousFunction profiler-test-JS-resources.js (line 29:37)
     17               insertNewText profiler-test-JS-resources.js (line 17:26)
     18                  createElement (no file) (line 0:0)
     19                  createTextNode (no file) (line 0:0)
     20                  appendChild (no file) (line 0:0)
     21                  getElementById (no file) (line 0:0)
     22      endTest profiler-test-JS-resources.js (line 1:20)
    2323
    2424
  • trunk/LayoutTests/fast/profiler/anonymous-function-calls-built-in-functions-expected.txt

    r106504 r163140  
    44
    55Profile title: Anonymous function calls built-in functions
    6 Thread_1 (no file) (line 0)
    7    startTest anonymous-function-calls-built-in-functions.html (line 11)
    8       anonymousFunction profiler-test-JS-resources.js (line 29)
    9          insertNewText profiler-test-JS-resources.js (line 17)
    10             createElement (no file) (line 0)
    11             createTextNode (no file) (line 0)
    12             appendChild (no file) (line 0)
    13             getElementById (no file) (line 0)
    14       endTest profiler-test-JS-resources.js (line 1)
     6Thread_1 (no file) (line 0:0)
     7   startTest anonymous-function-calls-built-in-functions.html (line 11:1)
     8      anonymousFunction profiler-test-JS-resources.js (line 29:37)
     9         insertNewText profiler-test-JS-resources.js (line 17:26)
     10            createElement (no file) (line 0:0)
     11            createTextNode (no file) (line 0:0)
     12            appendChild (no file) (line 0:0)
     13            getElementById (no file) (line 0:0)
     14      endTest profiler-test-JS-resources.js (line 1:20)
    1515
    1616
  • trunk/LayoutTests/fast/profiler/anonymous-function-calls-eval-expected.txt

    r106504 r163140  
    44
    55Profile title: Anonymous function calles eval
    6 Thread_1 (no file) (line 0)
    7    startTest anonymous-function-calls-eval.html (line 11)
    8       variableThatPointsToAnAnonymousFunction anonymous-function-calls-eval.html (line 14)
    9          eval (no file) (line 0)
    10             (program) (no file) (line 1)
    11                insertNewText profiler-test-JS-resources.js (line 17)
    12                   createElement (no file) (line 0)
    13                   createTextNode (no file) (line 0)
    14                   appendChild (no file) (line 0)
    15                   getElementById (no file) (line 0)
    16       endTest profiler-test-JS-resources.js (line 1)
     6Thread_1 (no file) (line 0:0)
     7   startTest anonymous-function-calls-eval.html (line 11:1)
     8      variableThatPointsToAnAnonymousFunction anonymous-function-calls-eval.html (line 14:62)
     9         eval (no file) (line 0:0)
     10            (program) (no file) (line 1:1)
     11               insertNewText profiler-test-JS-resources.js (line 17:26)
     12                  createElement (no file) (line 0:0)
     13                  createTextNode (no file) (line 0:0)
     14                  appendChild (no file) (line 0:0)
     15                  getElementById (no file) (line 0:0)
     16      endTest profiler-test-JS-resources.js (line 1:20)
    1717
    1818
  • trunk/LayoutTests/fast/profiler/anonymous-functions-with-display-names-expected.txt

    r42478 r163140  
    44
    55Profile title: Anonymous functions with display names
    6 Thread_1 (no file) (line 0)
    7    startTest anonymous-functions-with-display-names.html (line 23)
    8       anonymousFunctionGenerator anonymous-functions-with-display-names.html (line 11)
    9       0 iterations function anonymous-functions-with-display-names.html (line 13)
    10       1 iterations function anonymous-functions-with-display-names.html (line 13)
    11       2 iterations function anonymous-functions-with-display-names.html (line 13)
    12       20 iterations function anonymous-functions-with-display-names.html (line 13)
    13       1000 iterations function anonymous-functions-with-display-names.html (line 13)
    14       endTest profiler-test-JS-resources.js (line 1)
     6Thread_1 (no file) (line 0:0)
     7   startTest anonymous-functions-with-display-names.html (line 23:1)
     8      anonymousFunctionGenerator anonymous-functions-with-display-names.html (line 11:1)
     9      0 iterations function anonymous-functions-with-display-names.html (line 13:5)
     10      1 iterations function anonymous-functions-with-display-names.html (line 13:5)
     11      2 iterations function anonymous-functions-with-display-names.html (line 13:5)
     12      20 iterations function anonymous-functions-with-display-names.html (line 13:5)
     13      1000 iterations function anonymous-functions-with-display-names.html (line 13:5)
     14      endTest profiler-test-JS-resources.js (line 1:20)
    1515
    1616
  • trunk/LayoutTests/fast/profiler/apply-expected.txt

    r42337 r163140  
    44
    55Profile title: Using the apply() method
    6 Thread_1 (no file) (line 0)
    7    startTest apply.html (line 11)
    8       fakeObject apply.html (line 18)
    9          fakeInteriorFunction apply.html (line 24)
    10       endTest profiler-test-JS-resources.js (line 1)
     6Thread_1 (no file) (line 0:0)
     7   startTest apply.html (line 11:1)
     8      fakeObject apply.html (line 18:1)
     9         fakeInteriorFunction apply.html (line 24:1)
     10      endTest profiler-test-JS-resources.js (line 1:20)
    1111
    1212
  • trunk/LayoutTests/fast/profiler/built-in-function-calls-anonymous-expected.txt

    r106504 r163140  
    44
    55Profile title: Built-in function calls an anonymous function
    6 Thread_1 (no file) (line 0)
    7    startTest built-in-function-calls-anonymous.html (line 11)
    8       Array (no file) (line 0)
    9       map (no file) (line 0)
    10          myFunction built-in-function-calls-anonymous.html (line 14)
    11             arrayOperatorFunction profiler-test-JS-resources.js (line 25)
    12       endTest profiler-test-JS-resources.js (line 1)
     6Thread_1 (no file) (line 0:0)
     7   startTest built-in-function-calls-anonymous.html (line 11:1)
     8      Array (no file) (line 0:0)
     9      map (no file) (line 0:0)
     10         myFunction built-in-function-calls-anonymous.html (line 14:45)
     11            arrayOperatorFunction profiler-test-JS-resources.js (line 25:46)
     12      endTest profiler-test-JS-resources.js (line 1:20)
    1313
    1414
  • trunk/LayoutTests/fast/profiler/built-in-function-calls-user-defined-function-expected.txt

    r39036 r163140  
    44
    55Profile title: Built-in function calls a user defined function
    6 Thread_1 (no file) (line 0)
    7    startTest built-in-function-calls-user-defined-function.html (line 11)
    8       Array (no file) (line 0)
    9       map (no file) (line 0)
    10          arrayOperatorFunction profiler-test-JS-resources.js (line 25)
    11       endTest profiler-test-JS-resources.js (line 1)
     6Thread_1 (no file) (line 0:0)
     7   startTest built-in-function-calls-user-defined-function.html (line 11:1)
     8      Array (no file) (line 0:0)
     9      map (no file) (line 0:0)
     10         arrayOperatorFunction profiler-test-JS-resources.js (line 25:46)
     11      endTest profiler-test-JS-resources.js (line 1:20)
    1212
    1313
  • trunk/LayoutTests/fast/profiler/call-expected.txt

    r42065 r163140  
    44
    55Profile title: Using the call() method
    6 Thread_1 (no file) (line 0)
    7    startTest call.html (line 11)
    8       fakeObject call.html (line 20)
    9          fakeInteriorFunction call.html (line 26)
    10       endTest profiler-test-JS-resources.js (line 1)
     6Thread_1 (no file) (line 0:0)
     7   startTest call.html (line 11:1)
     8      fakeObject call.html (line 20:1)
     9         fakeInteriorFunction call.html (line 26:1)
     10      endTest profiler-test-JS-resources.js (line 1:20)
    1111
    1212
  • trunk/LayoutTests/fast/profiler/calling-the-function-that-started-the-profiler-from-another-scope-expected.txt

    r39036 r163140  
    44
    55Profile title: Calling the same function where the profile started from another function
    6 Thread_1 (no file) (line 0)
    7    indirection calling-the-function-that-started-the-profiler-from-another-scope.html (line 18)
    8       functionWichStartsAndStopsTheProfiler calling-the-function-that-started-the-profiler-from-another-scope.html (line 24)
    9    functionWichStartsAndStopsTheProfiler calling-the-function-that-started-the-profiler-from-another-scope.html (line 24)
    10    endTest profiler-test-JS-resources.js (line 1)
     6Thread_1 (no file) (line 0:0)
     7   indirection calling-the-function-that-started-the-profiler-from-another-scope.html (line 18:1)
     8      functionWichStartsAndStopsTheProfiler calling-the-function-that-started-the-profiler-from-another-scope.html (line 24:1)
     9   functionWichStartsAndStopsTheProfiler calling-the-function-that-started-the-profiler-from-another-scope.html (line 24:1)
     10   endTest profiler-test-JS-resources.js (line 1:20)
    1111
    1212
  • trunk/LayoutTests/fast/profiler/compare-multiple-profiles-expected.txt

    r39036 r163140  
    44
    55Profile title: Test
    6 Thread_1 (no file) (line 0)
    7    startTest compare-multiple-profiles.html (line 23)
    8       test compare-multiple-profiles.html (line 11)
    9          test2 compare-multiple-profiles.html (line 17)
     6Thread_1 (no file) (line 0:0)
     7   startTest compare-multiple-profiles.html (line 23:1)
     8      test compare-multiple-profiles.html (line 11:20)
     9         test2 compare-multiple-profiles.html (line 17:21)
    1010
    1111Profile title: Test
    12 Thread_1 (no file) (line 0)
    13    startTest compare-multiple-profiles.html (line 23)
    14       test compare-multiple-profiles.html (line 11)
    15          test2 compare-multiple-profiles.html (line 17)
     12Thread_1 (no file) (line 0:0)
     13   startTest compare-multiple-profiles.html (line 23:1)
     14      test compare-multiple-profiles.html (line 11:20)
     15         test2 compare-multiple-profiles.html (line 17:21)
    1616
    1717
  • trunk/LayoutTests/fast/profiler/constructor-expected.txt

    r39036 r163140  
    44
    55Profile title: Using a constructor.
    6 Thread_1 (no file) (line 0)
    7    startTest constructor.html (line 11)
    8       fakeObject constructor.html (line 20)
    9          Array (no file) (line 0)
    10       endTest profiler-test-JS-resources.js (line 1)
     6Thread_1 (no file) (line 0:0)
     7   startTest constructor.html (line 11:1)
     8      fakeObject constructor.html (line 20:1)
     9         Array (no file) (line 0:0)
     10      endTest profiler-test-JS-resources.js (line 1:20)
    1111
    1212
  • trunk/LayoutTests/fast/profiler/dead-time-expected.txt

    r162832 r163140  
    44
    55Profile title: Dead time in profile.
    6 Thread_1 (no file) (line 0)
    7    onload dead-time.html (line 21)
    8       startTest dead-time.html (line 13)
    9          setTimeout (no file) (line 0)
    10    (program) dead-time.html (line 1)
    11       endTest profiler-test-JS-resources.js (line 1)
     6Thread_1 (no file) (line 0:0)
     7   onload dead-time.html (line 21:1)
     8      startTest dead-time.html (line 13:1)
     9         setTimeout (no file) (line 0:0)
     10   (program) dead-time.html (line 1:1)
     11      endTest profiler-test-JS-resources.js (line 1:20)
    1212
    1313
  • trunk/LayoutTests/fast/profiler/document-dot-write-expected.txt

    r39036 r163140  
    11
    22Profile title: Call Document.write()
    3 Thread_1 (no file) (line 0)
    4    startTest document-dot-write.html (line 11)
    5       write (no file) (line 0)
    6       endTest profiler-test-JS-resources.js (line 1)
     3Thread_1 (no file) (line 0:0)
     4   startTest document-dot-write.html (line 11:1)
     5      write (no file) (line 0:0)
     6      endTest profiler-test-JS-resources.js (line 1:20)
    77
    88
  • trunk/LayoutTests/fast/profiler/event-handler-expected.txt

    r39036 r163140  
    44
    55Profile title: Event handler
    6 Thread_1 (no file) (line 0)
    7    startTest event-handler.html (line 11)
    8       getElementById (no file) (line 0)
    9       addEventListener (no file) (line 0)
    10       click (no file) (line 0)
    11          insertNewText profiler-test-JS-resources.js (line 17)
    12             createElement (no file) (line 0)
    13             createTextNode (no file) (line 0)
    14             appendChild (no file) (line 0)
    15             getElementById (no file) (line 0)
    16       endTest profiler-test-JS-resources.js (line 1)
     6Thread_1 (no file) (line 0:0)
     7   startTest event-handler.html (line 11:1)
     8      getElementById (no file) (line 0:0)
     9      addEventListener (no file) (line 0:0)
     10      click (no file) (line 0:0)
     11         insertNewText profiler-test-JS-resources.js (line 17:26)
     12            createElement (no file) (line 0:0)
     13            createTextNode (no file) (line 0:0)
     14            appendChild (no file) (line 0:0)
     15            getElementById (no file) (line 0:0)
     16      endTest profiler-test-JS-resources.js (line 1:20)
    1717
    1818
  • trunk/LayoutTests/fast/profiler/execution-context-and-eval-on-same-line-expected.txt

    r39036 r163140  
    44
    55Profile title: Two Execution Contexts on the same line
    6 Thread_1 (no file) (line 0)
    7    startTest execution-context-and-eval-on-same-line.html (line 11)
    8       evalFunction (no file) (line 1)
    9          insertNewText profiler-test-JS-resources.js (line 17)
    10             createElement (no file) (line 0)
    11             createTextNode (no file) (line 0)
    12             appendChild (no file) (line 0)
    13             getElementById (no file) (line 0)
    14       endTest profiler-test-JS-resources.js (line 1)
     6Thread_1 (no file) (line 0:0)
     7   startTest execution-context-and-eval-on-same-line.html (line 11:1)
     8      evalFunction (no file) (line 1:25)
     9         insertNewText profiler-test-JS-resources.js (line 17:26)
     10            createElement (no file) (line 0:0)
     11            createTextNode (no file) (line 0:0)
     12            appendChild (no file) (line 0:0)
     13            getElementById (no file) (line 0:0)
     14      endTest profiler-test-JS-resources.js (line 1:20)
    1515
    1616
  • trunk/LayoutTests/fast/profiler/inline-event-handler-expected.txt

    r106504 r163140  
    44
    55Profile title: Inline event handler
    6 Thread_1 (no file) (line 0)
    7    startTest inline-event-handler.html (line 11)
    8       getElementById (no file) (line 0)
    9       click (no file) (line 0)
    10          onclick inline-event-handler.html (line 31)
    11             eventListener inline-event-handler.html (line 17)
    12                anonymousFunction profiler-test-JS-resources.js (line 29)
    13                   insertNewText profiler-test-JS-resources.js (line 17)
    14                      createElement (no file) (line 0)
    15                      createTextNode (no file) (line 0)
    16                      appendChild (no file) (line 0)
    17                      getElementById (no file) (line 0)
    18                endTest profiler-test-JS-resources.js (line 1)
     6Thread_1 (no file) (line 0:0)
     7   startTest inline-event-handler.html (line 11:1)
     8      getElementById (no file) (line 0:0)
     9      click (no file) (line 0:0)
     10         onclick inline-event-handler.html (line 31:1)
     11            eventListener inline-event-handler.html (line 17:26)
     12               anonymousFunction profiler-test-JS-resources.js (line 29:37)
     13                  insertNewText profiler-test-JS-resources.js (line 17:26)
     14                     createElement (no file) (line 0:0)
     15                     createTextNode (no file) (line 0:0)
     16                     appendChild (no file) (line 0:0)
     17                     getElementById (no file) (line 0:0)
     18               endTest profiler-test-JS-resources.js (line 1:20)
    1919
    2020
  • trunk/LayoutTests/fast/profiler/many-calls-in-the-same-scope-expected.txt

    r106504 r163140  
    44
    55Profile title: Many Calls In The Same Scope
    6 Thread_1 (no file) (line 0)
    7    startTest many-calls-in-the-same-scope.html (line 11)
    8       insertNewText profiler-test-JS-resources.js (line 17)
    9          createElement (no file) (line 0)
    10          createTextNode (no file) (line 0)
    11          appendChild (no file) (line 0)
    12          getElementById (no file) (line 0)
    13       insertGivenText profiler-test-JS-resources.js (line 9)
    14          createElement (no file) (line 0)
    15          createTextNode (no file) (line 0)
    16          appendChild (no file) (line 0)
    17          getElementById (no file) (line 0)
    18       arrayOperatorFunction profiler-test-JS-resources.js (line 25)
    19       intermediaryFunction profiler-test-JS-resources.js (line 33)
    20          anonymousFunction profiler-test-JS-resources.js (line 29)
    21             insertNewText profiler-test-JS-resources.js (line 17)
    22                createElement (no file) (line 0)
    23                createTextNode (no file) (line 0)
    24                appendChild (no file) (line 0)
    25                getElementById (no file) (line 0)
    26       anonymousFunction profiler-test-JS-resources.js (line 29)
    27          insertNewText profiler-test-JS-resources.js (line 17)
    28             createElement (no file) (line 0)
    29             createTextNode (no file) (line 0)
    30             appendChild (no file) (line 0)
    31             getElementById (no file) (line 0)
    32       end many-calls-in-the-same-scope.html (line 27)
    33       endT many-calls-in-the-same-scope.html (line 32)
    34       endTest profiler-test-JS-resources.js (line 1)
     6Thread_1 (no file) (line 0:0)
     7   startTest many-calls-in-the-same-scope.html (line 11:1)
     8      insertNewText profiler-test-JS-resources.js (line 17:26)
     9         createElement (no file) (line 0:0)
     10         createTextNode (no file) (line 0:0)
     11         appendChild (no file) (line 0:0)
     12         getElementById (no file) (line 0:0)
     13      insertGivenText profiler-test-JS-resources.js (line 9:32)
     14         createElement (no file) (line 0:0)
     15         createTextNode (no file) (line 0:0)
     16         appendChild (no file) (line 0:0)
     17         getElementById (no file) (line 0:0)
     18      arrayOperatorFunction profiler-test-JS-resources.js (line 25:46)
     19      intermediaryFunction profiler-test-JS-resources.js (line 33:1)
     20         anonymousFunction profiler-test-JS-resources.js (line 29:37)
     21            insertNewText profiler-test-JS-resources.js (line 17:26)
     22               createElement (no file) (line 0:0)
     23               createTextNode (no file) (line 0:0)
     24               appendChild (no file) (line 0:0)
     25               getElementById (no file) (line 0:0)
     26      anonymousFunction profiler-test-JS-resources.js (line 29:37)
     27         insertNewText profiler-test-JS-resources.js (line 17:26)
     28            createElement (no file) (line 0:0)
     29            createTextNode (no file) (line 0:0)
     30            appendChild (no file) (line 0:0)
     31            getElementById (no file) (line 0:0)
     32      end many-calls-in-the-same-scope.html (line 27:1)
     33      endT many-calls-in-the-same-scope.html (line 32:1)
     34      endTest profiler-test-JS-resources.js (line 1:20)
    3535
    3636
  • trunk/LayoutTests/fast/profiler/multiple-and-different-scoped-anonymous-function-calls-expected.txt

    r106504 r163140  
    44
    55Profile title: Multiple and different scoped calls to the same anonymous function
    6 Thread_1 (no file) (line 0)
    7    startTest multiple-and-different-scoped-anonymous-function-calls.html (line 11)
    8       anonymousFunction profiler-test-JS-resources.js (line 29)
    9          insertNewText profiler-test-JS-resources.js (line 17)
    10             createElement (no file) (line 0)
    11             createTextNode (no file) (line 0)
    12             appendChild (no file) (line 0)
    13             getElementById (no file) (line 0)
    14       intermediaryFunction profiler-test-JS-resources.js (line 33)
    15          anonymousFunction profiler-test-JS-resources.js (line 29)
    16             insertNewText profiler-test-JS-resources.js (line 17)
    17                createElement (no file) (line 0)
    18                createTextNode (no file) (line 0)
    19                appendChild (no file) (line 0)
    20                getElementById (no file) (line 0)
    21       endTest profiler-test-JS-resources.js (line 1)
     6Thread_1 (no file) (line 0:0)
     7   startTest multiple-and-different-scoped-anonymous-function-calls.html (line 11:1)
     8      anonymousFunction profiler-test-JS-resources.js (line 29:37)
     9         insertNewText profiler-test-JS-resources.js (line 17:26)
     10            createElement (no file) (line 0:0)
     11            createTextNode (no file) (line 0:0)
     12            appendChild (no file) (line 0:0)
     13            getElementById (no file) (line 0:0)
     14      intermediaryFunction profiler-test-JS-resources.js (line 33:1)
     15         anonymousFunction profiler-test-JS-resources.js (line 29:37)
     16            insertNewText profiler-test-JS-resources.js (line 17:26)
     17               createElement (no file) (line 0:0)
     18               createTextNode (no file) (line 0:0)
     19               appendChild (no file) (line 0:0)
     20               getElementById (no file) (line 0:0)
     21      endTest profiler-test-JS-resources.js (line 1:20)
    2222
    2323
  • trunk/LayoutTests/fast/profiler/multiple-and-different-scoped-function-calls-expected.txt

    r106504 r163140  
    44
    55Profile title: Multiple and different scoped calls to the same function
    6 Thread_1 (no file) (line 0)
    7    startTest multiple-and-different-scoped-function-calls.html (line 11)
    8       insertNewText profiler-test-JS-resources.js (line 17)
    9          createElement (no file) (line 0)
    10          createTextNode (no file) (line 0)
    11          appendChild (no file) (line 0)
    12          getElementById (no file) (line 0)
    13       intermediaryFunction profiler-test-JS-resources.js (line 33)
    14          anonymousFunction profiler-test-JS-resources.js (line 29)
    15             insertNewText profiler-test-JS-resources.js (line 17)
    16                createElement (no file) (line 0)
    17                createTextNode (no file) (line 0)
    18                appendChild (no file) (line 0)
    19                getElementById (no file) (line 0)
    20       endTest profiler-test-JS-resources.js (line 1)
     6Thread_1 (no file) (line 0:0)
     7   startTest multiple-and-different-scoped-function-calls.html (line 11:1)
     8      insertNewText profiler-test-JS-resources.js (line 17:26)
     9         createElement (no file) (line 0:0)
     10         createTextNode (no file) (line 0:0)
     11         appendChild (no file) (line 0:0)
     12         getElementById (no file) (line 0:0)
     13      intermediaryFunction profiler-test-JS-resources.js (line 33:1)
     14         anonymousFunction profiler-test-JS-resources.js (line 29:37)
     15            insertNewText profiler-test-JS-resources.js (line 17:26)
     16               createElement (no file) (line 0:0)
     17               createTextNode (no file) (line 0:0)
     18               appendChild (no file) (line 0:0)
     19               getElementById (no file) (line 0:0)
     20      endTest profiler-test-JS-resources.js (line 1:20)
    2121
    2222
  • trunk/LayoutTests/fast/profiler/multiple-anonymous-functions-called-from-the-same-function-expected.txt

    r106504 r163140  
    44
    55Profile title: Multiple calls to different anonymous functions
    6 Thread_1 (no file) (line 0)
    7    startTest multiple-anonymous-functions-called-from-the-same-function.html (line 11)
    8       anonymousFunction profiler-test-JS-resources.js (line 29)
    9          insertNewText profiler-test-JS-resources.js (line 17)
    10             createElement (no file) (line 0)
    11             createTextNode (no file) (line 0)
    12             appendChild (no file) (line 0)
    13             getElementById (no file) (line 0)
    14       anotherAnonymousFunction profiler-test-JS-resources.js (line 30)
    15          insertGivenText profiler-test-JS-resources.js (line 9)
    16             createElement (no file) (line 0)
    17             createTextNode (no file) (line 0)
    18             appendChild (no file) (line 0)
    19             getElementById (no file) (line 0)
    20       endTest profiler-test-JS-resources.js (line 1)
     6Thread_1 (no file) (line 0:0)
     7   startTest multiple-anonymous-functions-called-from-the-same-function.html (line 11:1)
     8      anonymousFunction profiler-test-JS-resources.js (line 29:37)
     9         insertNewText profiler-test-JS-resources.js (line 17:26)
     10            createElement (no file) (line 0:0)
     11            createTextNode (no file) (line 0:0)
     12            appendChild (no file) (line 0:0)
     13            getElementById (no file) (line 0:0)
     14      anotherAnonymousFunction profiler-test-JS-resources.js (line 30:44)
     15         insertGivenText profiler-test-JS-resources.js (line 9:32)
     16            createElement (no file) (line 0:0)
     17            createTextNode (no file) (line 0:0)
     18            appendChild (no file) (line 0:0)
     19            getElementById (no file) (line 0:0)
     20      endTest profiler-test-JS-resources.js (line 1:20)
    2121
    2222
  • trunk/LayoutTests/fast/profiler/multiple-frames-expected.txt

    r39036 r163140  
    44
    55Profile title: Other window executing JavaScript
    6 Thread_1 (no file) (line 0)
    7    startTest multiple-frames.html (line 11)
    8       getElementById (no file) (line 0)
    9       functionInOtherFrame other-frame.html (line 4)
    10          functionInParentFrame multiple-frames.html (line 21)
    11       insertGivenText profiler-test-JS-resources.js (line 9)
    12          createElement (no file) (line 0)
    13          createTextNode (no file) (line 0)
    14          appendChild (no file) (line 0)
    15          getElementById (no file) (line 0)
    16       endTest profiler-test-JS-resources.js (line 1)
     6Thread_1 (no file) (line 0:0)
     7   startTest multiple-frames.html (line 11:1)
     8      getElementById (no file) (line 0:0)
     9      functionInOtherFrame other-frame.html (line 4:33)
     10         functionInParentFrame multiple-frames.html (line 21:34)
     11      insertGivenText profiler-test-JS-resources.js (line 9:32)
     12         createElement (no file) (line 0:0)
     13         createTextNode (no file) (line 0:0)
     14         appendChild (no file) (line 0:0)
     15         getElementById (no file) (line 0:0)
     16      endTest profiler-test-JS-resources.js (line 1:20)
    1717
    1818
  • trunk/LayoutTests/fast/profiler/named-functions-with-display-names-expected.txt

    r43006 r163140  
    44
    55Profile title: Named functions with display names
    6 Thread_1 (no file) (line 0)
    7    startTest named-functions-with-display-names.html (line 54)
    8       0 iterations function named-functions-with-display-names.html (line 11)
    9       1 iteration function named-functions-with-display-names.html (line 18)
    10       2 iterations function named-functions-with-display-names.html (line 25)
    11       20 iterations function named-functions-with-display-names.html (line 32)
    12       1000 iterations function named-functions-with-display-names.html (line 39)
    13       bogusDisplayNameFunction named-functions-with-display-names.html (line 47)
    14       endTest profiler-test-JS-resources.js (line 1)
     6Thread_1 (no file) (line 0:0)
     7   startTest named-functions-with-display-names.html (line 54:1)
     8      0 iterations function named-functions-with-display-names.html (line 11:1)
     9      1 iteration function named-functions-with-display-names.html (line 18:1)
     10      2 iterations function named-functions-with-display-names.html (line 25:1)
     11      20 iterations function named-functions-with-display-names.html (line 32:1)
     12      1000 iterations function named-functions-with-display-names.html (line 39:1)
     13      bogusDisplayNameFunction named-functions-with-display-names.html (line 47:1)
     14      endTest profiler-test-JS-resources.js (line 1:20)
    1515
    1616
  • trunk/LayoutTests/fast/profiler/nested-anonymous-functon-expected.txt

    r106504 r163140  
    44
    55Profile title: Nested anonymous functions called
    6 Thread_1 (no file) (line 0)
    7    startTest nested-anonymous-functon.html (line 11)
    8       AnonymousFunctionWichCallsAnAnonymousFunction nested-anonymous-functon.html (line 14)
    9          anonymousFunction profiler-test-JS-resources.js (line 29)
    10             insertNewText profiler-test-JS-resources.js (line 17)
    11                createElement (no file) (line 0)
    12                createTextNode (no file) (line 0)
    13                appendChild (no file) (line 0)
    14                getElementById (no file) (line 0)
    15       endTest profiler-test-JS-resources.js (line 1)
     6Thread_1 (no file) (line 0:0)
     7   startTest nested-anonymous-functon.html (line 11:1)
     8      AnonymousFunctionWichCallsAnAnonymousFunction nested-anonymous-functon.html (line 14:68)
     9         anonymousFunction profiler-test-JS-resources.js (line 29:37)
     10            insertNewText profiler-test-JS-resources.js (line 17:26)
     11               createElement (no file) (line 0:0)
     12               createTextNode (no file) (line 0:0)
     13               appendChild (no file) (line 0:0)
     14               getElementById (no file) (line 0:0)
     15      endTest profiler-test-JS-resources.js (line 1:20)
    1616
    1717
  • trunk/LayoutTests/fast/profiler/nested-start-and-stop-profiler-expected.txt

    r120232 r163140  
    44
    55Profile title: Start the profiler the third time.
    6 Thread_1 (no file) (line 0)
    7    startTest nested-start-and-stop-profiler.html (line 11)
    8       endTest profiler-test-JS-resources.js (line 1)
     6Thread_1 (no file) (line 0:0)
     7   startTest nested-start-and-stop-profiler.html (line 11:1)
     8      endTest profiler-test-JS-resources.js (line 1:20)
    99
    1010
    1111Profile title: Start the profiler the third time.
    12 Thread_1 (no file) (line 0)
    13    startTest nested-start-and-stop-profiler.html (line 11)
    14       endTest profiler-test-JS-resources.js (line 1)
     12Thread_1 (no file) (line 0:0)
     13   startTest nested-start-and-stop-profiler.html (line 11:1)
     14      endTest profiler-test-JS-resources.js (line 1:20)
    1515
    1616Profile title: Start the profiler the second time.
    17 Thread_1 (no file) (line 0)
    18    startTest nested-start-and-stop-profiler.html (line 11)
    19       endTest profiler-test-JS-resources.js (line 1)
    20          profileEnd (no file) (line 0)
    21          printProfilesDataWithoutTime profiler-test-JS-resources.js (line 63)
    22             createElement (no file) (line 0)
    23             createTextNode (no file) (line 0)
    24             appendChild (no file) (line 0)
    25             printProfileNodeWithoutTime profiler-test-JS-resources.js (line 78)
    26                replace (no file) (line 0)
    27                createTextNode (no file) (line 0)
    28                appendChild (no file) (line 0)
    29                children (no file) (line 0)
    30                printProfileNodeWithoutTime profiler-test-JS-resources.js (line 78)
    31                   replace (no file) (line 0)
    32                   createTextNode (no file) (line 0)
    33                   appendChild (no file) (line 0)
    34                   children (no file) (line 0)
    35                   printProfileNodeWithoutTime profiler-test-JS-resources.js (line 78)
    36                      replace (no file) (line 0)
    37                      createTextNode (no file) (line 0)
    38                      appendChild (no file) (line 0)
    39                      children (no file) (line 0)
    40             getElementById (no file) (line 0)
    41          notifyDone (no file) (line 0)
     17Thread_1 (no file) (line 0:0)
     18   startTest nested-start-and-stop-profiler.html (line 11:1)
     19      endTest profiler-test-JS-resources.js (line 1:20)
     20         profileEnd (no file) (line 0:0)
     21         printProfilesDataWithoutTime profiler-test-JS-resources.js (line 63:1)
     22            createElement (no file) (line 0:0)
     23            createTextNode (no file) (line 0:0)
     24            appendChild (no file) (line 0:0)
     25            printProfileNodeWithoutTime profiler-test-JS-resources.js (line 78:1)
     26               replace (no file) (line 0:0)
     27               createTextNode (no file) (line 0:0)
     28               appendChild (no file) (line 0:0)
     29               children (no file) (line 0:0)
     30               printProfileNodeWithoutTime profiler-test-JS-resources.js (line 78:1)
     31                  replace (no file) (line 0:0)
     32                  createTextNode (no file) (line 0:0)
     33                  appendChild (no file) (line 0:0)
     34                  children (no file) (line 0:0)
     35                  printProfileNodeWithoutTime profiler-test-JS-resources.js (line 78:1)
     36                     replace (no file) (line 0:0)
     37                     createTextNode (no file) (line 0:0)
     38                     appendChild (no file) (line 0:0)
     39                     children (no file) (line 0:0)
     40            getElementById (no file) (line 0:0)
     41         notifyDone (no file) (line 0:0)
    4242
    4343
    4444Profile title: Start the profiler the third time.
    45 Thread_1 (no file) (line 0)
    46    startTest nested-start-and-stop-profiler.html (line 11)
    47       endTest profiler-test-JS-resources.js (line 1)
     45Thread_1 (no file) (line 0:0)
     46   startTest nested-start-and-stop-profiler.html (line 11:1)
     47      endTest profiler-test-JS-resources.js (line 1:20)
    4848
    4949Profile title: Start the profiler the second time.
    50 Thread_1 (no file) (line 0)
    51    startTest nested-start-and-stop-profiler.html (line 11)
    52       endTest profiler-test-JS-resources.js (line 1)
    53          profileEnd (no file) (line 0)
    54          printProfilesDataWithoutTime profiler-test-JS-resources.js (line 63)
    55             createElement (no file) (line 0)
    56             createTextNode (no file) (line 0)
    57             appendChild (no file) (line 0)
    58             printProfileNodeWithoutTime profiler-test-JS-resources.js (line 78)
    59                replace (no file) (line 0)
    60                createTextNode (no file) (line 0)
    61                appendChild (no file) (line 0)
    62                children (no file) (line 0)
    63                printProfileNodeWithoutTime profiler-test-JS-resources.js (line 78)
    64                   replace (no file) (line 0)
    65                   createTextNode (no file) (line 0)
    66                   appendChild (no file) (line 0)
    67                   children (no file) (line 0)
    68                   printProfileNodeWithoutTime profiler-test-JS-resources.js (line 78)
    69                      replace (no file) (line 0)
    70                      createTextNode (no file) (line 0)
    71                      appendChild (no file) (line 0)
    72                      children (no file) (line 0)
    73             getElementById (no file) (line 0)
    74          notifyDone (no file) (line 0)
     50Thread_1 (no file) (line 0:0)
     51   startTest nested-start-and-stop-profiler.html (line 11:1)
     52      endTest profiler-test-JS-resources.js (line 1:20)
     53         profileEnd (no file) (line 0:0)
     54         printProfilesDataWithoutTime profiler-test-JS-resources.js (line 63:1)
     55            createElement (no file) (line 0:0)
     56            createTextNode (no file) (line 0:0)
     57            appendChild (no file) (line 0:0)
     58            printProfileNodeWithoutTime profiler-test-JS-resources.js (line 78:1)
     59               replace (no file) (line 0:0)
     60               createTextNode (no file) (line 0:0)
     61               appendChild (no file) (line 0:0)
     62               children (no file) (line 0:0)
     63               printProfileNodeWithoutTime profiler-test-JS-resources.js (line 78:1)
     64                  replace (no file) (line 0:0)
     65                  createTextNode (no file) (line 0:0)
     66                  appendChild (no file) (line 0:0)
     67                  children (no file) (line 0:0)
     68                  printProfileNodeWithoutTime profiler-test-JS-resources.js (line 78:1)
     69                     replace (no file) (line 0:0)
     70                     createTextNode (no file) (line 0:0)
     71                     appendChild (no file) (line 0:0)
     72                     children (no file) (line 0:0)
     73            getElementById (no file) (line 0:0)
     74         notifyDone (no file) (line 0:0)
    7575
    7676Profile title: Start the profiler the first time.
    77 Thread_1 (no file) (line 0)
    78    startTest nested-start-and-stop-profiler.html (line 11)
    79       endTest profiler-test-JS-resources.js (line 1)
    80          profileEnd (no file) (line 0)
    81          printProfilesDataWithoutTime profiler-test-JS-resources.js (line 63)
    82             createElement (no file) (line 0)
    83             createTextNode (no file) (line 0)
    84             appendChild (no file) (line 0)
    85             printProfileNodeWithoutTime profiler-test-JS-resources.js (line 78)
    86                replace (no file) (line 0)
    87                createTextNode (no file) (line 0)
    88                appendChild (no file) (line 0)
    89                children (no file) (line 0)
    90                printProfileNodeWithoutTime profiler-test-JS-resources.js (line 78)
    91                   replace (no file) (line 0)
    92                   createTextNode (no file) (line 0)
    93                   appendChild (no file) (line 0)
    94                   children (no file) (line 0)
    95                   printProfileNodeWithoutTime profiler-test-JS-resources.js (line 78)
    96                      replace (no file) (line 0)
    97                      createTextNode (no file) (line 0)
    98                      appendChild (no file) (line 0)
    99                      children (no file) (line 0)
    100                      printProfileNodeWithoutTime profiler-test-JS-resources.js (line 78)
    101                         replace (no file) (line 0)
    102                         createTextNode (no file) (line 0)
    103                         appendChild (no file) (line 0)
    104                         children (no file) (line 0)
    105                         printProfileNodeWithoutTime profiler-test-JS-resources.js (line 78)
    106                            replace (no file) (line 0)
    107                            createTextNode (no file) (line 0)
    108                            appendChild (no file) (line 0)
    109                            children (no file) (line 0)
    110                            printProfileNodeWithoutTime profiler-test-JS-resources.js (line 78)
    111                               replace (no file) (line 0)
    112                               createTextNode (no file) (line 0)
    113                               appendChild (no file) (line 0)
    114                               children (no file) (line 0)
    115                               printProfileNodeWithoutTime profiler-test-JS-resources.js (line 78)
    116                                  replace (no file) (line 0)
    117                                  createTextNode (no file) (line 0)
    118                                  appendChild (no file) (line 0)
    119                                  children (no file) (line 0)
    120                                  printProfileNodeWithoutTime profiler-test-JS-resources.js (line 78)
    121                                     replace (no file) (line 0)
    122                                     createTextNode (no file) (line 0)
    123                                     appendChild (no file) (line 0)
    124                                     children (no file) (line 0)
    125             getElementById (no file) (line 0)
    126          notifyDone (no file) (line 0)
     77Thread_1 (no file) (line 0:0)
     78   startTest nested-start-and-stop-profiler.html (line 11:1)
     79      endTest profiler-test-JS-resources.js (line 1:20)
     80         profileEnd (no file) (line 0:0)
     81         printProfilesDataWithoutTime profiler-test-JS-resources.js (line 63:1)
     82            createElement (no file) (line 0:0)
     83            createTextNode (no file) (line 0:0)
     84            appendChild (no file) (line 0:0)
     85            printProfileNodeWithoutTime profiler-test-JS-resources.js (line 78:1)
     86               replace (no file) (line 0:0)
     87               createTextNode (no file) (line 0:0)
     88               appendChild (no file) (line 0:0)
     89               children (no file) (line 0:0)
     90               printProfileNodeWithoutTime profiler-test-JS-resources.js (line 78:1)
     91                  replace (no file) (line 0:0)
     92                  createTextNode (no file) (line 0:0)
     93                  appendChild (no file) (line 0:0)
     94                  children (no file) (line 0:0)
     95                  printProfileNodeWithoutTime profiler-test-JS-resources.js (line 78:1)
     96                     replace (no file) (line 0:0)
     97                     createTextNode (no file) (line 0:0)
     98                     appendChild (no file) (line 0:0)
     99                     children (no file) (line 0:0)
     100                     printProfileNodeWithoutTime profiler-test-JS-resources.js (line 78:1)
     101                        replace (no file) (line 0:0)
     102                        createTextNode (no file) (line 0:0)
     103                        appendChild (no file) (line 0:0)
     104                        children (no file) (line 0:0)
     105                        printProfileNodeWithoutTime profiler-test-JS-resources.js (line 78:1)
     106                           replace (no file) (line 0:0)
     107                           createTextNode (no file) (line 0:0)
     108                           appendChild (no file) (line 0:0)
     109                           children (no file) (line 0:0)
     110                           printProfileNodeWithoutTime profiler-test-JS-resources.js (line 78:1)
     111                              replace (no file) (line 0:0)
     112                              createTextNode (no file) (line 0:0)
     113                              appendChild (no file) (line 0:0)
     114                              children (no file) (line 0:0)
     115                              printProfileNodeWithoutTime profiler-test-JS-resources.js (line 78:1)
     116                                 replace (no file) (line 0:0)
     117                                 createTextNode (no file) (line 0:0)
     118                                 appendChild (no file) (line 0:0)
     119                                 children (no file) (line 0:0)
     120                                 printProfileNodeWithoutTime profiler-test-JS-resources.js (line 78:1)
     121                                    replace (no file) (line 0:0)
     122                                    createTextNode (no file) (line 0:0)
     123                                    appendChild (no file) (line 0:0)
     124                                    children (no file) (line 0:0)
     125            getElementById (no file) (line 0:0)
     126         notifyDone (no file) (line 0:0)
    127127
    128128
  • trunk/LayoutTests/fast/profiler/one-execution-context-expected.txt

    r39036 r163140  
    44
    55Profile title: One Execution Context
    6 Thread_1 (no file) (line 0)
    7    startTest one-execution-context.html (line 11)
    8       endTest profiler-test-JS-resources.js (line 1)
     6Thread_1 (no file) (line 0:0)
     7   startTest one-execution-context.html (line 11:1)
     8      endTest profiler-test-JS-resources.js (line 1:20)
    99
    1010
  • trunk/LayoutTests/fast/profiler/profile-calls-in-included-file-expected.txt

    r41429 r163140  
    44
    55Profile title: Profile call in included file
    6 Thread_1 (no file) (line 0)
    7    startProfile profiler-test-JS-resources.js (line 43)
    8    endTest profiler-test-JS-resources.js (line 1)
     6Thread_1 (no file) (line 0:0)
     7   startProfile profiler-test-JS-resources.js (line 43:1)
     8   endTest profiler-test-JS-resources.js (line 1:20)
    99
    1010
  • trunk/LayoutTests/fast/profiler/profile-with-no-title-expected.txt

    r45323 r163140  
    44
    55Profile title: org.webkit.profiles.user-initiated.1
    6 Thread_1 (no file) (line 0)
    7    startTest profile-with-no-title.html (line 11)
    8       endTest profiler-test-JS-resources.js (line 1)
     6Thread_1 (no file) (line 0:0)
     7   startTest profile-with-no-title.html (line 11:1)
     8      endTest profiler-test-JS-resources.js (line 1:20)
    99
    1010
  • trunk/LayoutTests/fast/profiler/profiling-from-a-nested-location-but-stop-profiling-outside-the-nesting-expected.txt

    r39036 r163140  
    44
    55Profile title: Profiling From A Nested Location But Stop Profiling Outside The Nesting
    6 Thread_1 (no file) (line 0)
    7    functionWichStartsTheProfiler profiling-from-a-nested-location-but-stop-profiling-outside-the-nesting.html (line 17)
    8    endTest profiler-test-JS-resources.js (line 1)
     6Thread_1 (no file) (line 0:0)
     7   functionWichStartsTheProfiler profiling-from-a-nested-location-but-stop-profiling-outside-the-nesting.html (line 17:1)
     8   endTest profiler-test-JS-resources.js (line 1:20)
    99
    1010
  • trunk/LayoutTests/fast/profiler/profiling-from-a-nested-location-expected.txt

    r39036 r163140  
    44
    55Profile title: Profiling From A Nested Location
    6 Thread_1 (no file) (line 0)
    7    functionWichStartsAndStopsTheProfiler profiling-from-a-nested-location.html (line 16)
    8       endTest profiler-test-JS-resources.js (line 1)
     6Thread_1 (no file) (line 0:0)
     7   functionWichStartsAndStopsTheProfiler profiling-from-a-nested-location.html (line 16:1)
     8      endTest profiler-test-JS-resources.js (line 1:20)
    99
    1010
  • trunk/LayoutTests/fast/profiler/resources/profiler-test-JS-resources.js

    r162796 r163140  
    7777function printProfileNodeWithoutTime(preElement, node, indentLevel)
    7878{
    79     if (node.functionName == "(idle)")
    80         return;
    81 
    8279    var space = "";
    8380    for (var i = 0; i < indentLevel; ++i)
     
    9087        strippedURL = "(no file)";
    9188
    92     var line = space + node.functionName + " " + strippedURL + " (line " + node.lineNumber + ")\n";
     89    var line = space + node.functionName + " " + strippedURL + " (line " + node.lineNumber + ":" + node.columnNumber + ")\n";
    9390    preElement.appendChild(document.createTextNode(line));
    9491
  • trunk/LayoutTests/fast/profiler/simple-event-call-expected.txt

    r39036 r163140  
    44
    55Profile title: A simple profile test where an event happens.
    6 Thread_1 (no file) (line 0)
    7    startTest simple-event-call.html (line 11)
    8       endTest profiler-test-JS-resources.js (line 1)
     6Thread_1 (no file) (line 0:0)
     7   startTest simple-event-call.html (line 11:1)
     8      endTest profiler-test-JS-resources.js (line 1:20)
    99
    1010
  • trunk/LayoutTests/fast/profiler/simple-no-level-change-expected.txt

    r39036 r163140  
    44
    55Profile title: A simple profile test where no scope chagnes
    6 Thread_1 (no file) (line 0)
    7    functionWichStartsAndStopsTheProfiler simple-no-level-change.html (line 16)
    8       getElementById (no file) (line 0)
     6Thread_1 (no file) (line 0:0)
     7   functionWichStartsAndStopsTheProfiler simple-no-level-change.html (line 16:1)
     8      getElementById (no file) (line 0:0)
    99
    1010
  • trunk/LayoutTests/fast/profiler/start-and-stop-profiler-multiple-times-expected.txt

    r106504 r163140  
    44
    55Profile title: Start the profiler the first time.
    6 Thread_1 (no file) (line 0)
    7    startTest start-and-stop-profiler-multiple-times.html (line 11)
    8       anonymousFunction profiler-test-JS-resources.js (line 29)
    9          insertNewText profiler-test-JS-resources.js (line 17)
    10             createElement (no file) (line 0)
    11             createTextNode (no file) (line 0)
    12             appendChild (no file) (line 0)
    13             getElementById (no file) (line 0)
    14       endTest profiler-test-JS-resources.js (line 1)
     6Thread_1 (no file) (line 0:0)
     7   startTest start-and-stop-profiler-multiple-times.html (line 11:1)
     8      anonymousFunction profiler-test-JS-resources.js (line 29:37)
     9         insertNewText profiler-test-JS-resources.js (line 17:26)
     10            createElement (no file) (line 0:0)
     11            createTextNode (no file) (line 0:0)
     12            appendChild (no file) (line 0:0)
     13            getElementById (no file) (line 0:0)
     14      endTest profiler-test-JS-resources.js (line 1:20)
    1515
    1616
    1717Profile title: Start the profiler the first time.
    18 Thread_1 (no file) (line 0)
    19    startTest start-and-stop-profiler-multiple-times.html (line 11)
    20       anonymousFunction profiler-test-JS-resources.js (line 29)
    21          insertNewText profiler-test-JS-resources.js (line 17)
    22             createElement (no file) (line 0)
    23             createTextNode (no file) (line 0)
    24             appendChild (no file) (line 0)
    25             getElementById (no file) (line 0)
    26       endTest profiler-test-JS-resources.js (line 1)
     18Thread_1 (no file) (line 0:0)
     19   startTest start-and-stop-profiler-multiple-times.html (line 11:1)
     20      anonymousFunction profiler-test-JS-resources.js (line 29:37)
     21         insertNewText profiler-test-JS-resources.js (line 17:26)
     22            createElement (no file) (line 0:0)
     23            createTextNode (no file) (line 0:0)
     24            appendChild (no file) (line 0:0)
     25            getElementById (no file) (line 0:0)
     26      endTest profiler-test-JS-resources.js (line 1:20)
    2727
    2828Profile title: Start the profiler the second time.
    29 Thread_1 (no file) (line 0)
    30    startTest start-and-stop-profiler-multiple-times.html (line 11)
    31       anonymousFunction profiler-test-JS-resources.js (line 29)
    32          insertNewText profiler-test-JS-resources.js (line 17)
    33             createElement (no file) (line 0)
    34             createTextNode (no file) (line 0)
    35             appendChild (no file) (line 0)
    36             getElementById (no file) (line 0)
    37       endTest profiler-test-JS-resources.js (line 1)
     29Thread_1 (no file) (line 0:0)
     30   startTest start-and-stop-profiler-multiple-times.html (line 11:1)
     31      anonymousFunction profiler-test-JS-resources.js (line 29:37)
     32         insertNewText profiler-test-JS-resources.js (line 17:26)
     33            createElement (no file) (line 0:0)
     34            createTextNode (no file) (line 0:0)
     35            appendChild (no file) (line 0:0)
     36            getElementById (no file) (line 0:0)
     37      endTest profiler-test-JS-resources.js (line 1:20)
    3838
    3939
    4040Profile title: Start the profiler the first time.
    41 Thread_1 (no file) (line 0)
    42    startTest start-and-stop-profiler-multiple-times.html (line 11)
    43       anonymousFunction profiler-test-JS-resources.js (line 29)
    44          insertNewText profiler-test-JS-resources.js (line 17)
    45             createElement (no file) (line 0)
    46             createTextNode (no file) (line 0)
    47             appendChild (no file) (line 0)
    48             getElementById (no file) (line 0)
    49       endTest profiler-test-JS-resources.js (line 1)
     41Thread_1 (no file) (line 0:0)
     42   startTest start-and-stop-profiler-multiple-times.html (line 11:1)
     43      anonymousFunction profiler-test-JS-resources.js (line 29:37)
     44         insertNewText profiler-test-JS-resources.js (line 17:26)
     45            createElement (no file) (line 0:0)
     46            createTextNode (no file) (line 0:0)
     47            appendChild (no file) (line 0:0)
     48            getElementById (no file) (line 0:0)
     49      endTest profiler-test-JS-resources.js (line 1:20)
    5050
    5151Profile title: Start the profiler the second time.
    52 Thread_1 (no file) (line 0)
    53    startTest start-and-stop-profiler-multiple-times.html (line 11)
    54       anonymousFunction profiler-test-JS-resources.js (line 29)
    55          insertNewText profiler-test-JS-resources.js (line 17)
    56             createElement (no file) (line 0)
    57             createTextNode (no file) (line 0)
    58             appendChild (no file) (line 0)
    59             getElementById (no file) (line 0)
    60       endTest profiler-test-JS-resources.js (line 1)
     52Thread_1 (no file) (line 0:0)
     53   startTest start-and-stop-profiler-multiple-times.html (line 11:1)
     54      anonymousFunction profiler-test-JS-resources.js (line 29:37)
     55         insertNewText profiler-test-JS-resources.js (line 17:26)
     56            createElement (no file) (line 0:0)
     57            createTextNode (no file) (line 0:0)
     58            appendChild (no file) (line 0:0)
     59            getElementById (no file) (line 0:0)
     60      endTest profiler-test-JS-resources.js (line 1:20)
    6161
    6262Profile title: Start the profiler the third time.
    63 Thread_1 (no file) (line 0)
    64    startTest start-and-stop-profiler-multiple-times.html (line 11)
    65       anonymousFunction profiler-test-JS-resources.js (line 29)
    66          insertNewText profiler-test-JS-resources.js (line 17)
    67             createElement (no file) (line 0)
    68             createTextNode (no file) (line 0)
    69             appendChild (no file) (line 0)
    70             getElementById (no file) (line 0)
    71       endTest profiler-test-JS-resources.js (line 1)
     63Thread_1 (no file) (line 0:0)
     64   startTest start-and-stop-profiler-multiple-times.html (line 11:1)
     65      anonymousFunction profiler-test-JS-resources.js (line 29:37)
     66         insertNewText profiler-test-JS-resources.js (line 17:26)
     67            createElement (no file) (line 0:0)
     68            createTextNode (no file) (line 0:0)
     69            appendChild (no file) (line 0:0)
     70            getElementById (no file) (line 0:0)
     71      endTest profiler-test-JS-resources.js (line 1:20)
    7272
    7373
  • trunk/LayoutTests/fast/profiler/start-and-stop-profiling-in-the-same-function-expected.txt

    r39036 r163140  
    44
    55Profile title: Profiling From A Nested Location
    6 Thread_1 (no file) (line 0)
    7    startTest start-and-stop-profiling-in-the-same-function.html (line 11)
    8       functionWichStopsTheProfiler start-and-stop-profiling-in-the-same-function.html (line 18)
     6Thread_1 (no file) (line 0:0)
     7   startTest start-and-stop-profiling-in-the-same-function.html (line 11:1)
     8      functionWichStopsTheProfiler start-and-stop-profiling-in-the-same-function.html (line 18:1)
    99
    1010
  • trunk/LayoutTests/fast/profiler/stop-profiling-after-setTimeout-expected.txt

    r162832 r163140  
    44
    55Profile title: Stop profiling from a timeout
    6 Thread_1 (no file) (line 0)
    7    onload stop-profiling-after-setTimeout.html (line 21)
    8       startTest stop-profiling-after-setTimeout.html (line 13)
    9          setTimeout (no file) (line 0)
    10    (program) stop-profiling-after-setTimeout.html (line 1)
    11       endTest profiler-test-JS-resources.js (line 1)
     6Thread_1 (no file) (line 0:0)
     7   onload stop-profiling-after-setTimeout.html (line 21:1)
     8      startTest stop-profiling-after-setTimeout.html (line 13:1)
     9         setTimeout (no file) (line 0:0)
     10   (program) stop-profiling-after-setTimeout.html (line 1:1)
     11      endTest profiler-test-JS-resources.js (line 1:20)
    1212
    1313
  • trunk/LayoutTests/fast/profiler/stop-then-function-call-expected.txt

    r39036 r163140  
    44
    55Profile title: Test
    6 Thread_1 (no file) (line 0)
    7    (program) (no file) (line 1)
    8       test stop-then-function-call.html (line 11)
     6Thread_1 (no file) (line 0:0)
     7   (program) (no file) (line 1:16)
     8      test stop-then-function-call.html (line 11:20)
    99
    1010
  • trunk/LayoutTests/fast/profiler/two-execution-contexts-expected.txt

    r39036 r163140  
    44
    55Profile title: Two Execution Contexts
    6 Thread_1 (no file) (line 0)
    7    startTest two-execution-contexts.html (line 11)
    8       intermediaryFunction two-execution-contexts.html (line 18)
    9          testEnd two-execution-contexts.html (line 33)
     6Thread_1 (no file) (line 0:0)
     7   startTest two-execution-contexts.html (line 11:1)
     8      intermediaryFunction two-execution-contexts.html (line 18:1)
     9         testEnd two-execution-contexts.html (line 33:20)
    1010
    1111
  • trunk/LayoutTests/fast/profiler/user-defined-function-calls-built-in-functions-expected.txt

    r39036 r163140  
    66
    77Profile title: User defined function calles built-in functions
    8 Thread_1 (no file) (line 0)
    9    startTest user-defined-function-calls-built-in-functions.html (line 11)
    10       createElement (no file) (line 0)
    11       createTextNode (no file) (line 0)
    12       appendChild (no file) (line 0)
    13       getElementById (no file) (line 0)
    14       endTest profiler-test-JS-resources.js (line 1)
     8Thread_1 (no file) (line 0:0)
     9   startTest user-defined-function-calls-built-in-functions.html (line 11:1)
     10      createElement (no file) (line 0:0)
     11      createTextNode (no file) (line 0:0)
     12      appendChild (no file) (line 0:0)
     13      getElementById (no file) (line 0:0)
     14      endTest profiler-test-JS-resources.js (line 1:20)
    1515
    1616
  • trunk/LayoutTests/fast/profiler/window-dot-eval-expected.txt

    r39036 r163140  
    44
    55Profile title: Call window.eval()
    6 Thread_1 (no file) (line 0)
    7    startTest window-dot-eval.html (line 11)
    8       evalFunction (no file) (line 1)
    9          insertNewText profiler-test-JS-resources.js (line 17)
    10             createElement (no file) (line 0)
    11             createTextNode (no file) (line 0)
    12             appendChild (no file) (line 0)
    13             getElementById (no file) (line 0)
    14       endTest profiler-test-JS-resources.js (line 1)
     6Thread_1 (no file) (line 0:0)
     7   startTest window-dot-eval.html (line 11:1)
     8      evalFunction (no file) (line 1:25)
     9         insertNewText profiler-test-JS-resources.js (line 17:26)
     10            createElement (no file) (line 0:0)
     11            createTextNode (no file) (line 0:0)
     12            appendChild (no file) (line 0:0)
     13            getElementById (no file) (line 0:0)
     14      endTest profiler-test-JS-resources.js (line 1:20)
    1515
    1616
  • trunk/Source/JavaScriptCore/ChangeLog

    r163139 r163140  
     12014-01-28  Timothy Hatcher  <timothy@apple.com>
     2
     3        Add column number and call timing support to LegacyProfiler.
     4
     5        https://bugs.webkit.org/show_bug.cgi?id=127764
     6
     7        Reviewed by Joseph Pecoraro.
     8
     9        * interpreter/Interpreter.cpp:
     10        (JSC::Interpreter::execute):
     11        * profiler/CallIdentifier.h:
     12        (JSC::CallIdentifier::CallIdentifier):
     13        (JSC::CallIdentifier::functionName):
     14        (JSC::CallIdentifier::url):
     15        (JSC::CallIdentifier::lineNumber):
     16        (JSC::CallIdentifier::columnNumber):
     17        (JSC::CallIdentifier::operator==):
     18        (JSC::CallIdentifier::operator!=):
     19        (JSC::CallIdentifier::Hash::hash):
     20        (WTF::HashTraits<JSC::CallIdentifier>::constructDeletedValue):
     21        (WTF::HashTraits<JSC::CallIdentifier>::isDeletedValue):
     22        * profiler/LegacyProfiler.cpp:
     23        (JSC::LegacyProfiler::willExecute):
     24        (JSC::LegacyProfiler::didExecute):
     25        (JSC::LegacyProfiler::exceptionUnwind):
     26        (JSC::LegacyProfiler::createCallIdentifier):
     27        (JSC::createCallIdentifierFromFunctionImp):
     28        * profiler/LegacyProfiler.h:
     29        * profiler/Profile.cpp:
     30        (JSC::Profile::Profile):
     31        * profiler/Profile.h:
     32        (JSC::Profile::uid):
     33        (JSC::Profile::idleTime):
     34        (JSC::Profile::setIdleTime):
     35        * profiler/ProfileGenerator.cpp:
     36        (JSC::AddParentForConsoleStartFunctor::operator()):
     37        (JSC::ProfileGenerator::addParentForConsoleStart):
     38        (JSC::ProfileGenerator::willExecute):
     39        (JSC::ProfileGenerator::didExecute):
     40        (JSC::ProfileGenerator::stopProfiling):
     41        (JSC::ProfileGenerator::removeProfileStart):
     42        (JSC::ProfileGenerator::removeProfileEnd):
     43        * profiler/ProfileNode.cpp:
     44        (JSC::ProfileNode::ProfileNode):
     45        (JSC::ProfileNode::stopProfiling):
     46        (JSC::ProfileNode::endAndRecordCall):
     47        (JSC::ProfileNode::startTimer):
     48        (JSC::ProfileNode::debugPrintData):
     49        * profiler/ProfileNode.h:
     50        (JSC::ProfileNode::Call::Call):
     51        (JSC::ProfileNode::Call::startTime):
     52        (JSC::ProfileNode::Call::setStartTime):
     53        (JSC::ProfileNode::Call::totalTime):
     54        (JSC::ProfileNode::Call::setTotalTime):
     55        (JSC::ProfileNode::id):
     56        (JSC::ProfileNode::functionName):
     57        (JSC::ProfileNode::url):
     58        (JSC::ProfileNode::lineNumber):
     59        (JSC::ProfileNode::columnNumber):
     60        (JSC::ProfileNode::calls):
     61        (JSC::ProfileNode::lastCall):
     62        (JSC::ProfileNode::numberOfCalls):
     63
    1642014-01-26  Timothy Hatcher  <timothy@apple.com>
    265
  • trunk/Source/JavaScriptCore/interpreter/Interpreter.cpp

    r163027 r163140  
    11/*
    2  * Copyright (C) 2008, 2009, 2010, 2012, 2013 Apple Inc. All rights reserved.
     2 * Copyright (C) 2008, 2009, 2010, 2012, 2013, 2014 Apple Inc. All rights reserved.
    33 * Copyright (C) 2008 Cameron Zwarich <cwzwarich@uwaterloo.ca>
    44 *
     
    891891
    892892    if (LegacyProfiler* profiler = vm.enabledProfiler())
    893         profiler->willExecute(callFrame, program->sourceURL(), program->lineNo());
     893        profiler->willExecute(callFrame, program->sourceURL(), program->lineNo(), program->startColumn());
    894894
    895895    // Execute the code:
     
    903903
    904904    if (LegacyProfiler* profiler = vm.enabledProfiler())
    905         profiler->didExecute(callFrame, program->sourceURL(), program->lineNo());
     905        profiler->didExecute(callFrame, program->sourceURL(), program->lineNo(), program->startColumn());
    906906
    907907    return checkedReturn(result);
     
    11701170
    11711171    if (LegacyProfiler* profiler = vm.enabledProfiler())
    1172         profiler->willExecute(callFrame, eval->sourceURL(), eval->lineNo());
     1172        profiler->willExecute(callFrame, eval->sourceURL(), eval->lineNo(), eval->startColumn());
    11731173
    11741174    // Execute the code:
     
    11821182
    11831183    if (LegacyProfiler* profiler = vm.enabledProfiler())
    1184         profiler->didExecute(callFrame, eval->sourceURL(), eval->lineNo());
     1184        profiler->didExecute(callFrame, eval->sourceURL(), eval->lineNo(), eval->startColumn());
    11851185
    11861186    return checkedReturn(result);
  • trunk/Source/JavaScriptCore/profiler/CallIdentifier.h

    r127191 r163140  
    11/*
    2  * Copyright (C) 2008 Apple Inc. All Rights Reserved.
     2 * Copyright (C) 2008, 2014 Apple Inc. All Rights Reserved.
    33 *
    44 * Redistribution and use in source and binary forms, with or without
     
    3737        WTF_MAKE_FAST_ALLOCATED;
    3838    public:
    39         String m_name;
    40         String m_url;
    41         unsigned m_lineNumber;
    42 
    4339        CallIdentifier()
    4440            : m_lineNumber(0)
     41            , m_columnNumber(0)
    4542        {
    4643        }
    4744
    48         CallIdentifier(const String& name, const String& url, int lineNumber)
    49             : m_name(name)
     45        CallIdentifier(const String& functionName, const String& url, unsigned lineNumber, unsigned columnNumber)
     46            : m_functionName(functionName)
    5047            , m_url(!url.isNull() ? url : "")
    5148            , m_lineNumber(lineNumber)
     49            , m_columnNumber(columnNumber)
    5250        {
    5351        }
    5452
    55         inline bool operator==(const CallIdentifier& ci) const { return ci.m_lineNumber == m_lineNumber && ci.m_name == m_name && ci.m_url == m_url; }
    56         inline bool operator!=(const CallIdentifier& ci) const { return !(*this == ci); }
     53        const String& functionName() const { return m_functionName; }
     54
     55        const String& url() const { return m_url; }
     56        unsigned lineNumber() const { return m_lineNumber; }
     57        unsigned columnNumber() const { return m_columnNumber; }
     58
     59        inline bool operator==(const CallIdentifier& other) const { return other.m_lineNumber == m_lineNumber && other.m_columnNumber == m_columnNumber && other.m_functionName == m_functionName && other.m_url == m_url; }
     60        inline bool operator!=(const CallIdentifier& other) const { return !(*this == other); }
    5761
    5862        struct Hash {
    5963            static unsigned hash(const CallIdentifier& key)
    6064            {
    61                 unsigned hashCodes[3] = {
    62                     key.m_name.impl()->hash(),
     65                unsigned hashCodes[4] = {
     66                    key.m_functionName.impl()->hash(),
    6367                    key.m_url.impl()->hash(),
    64                     key.m_lineNumber
     68                    key.m_lineNumber,
     69                    key.m_columnNumber
    6570                };
    6671                return StringHasher::hashMemory<sizeof(hashCodes)>(hashCodes);
     
    7782        const char* c_str() const { return m_name.utf8().data(); }
    7883#endif
     84
     85    private:
     86        String m_functionName;
     87        String m_url;
     88        unsigned m_lineNumber;
     89        unsigned m_columnNumber;
    7990    };
    8091
     
    8899        static void constructDeletedValue(JSC::CallIdentifier& slot)
    89100        {
    90             new (NotNull, &slot) JSC::CallIdentifier(String(), String(), std::numeric_limits<unsigned>::max());
     101            new (NotNull, &slot) JSC::CallIdentifier(String(), String(), std::numeric_limits<unsigned>::max(), std::numeric_limits<unsigned>::max());
    91102        }
     103
    92104        static bool isDeletedValue(const JSC::CallIdentifier& value)
    93105        {
    94             return value.m_name.isNull() && value.m_url.isNull() && value.m_lineNumber == std::numeric_limits<unsigned>::max();
     106            return value.functionName().isNull() && value.url().isNull() && value.lineNumber() == std::numeric_limits<unsigned>::max() && value.columnNumber() == std::numeric_limits<unsigned>::max();
    95107        }
    96108    };
     
    99111
    100112#endif  // CallIdentifier_h
    101 
  • trunk/Source/JavaScriptCore/profiler/LegacyProfiler.cpp

    r162940 r163140  
    11/*
    2  * Copyright (C) 2008, 2012 Apple Inc. All rights reserved.
     2 * Copyright (C) 2008, 2012, 2014 Apple Inc. All rights reserved.
    33 *
    44 * Redistribution and use in source and binary forms, with or without
     
    4848static unsigned ProfilesUID = 0;
    4949
    50 static CallIdentifier createCallIdentifierFromFunctionImp(ExecState*, JSObject*, const String& defaultSourceURL, int defaultLineNumber);
     50static CallIdentifier createCallIdentifierFromFunctionImp(ExecState*, JSObject*, const String& defaultSourceURL, unsigned defaultLineNumber, unsigned defaultColumnNumber);
    5151
    5252LegacyProfiler* LegacyProfiler::s_sharedLegacyProfiler = 0;
     
    129129    ASSERT(!m_currentProfiles.isEmpty());
    130130
    131     dispatchFunctionToProfiles(callerCallFrame, m_currentProfiles, &ProfileGenerator::willExecute, createCallIdentifier(callerCallFrame, function, "", 0), callerCallFrame->lexicalGlobalObject()->profileGroup());
     131    dispatchFunctionToProfiles(callerCallFrame, m_currentProfiles, &ProfileGenerator::willExecute, createCallIdentifier(callerCallFrame, function, ASCIILiteral(""), 0, 0), callerCallFrame->lexicalGlobalObject()->profileGroup());
    132132}
    133133
    134 void LegacyProfiler::willExecute(ExecState* callerCallFrame, const String& sourceURL, int startingLineNumber)
     134void LegacyProfiler::willExecute(ExecState* callerCallFrame, const String& sourceURL, unsigned startingLineNumber, unsigned startingColumnNumber)
    135135{
    136136    ASSERT(!m_currentProfiles.isEmpty());
    137137
    138     CallIdentifier callIdentifier = createCallIdentifier(callerCallFrame, JSValue(), sourceURL, startingLineNumber);
     138    CallIdentifier callIdentifier = createCallIdentifier(callerCallFrame, JSValue(), sourceURL, startingLineNumber, startingColumnNumber);
    139139
    140140    dispatchFunctionToProfiles(callerCallFrame, m_currentProfiles, &ProfileGenerator::willExecute, callIdentifier, callerCallFrame->lexicalGlobalObject()->profileGroup());
     
    145145    ASSERT(!m_currentProfiles.isEmpty());
    146146
    147     dispatchFunctionToProfiles(callerCallFrame, m_currentProfiles, &ProfileGenerator::didExecute, createCallIdentifier(callerCallFrame, function, "", 0), callerCallFrame->lexicalGlobalObject()->profileGroup());
     147    dispatchFunctionToProfiles(callerCallFrame, m_currentProfiles, &ProfileGenerator::didExecute, createCallIdentifier(callerCallFrame, function, ASCIILiteral(""), 0, 0), callerCallFrame->lexicalGlobalObject()->profileGroup());
    148148}
    149149
    150 void LegacyProfiler::didExecute(ExecState* callerCallFrame, const String& sourceURL, int startingLineNumber)
     150void LegacyProfiler::didExecute(ExecState* callerCallFrame, const String& sourceURL, unsigned startingLineNumber, unsigned startingColumnNumber)
    151151{
    152152    ASSERT(!m_currentProfiles.isEmpty());
    153153
    154     dispatchFunctionToProfiles(callerCallFrame, m_currentProfiles, &ProfileGenerator::didExecute, createCallIdentifier(callerCallFrame, JSValue(), sourceURL, startingLineNumber), callerCallFrame->lexicalGlobalObject()->profileGroup());
     154    dispatchFunctionToProfiles(callerCallFrame, m_currentProfiles, &ProfileGenerator::didExecute, createCallIdentifier(callerCallFrame, JSValue(), sourceURL, startingLineNumber, startingColumnNumber), callerCallFrame->lexicalGlobalObject()->profileGroup());
    155155}
    156156
     
    159159    ASSERT(!m_currentProfiles.isEmpty());
    160160
    161     dispatchFunctionToProfiles(handlerCallFrame, m_currentProfiles, &ProfileGenerator::exceptionUnwind, createCallIdentifier(handlerCallFrame, JSValue(), "", 0), handlerCallFrame->lexicalGlobalObject()->profileGroup());
     161    dispatchFunctionToProfiles(handlerCallFrame, m_currentProfiles, &ProfileGenerator::exceptionUnwind, createCallIdentifier(handlerCallFrame, JSValue(), ASCIILiteral(""), 0, 0), handlerCallFrame->lexicalGlobalObject()->profileGroup());
    162162}
    163163
    164 CallIdentifier LegacyProfiler::createCallIdentifier(ExecState* exec, JSValue functionValue, const String& defaultSourceURL, int defaultLineNumber)
     164CallIdentifier LegacyProfiler::createCallIdentifier(ExecState* exec, JSValue functionValue, const String& defaultSourceURL, unsigned defaultLineNumber, unsigned defaultColumnNumber)
    165165{
    166166    if (!functionValue)
    167         return CallIdentifier(GlobalCodeExecution, defaultSourceURL, defaultLineNumber);
     167        return CallIdentifier(ASCIILiteral(GlobalCodeExecution), defaultSourceURL, defaultLineNumber, defaultColumnNumber);
    168168    if (!functionValue.isObject())
    169         return CallIdentifier("(unknown)", defaultSourceURL, defaultLineNumber);
     169        return CallIdentifier(ASCIILiteral("(unknown)"), defaultSourceURL, defaultLineNumber, defaultColumnNumber);
    170170    if (asObject(functionValue)->inherits(JSFunction::info()) || asObject(functionValue)->inherits(InternalFunction::info()))
    171         return createCallIdentifierFromFunctionImp(exec, asObject(functionValue), defaultSourceURL, defaultLineNumber);
    172     return CallIdentifier(makeString("(", asObject(functionValue)->methodTable()->className(asObject(functionValue)), " object)"), defaultSourceURL, defaultLineNumber);
     171        return createCallIdentifierFromFunctionImp(exec, asObject(functionValue), defaultSourceURL, defaultLineNumber, defaultColumnNumber);
     172    return CallIdentifier(asObject(functionValue)->methodTable()->className(asObject(functionValue)), defaultSourceURL, defaultLineNumber, defaultColumnNumber);
    173173}
    174174
    175 CallIdentifier createCallIdentifierFromFunctionImp(ExecState* exec, JSObject* function, const String& defaultSourceURL, int defaultLineNumber)
     175CallIdentifier createCallIdentifierFromFunctionImp(ExecState* exec, JSObject* function, const String& defaultSourceURL, unsigned defaultLineNumber, unsigned defaultColumnNumber)
    176176{
    177177    const String& name = getCalculatedDisplayName(exec, function);
    178178    JSFunction* jsFunction = jsDynamicCast<JSFunction*>(function);
    179179    if (jsFunction && !jsFunction->isHostFunction())
    180         return CallIdentifier(name.isEmpty() ? AnonymousFunction : name, jsFunction->jsExecutable()->sourceURL(), jsFunction->jsExecutable()->lineNo());
    181     return CallIdentifier(name.isEmpty() ? AnonymousFunction : name, defaultSourceURL, defaultLineNumber);
     180        return CallIdentifier(name.isEmpty() ? ASCIILiteral(AnonymousFunction) : name, jsFunction->jsExecutable()->sourceURL(), jsFunction->jsExecutable()->lineNo(), jsFunction->jsExecutable()->startColumn());
     181    return CallIdentifier(name.isEmpty() ? ASCIILiteral(AnonymousFunction) : name, defaultSourceURL, defaultLineNumber, defaultColumnNumber);
    182182}
    183183
  • trunk/Source/JavaScriptCore/profiler/LegacyProfiler.h

    r157653 r163140  
    11/*
    2  * Copyright (C) 2008, 2012 Apple Inc. All rights reserved.
     2 * Copyright (C) 2008, 2012, 2014 Apple Inc. All rights reserved.
    33 *
    44 * Redistribution and use in source and binary forms, with or without
     
    4949public:
    5050    JS_EXPORT_PRIVATE static LegacyProfiler* profiler();
    51     static CallIdentifier createCallIdentifier(ExecState*, JSValue, const WTF::String& sourceURL, int lineNumber);
     51    static CallIdentifier createCallIdentifier(ExecState*, JSValue, const WTF::String& sourceURL, unsigned defaultLineNumber, unsigned defaultColumnNumber);
    5252
    5353    JS_EXPORT_PRIVATE void startProfiling(ExecState*, const WTF::String& title);
     
    5656
    5757    void willExecute(ExecState* callerCallFrame, JSValue function);
    58     void willExecute(ExecState* callerCallFrame, const WTF::String& sourceURL, int startingLineNumber);
     58    void willExecute(ExecState* callerCallFrame, const WTF::String& sourceURL, unsigned startingLineNumber, unsigned startingColumnNumber);
    5959    void didExecute(ExecState* callerCallFrame, JSValue function);
    60     void didExecute(ExecState* callerCallFrame, const WTF::String& sourceURL, int startingLineNumber);
     60    void didExecute(ExecState* callerCallFrame, const WTF::String& sourceURL, unsigned startingLineNumber, unsigned startingColumnNumber);
    6161
    6262    void exceptionUnwind(ExecState* handlerCallFrame);
  • trunk/Source/JavaScriptCore/profiler/Profile.cpp

    r162796 r163140  
    11/*
    2  * Copyright (C) 2008 Apple Inc. All Rights Reserved.
     2 * Copyright (C) 2008, 2014 Apple Inc. All Rights Reserved.
    33 *
    44 * Redistribution and use in source and binary forms, with or without
     
    4040    : m_title(title)
    4141    , m_uid(uid)
     42    , m_idleTime(0)
    4243{
    4344    // FIXME: When multi-threading is supported this will be a vector and calls
    4445    // into the profiler will need to know which thread it is executing on.
    45     m_head = ProfileNode::create(0, CallIdentifier("Thread_1", String(), 0), 0, 0);
     46    m_head = ProfileNode::create(0, CallIdentifier("Thread_1", String(), 0, 0), 0, 0);
    4647}
    4748
  • trunk/Source/JavaScriptCore/profiler/Profile.h

    r162796 r163140  
    11/*
    2  * Copyright (C) 2008 Apple Inc. All Rights Reserved.
     2 * Copyright (C) 2008, 2014 Apple Inc. All Rights Reserved.
    33 *
    44 * Redistribution and use in source and binary forms, with or without
     
    4040
    4141        const String& title() const { return m_title; }
     42        unsigned uid() const { return m_uid; }
     43
    4244        ProfileNode* head() const { return m_head.get(); }
    4345        void setHead(PassRefPtr<ProfileNode> head) { m_head = head; }
     46
    4447        double totalTime() const { return m_head->totalTime(); }
    45         unsigned int uid() const { return m_uid; }
     48
     49        double idleTime() const { return m_idleTime; }
     50        void setIdleTime(double idleTime) { m_idleTime = idleTime; }
    4651
    4752        void forEach(void (ProfileNode::*)());
     
    6267        RefPtr<ProfileNode> m_head;
    6368        unsigned int m_uid;
     69        double m_idleTime;
    6470    };
    6571
  • trunk/Source/JavaScriptCore/profiler/ProfileGenerator.cpp

    r162796 r163140  
    11/*
    2  * Copyright (C) 2008 Apple Inc. All Rights Reserved.
     2 * Copyright (C) 2008, 2014 Apple Inc. All Rights Reserved.
    33 *
    44 * Redistribution and use in source and binary forms, with or without
     
    4141namespace JSC {
    4242
    43 static const char* NonJSExecution = "(idle)";
    44 
    4543PassRefPtr<ProfileGenerator> ProfileGenerator::create(ExecState* exec, const String& title, unsigned uid)
    4644{
     
    5149    : m_origin(exec ? exec->lexicalGlobalObject() : 0)
    5250    , m_profileGroup(exec ? exec->lexicalGlobalObject()->profileGroup() : 0)
     51    , m_foundConsoleStartParent(false)
    5352{
    5453    m_profile = Profile::create(title, uid);
     
    7978
    8079        unsigned line = 0;
    81         unsigned unusedColumn = 0;
    82         visitor->computeLineAndColumn(line, unusedColumn);
    83         m_currentNode = ProfileNode::create(m_exec, LegacyProfiler::createCallIdentifier(m_exec, visitor->callee(), visitor->sourceURL(), line), m_head.get(), m_head.get());
     80        unsigned column = 0;
     81        visitor->computeLineAndColumn(line, column);
     82        m_currentNode = ProfileNode::create(m_exec, LegacyProfiler::createCallIdentifier(m_exec, visitor->callee(), visitor->sourceURL(), line, column), m_head.get(), m_head.get());
    8483        m_head->insertNode(m_currentNode.get());
    8584
     
    101100    exec->iterate(functor);
    102101
    103     if (!functor.foundParent()) {
    104         m_currentNode = ProfileNode::create(exec, LegacyProfiler::createCallIdentifier(exec, JSValue(), String(), 0), m_head.get(), m_head.get());
    105         m_head->insertNode(m_currentNode.get());
    106     }
     102    m_foundConsoleStartParent = functor.foundParent();
    107103}
    108104
     
    115111{
    116112    if (JAVASCRIPTCORE_PROFILE_WILL_EXECUTE_ENABLED()) {
    117         CString name = callIdentifier.m_name.utf8();
    118         CString url = callIdentifier.m_url.utf8();
    119         JAVASCRIPTCORE_PROFILE_WILL_EXECUTE(m_profileGroup, const_cast<char*>(name.data()), const_cast<char*>(url.data()), callIdentifier.m_lineNumber);
     113        CString name = callIdentifier.functionName().utf8();
     114        CString url = callIdentifier.url().utf8();
     115        JAVASCRIPTCORE_PROFILE_WILL_EXECUTE(m_profileGroup, const_cast<char*>(name.data()), const_cast<char*>(url.data()), callIdentifier.lineNumber());
    120116    }
    121117
     
    130126{
    131127    if (JAVASCRIPTCORE_PROFILE_DID_EXECUTE_ENABLED()) {
    132         CString name = callIdentifier.m_name.utf8();
    133         CString url = callIdentifier.m_url.utf8();
    134         JAVASCRIPTCORE_PROFILE_DID_EXECUTE(m_profileGroup, const_cast<char*>(name.data()), const_cast<char*>(url.data()), callIdentifier.m_lineNumber);
     128        CString name = callIdentifier.functionName().utf8();
     129        CString url = callIdentifier.url().utf8();
     130        JAVASCRIPTCORE_PROFILE_DID_EXECUTE(m_profileGroup, const_cast<char*>(name.data()), const_cast<char*>(url.data()), callIdentifier.lineNumber());
    135131    }
    136132
     
    141137    if (m_currentNode->callIdentifier() != callIdentifier) {
    142138        RefPtr<ProfileNode> returningNode = ProfileNode::create(callerCallFrame, callIdentifier, m_head.get(), m_currentNode.get());
    143         returningNode->setStartTime(m_currentNode->startTime());
     139        returningNode->lastCall().setStartTime(m_currentNode->lastCall().startTime());
    144140        returningNode->didExecute();
    145141        m_currentNode->insertNode(returningNode.release());
     
    165161    m_profile->forEach(&ProfileNode::stopProfiling);
    166162
    167     removeProfileStart();
    168     removeProfileEnd();
     163    if (m_foundConsoleStartParent) {
     164        removeProfileStart();
     165        removeProfileEnd();
     166    }
    169167
    170168    ASSERT(m_currentNode);
     
    174172    m_currentNode = m_currentNode->parent();
    175173
    176    if (double headSelfTime = m_head->selfTime()) {
    177         RefPtr<ProfileNode> idleNode = ProfileNode::create(0, CallIdentifier(NonJSExecution, String(), 0), m_head.get(), m_head.get());
    178 
    179         idleNode->setTotalTime(headSelfTime);
    180         idleNode->setSelfTime(headSelfTime);
    181 
     174    if (double headSelfTime = m_head->selfTime()) {
    182175        m_head->setSelfTime(0.0);
    183         m_head->addChild(idleNode.release());
     176        m_profile->setIdleTime(headSelfTime);
    184177    }
    185178}
     
    192185        currentNode = next;
    193186
    194     if (currentNode->callIdentifier().m_name != "profile")
     187    if (currentNode->callIdentifier().functionName() != "profile")
    195188        return;
    196189
     
    207200        currentNode = next;
    208201
    209     if (currentNode->callIdentifier().m_name != "profileEnd")
     202    if (currentNode->callIdentifier().functionName() != "profileEnd")
    210203        return;
    211204
  • trunk/Source/JavaScriptCore/profiler/ProfileGenerator.h

    r127191 r163140  
    7373        RefPtr<ProfileNode> m_head;
    7474        RefPtr<ProfileNode> m_currentNode;
     75        bool m_foundConsoleStartParent;
    7576    };
    7677
  • trunk/Source/JavaScriptCore/profiler/ProfileNode.cpp

    r162797 r163140  
    11/*
    2  * Copyright (C) 2008 Apple Inc. All rights reserved.
     2 * Copyright (C) 2008, 2014 Apple Inc. All rights reserved.
    33 *
    44 * Redistribution and use in source and binary forms, with or without
     
    3535#include <wtf/text/StringHash.h>
    3636
    37 #if OS(WINDOWS)
    38 #include <windows.h>
    39 #endif
    40 
    4137using namespace WTF;
    4238
    4339namespace JSC {
    44 
    45 static double getCount()
    46 {
    47 #if OS(WINDOWS)
    48     static LARGE_INTEGER frequency;
    49     if (!frequency.QuadPart)
    50         QueryPerformanceFrequency(&frequency);
    51     LARGE_INTEGER counter;
    52     QueryPerformanceCounter(&counter);
    53     return static_cast<double>(counter.QuadPart) / frequency.QuadPart;
    54 #else
    55     return currentTimeMS();
    56 #endif
    57 }
    5840
    5941ProfileNode::ProfileNode(ExecState* callerCallFrame, const CallIdentifier& callIdentifier, ProfileNode* headNode, ProfileNode* parentNode)
     
    6244    , m_head(headNode)
    6345    , m_parent(parentNode)
    64     , m_nextSibling(0)
    65     , m_startTime(0.0)
    66     , m_totalTime(0.0)
    67     , m_selfTime(0.0)
    68     , m_numberOfCalls(0)
     46    , m_nextSibling(nullptr)
     47    , m_totalTime(0)
     48    , m_selfTime(0)
    6949{
    7050    startTimer();
     
    7757    , m_parent(nodeToCopy->parent())
    7858    , m_nextSibling(0)
    79     , m_startTime(0.0)
    8059    , m_totalTime(nodeToCopy->totalTime())
    8160    , m_selfTime(nodeToCopy->selfTime())
    82     , m_numberOfCalls(nodeToCopy->numberOfCalls())
     61    , m_calls(nodeToCopy->calls())
    8362{
    8463}
     
    143122void ProfileNode::stopProfiling()
    144123{
    145     if (m_startTime)
     124    ASSERT(!m_calls.isEmpty());
     125
     126    if (isnan(m_calls.last().totalTime()))
    146127        endAndRecordCall();
    147 
    148     ASSERT(m_selfTime == 0.0 && m_startTime == 0.0);
    149128
    150129    // Because we iterate in post order all of our children have been stopped before us.
     
    168147void ProfileNode::endAndRecordCall()
    169148{
    170     m_totalTime += m_startTime ? getCount() - m_startTime : 0.0;
    171     m_startTime = 0.0;
    172 
    173     ++m_numberOfCalls;
     149    Call& last = lastCall();
     150    ASSERT(isnan(last.totalTime()));
     151
     152    last.setTotalTime(currentTime() - last.startTime());
     153
     154    m_totalTime += last.totalTime();
    174155}
    175156
    176157void ProfileNode::startTimer()
    177158{
    178     if (!m_startTime)
    179         m_startTime = getCount();
     159    m_calls.append(Call(currentTime()));
    180160}
    181161
     
    194174        dataLogF("  ");
    195175
    196     dataLogF("Function Name %s %d SelfTime %.3fms/%.3f%% TotalTime %.3fms/%.3f%% Next Sibling %s\n",
    197         functionName().utf8().data(), 
    198         m_numberOfCalls, m_selfTime, selfPercent(), m_totalTime, totalPercent(),
     176    dataLogF("Function Name %s %zu SelfTime %.3fms/%.3f%% TotalTime %.3fms/%.3f%% Next Sibling %s\n",
     177        functionName().utf8().data(),
     178        numberOfCalls(), m_selfTime, selfPercent(), m_totalTime, totalPercent(),
    199179        m_nextSibling ? m_nextSibling->functionName().utf8().data() : "");
    200180
  • trunk/Source/JavaScriptCore/profiler/ProfileNode.h

    r162796 r163140  
    11/*
    2  * Copyright (C) 2008 Apple Inc. All rights reserved.
     2 * Copyright (C) 2008, 2014 Apple Inc. All rights reserved.
    33 *
    44 * Redistribution and use in source and binary forms, with or without
     
    5555        }
    5656
     57        struct Call {
     58        public:
     59            Call(double startTime, double totalTime = NAN)
     60                : m_startTime(startTime)
     61                , m_totalTime(totalTime)
     62            {
     63            }
     64
     65            double startTime() const { return m_startTime; }
     66            void setStartTime(double time) { m_startTime = time; }
     67
     68            double totalTime() const { return m_totalTime; }
     69            void setTotalTime(double time) { m_totalTime = time; }
     70
     71        private:
     72            double m_startTime;
     73            double m_totalTime;
     74        };
     75
    5776        bool operator==(ProfileNode* node) { return m_callIdentifier == node->callIdentifier(); }
    5877
     
    6584        ExecState* callerCallFrame() const { return m_callerCallFrame; }
    6685        const CallIdentifier& callIdentifier() const { return m_callIdentifier; }
    67         unsigned long callUID() const { return m_callIdentifier.hash(); };
    68         const String& functionName() const { return m_callIdentifier.m_name; }
    69         const String& url() const { return m_callIdentifier.m_url; }
    70         unsigned lineNumber() const { return m_callIdentifier.m_lineNumber; }
     86        unsigned id() const { return m_callIdentifier.hash(); }
     87        const String& functionName() const { return m_callIdentifier.functionName(); }
     88        const String& url() const { return m_callIdentifier.url(); }
     89        unsigned lineNumber() const { return m_callIdentifier.lineNumber(); }
     90        unsigned columnNumber() const { return m_callIdentifier.columnNumber(); }
    7191
    7292        // Relationships
     
    81101
    82102        // Time members
    83         double startTime() const { return m_startTime; }
    84         void setStartTime(double startTime) { m_startTime = startTime; }
    85 
    86103        double totalTime() const { return m_totalTime; }
    87104        void setTotalTime(double time) { m_totalTime = time; }
     
    93110        double selfPercent() const { return (m_selfTime / (m_head ? m_head->totalTime() : totalTime())) * 100.0; }
    94111
    95         unsigned numberOfCalls() const { return m_numberOfCalls; }
     112        Vector<Call> calls() const { return m_calls; }
     113        Call& lastCall() { ASSERT(!m_calls.isEmpty()); return m_calls.last(); }
     114        size_t numberOfCalls() const { return m_calls.size(); }
    96115
    97116        // Children members
     
    104123
    105124        ProfileNode* traverseNextNodePostOrder() const;
    106 
    107         void endAndRecordCall();
    108125
    109126#ifndef NDEBUG
     
    121138        void startTimer();
    122139        void resetChildrensSiblings();
     140        void endAndRecordCall();
    123141
    124142        ExecState* m_callerCallFrame;
     
    128146        ProfileNode* m_nextSibling;
    129147
    130         double m_startTime;
    131148        double m_totalTime;
    132149        double m_selfTime;
    133         unsigned m_numberOfCalls;
    134150
     151        Vector<Call, 1> m_calls;
    135152        Vector<RefPtr<ProfileNode>> m_children;
    136153    };
  • trunk/Source/WebCore/ChangeLog

    r163139 r163140  
     12014-01-28  Timothy Hatcher  <timothy@apple.com>
     2
     3        Add column number and call timing support to LegacyProfiler.
     4
     5        https://bugs.webkit.org/show_bug.cgi?id=127764
     6
     7        Reviewed by Joseph Pecoraro.
     8
     9        * bindings/js/ScriptProfile.cpp:
     10        (WebCore::ScriptProfile::idleTime):
     11        (WebCore::buildInspectorObjectFor):
     12        (WebCore::ScriptProfile::buildInspectorObject):
     13        * bindings/js/ScriptProfile.h:
     14        * inspector/InspectorHeapProfilerAgent.cpp:
     15        (WebCore::InspectorHeapProfilerAgent::createSnapshotHeader):
     16        * inspector/InspectorProfilerAgent.cpp:
     17        (WebCore::InspectorProfilerAgent::createSnapshotHeader):
     18        (WebCore::InspectorProfilerAgent::getCPUProfile):
     19        * inspector/ScriptProfileNode.idl:
     20        * inspector/TimelineRecordFactory.cpp:
     21        (WebCore::TimelineRecordFactory::appendProfile):
     22        * inspector/protocol/Profiler.json:
     23
    1242014-01-26  Timothy Hatcher  <timothy@apple.com>
    225
  • trunk/Source/WebCore/bindings/js/ScriptProfile.cpp

    r163024 r163140  
    11/*
    2  * Copyright (C) 2010 Apple Inc. All rights reserved.
     2 * Copyright (C) 2010, 2014 Apple Inc. All rights reserved.
    33 * Copyright (C) 2010 Google Inc. All rights reserved.
    44 *
     
    6969double ScriptProfile::idleTime() const
    7070{
    71     return 0.0;
     71    return m_profile->idleTime();
    7272}
    7373
    7474#if ENABLE(INSPECTOR)
    75 static PassRefPtr<Inspector::TypeBuilder::Profiler::CPUProfileNode> buildInspectorObjectFor(const JSC::ProfileNode* node)
     75static PassRefPtr<Inspector::TypeBuilder::Profiler::CPUProfileNodeCall> buildInspectorObjectFor(const JSC::ProfileNode::Call& call)
    7676{
    77     typedef Vector<RefPtr<JSC::ProfileNode>> ProfileNodesList;
    78     const ProfileNodesList& nodeChildren = node->children();
    79     ProfileNodesList::const_iterator end = nodeChildren.end();
    80     RefPtr<Inspector::TypeBuilder::Array<Inspector::TypeBuilder::Profiler::CPUProfileNode>> children = Inspector::TypeBuilder::Array<Inspector::TypeBuilder::Profiler::CPUProfileNode>::create();
    81     for (ProfileNodesList::const_iterator iter = nodeChildren.begin(); iter != end; ++iter)
    82         children->addItem(buildInspectorObjectFor(iter->get()));
    83 
    84     RefPtr<Inspector::TypeBuilder::Profiler::CPUProfileNode> result = Inspector::TypeBuilder::Profiler::CPUProfileNode::create()
    85         .setFunctionName(node->functionName())
    86         .setUrl(node->url())
    87         .setLineNumber(node->lineNumber())
    88         .setTotalTime(node->totalTime())
    89         .setSelfTime(node->selfTime())
    90         .setNumberOfCalls(node->numberOfCalls())
    91         .setCallUID(node->callIdentifier().hash())
    92         .setChildren(children.release());
     77    RefPtr<Inspector::TypeBuilder::Profiler::CPUProfileNodeCall> result = Inspector::TypeBuilder::Profiler::CPUProfileNodeCall::create()
     78        .setStartTime(call.startTime())
     79        .setTotalTime(call.totalTime());
    9380    return result.release();
    9481}
    9582
    96 PassRefPtr<Inspector::TypeBuilder::Profiler::CPUProfileNode> ScriptProfile::buildInspectorObjectForHead() const
     83static PassRefPtr<Inspector::TypeBuilder::Profiler::CPUProfileNode> buildInspectorObjectFor(const JSC::ProfileNode* node)
    9784{
    98     return buildInspectorObjectFor(m_profile->head());
     85    RefPtr<Inspector::TypeBuilder::Array<Inspector::TypeBuilder::Profiler::CPUProfileNodeCall>> calls = Inspector::TypeBuilder::Array<Inspector::TypeBuilder::Profiler::CPUProfileNodeCall>::create();
     86    for (const JSC::ProfileNode::Call& call : node->calls())
     87        calls->addItem(buildInspectorObjectFor(call));
     88
     89    RefPtr<Inspector::TypeBuilder::Profiler::CPUProfileNode> result = Inspector::TypeBuilder::Profiler::CPUProfileNode::create()
     90        .setId(node->id())
     91        .setCalls(calls.release());
     92
     93    if (!node->functionName().isEmpty())
     94        result->setFunctionName(node->functionName());
     95
     96    if (!node->url().isEmpty()) {
     97        result->setUrl(node->url());
     98        result->setLineNumber(node->lineNumber());
     99        result->setColumnNumber(node->columnNumber());
     100    }
     101
     102    if (!node->children().isEmpty()) {
     103        RefPtr<Inspector::TypeBuilder::Array<Inspector::TypeBuilder::Profiler::CPUProfileNode>> children = Inspector::TypeBuilder::Array<Inspector::TypeBuilder::Profiler::CPUProfileNode>::create();
     104        for (RefPtr<JSC::ProfileNode> profileNode : node->children())
     105            children->addItem(buildInspectorObjectFor(profileNode.get()));
     106        result->setChildren(children);
     107    }
     108
     109    return result.release();
    99110}
    100111
    101 PassRefPtr<Inspector::TypeBuilder::Profiler::CPUProfileNode> ScriptProfile::buildInspectorObjectForBottomUpHead() const
     112PassRefPtr<Inspector::TypeBuilder::Profiler::CPUProfile> ScriptProfile::buildInspectorObject() const
    102113{
    103     return 0;
     114    RefPtr<Inspector::TypeBuilder::Array<Inspector::TypeBuilder::Profiler::CPUProfileNode>> rootNodes = Inspector::TypeBuilder::Array<Inspector::TypeBuilder::Profiler::CPUProfileNode>::create();
     115    for (RefPtr<JSC::ProfileNode> profileNode : m_profile->head()->children())
     116        rootNodes->addItem(buildInspectorObjectFor(profileNode.get()));
     117
     118    RefPtr<Inspector::TypeBuilder::Profiler::CPUProfile> result = Inspector::TypeBuilder::Profiler::CPUProfile::create()
     119        .setRootNodes(rootNodes);
     120
     121    if (m_profile->idleTime())
     122        result->setIdleTime(m_profile->idleTime());
     123
     124    return result.release();
    104125}
    105126#endif
  • trunk/Source/WebCore/bindings/js/ScriptProfile.h

    r163024 r163140  
    11/*
    2  * Copyright (C) 2010 Apple Inc. All rights reserved.
     2 * Copyright (C) 2010, 2014 Apple Inc. All rights reserved.
    33 * Copyright (C) 2010 Google Inc. All rights reserved.
    44 *
     
    5555
    5656#if ENABLE(INSPECTOR)
    57     PassRefPtr<Inspector::TypeBuilder::Profiler::CPUProfileNode> buildInspectorObjectForHead() const;
    58     PassRefPtr<Inspector::TypeBuilder::Profiler::CPUProfileNode> buildInspectorObjectForBottomUpHead() const;
     57    PassRefPtr<Inspector::TypeBuilder::Profiler::CPUProfile> buildInspectorObject() const;
    5958#endif
    6059
     
    6564};
    6665
    67 
    6866} // namespace WebCore
    6967
  • trunk/Source/WebCore/inspector/InspectorHeapProfilerAgent.cpp

    r163024 r163140  
    104104        .setUid(snapshot.uid())
    105105        .setTitle(snapshot.title());
    106     header->setMaxJSObjectId(snapshot.maxSnapshotJSObjectId());
    107106    return header.release();
    108107}
  • trunk/Source/WebCore/inspector/InspectorProfilerAgent.cpp

    r163024 r163140  
    187187        .setUid(snapshot.uid())
    188188        .setTitle(snapshot.title());
    189     header->setMaxJSObjectId(snapshot.maxSnapshotJSObjectId());
    190189    return header.release();
    191190}
     
    274273        return;
    275274    }
    276     profileObject = Inspector::TypeBuilder::Profiler::CPUProfile::create();
    277     profileObject->setHead(it->value->buildInspectorObjectForHead());
    278     profileObject->setIdleTime(it->value->idleTime());
     275
     276    profileObject = it->value->buildInspectorObject();
    279277}
    280278
  • trunk/Source/WebCore/inspector/ScriptProfileNode.idl

    r163024 r163140  
    2929    ImplementationLacksVTable
    3030] interface ScriptProfileNode {
     31    readonly attribute unsigned long id;
     32
    3133    readonly attribute DOMString functionName;
     34
    3235    readonly attribute DOMString url;
    3336    readonly attribute unsigned long lineNumber;
     37    readonly attribute unsigned long columnNumber;
     38
    3439    readonly attribute double totalTime;
    3540    readonly attribute double selfTime;
     41
    3642    readonly attribute unsigned long numberOfCalls;
     43
    3744    sequence<ScriptProfileNode> children();
    38     readonly attribute unsigned long callUID;
    3945};
    40 
  • trunk/Source/WebCore/inspector/TimelineRecordFactory.cpp

    r163139 r163140  
    255255void TimelineRecordFactory::appendProfile(InspectorObject* data, PassRefPtr<ScriptProfile> profile)
    256256{
    257     data->setValue("profile", profile->buildInspectorObjectForHead());
     257    data->setValue(ASCIILiteral("profile"), profile->buildInspectorObject());
    258258}
    259259
  • trunk/Source/WebCore/inspector/protocol/Profiler.json

    r162796 r163140  
    77            "description": "Profile header.",
    88            "properties": [
    9                 { "name": "typeId", "type": "string", "enum": ["CPU", "CSS", "HEAP"], "description": "Profile type name." },
     9                { "name": "typeId", "type": "string", "enum": ["CPU", "HEAP"], "description": "Profile type name." },
    1010                { "name": "title", "type": "string", "description": "Profile title." },
    11                 { "name": "uid", "type": "integer", "description": "Unique identifier of the profile." },
    12                 { "name": "maxJSObjectId", "type": "integer", "optional": true, "description": "Last seen JS object Id." }
     11                { "name": "uid", "type": "integer", "description": "Unique identifier of the profile." }
     12            ]
     13        },
     14        {
     15            "id": "CPUProfileNodeCall",
     16            "type": "object",
     17            "description": "CPU Profile call info. Holds time information for a specific call that happened on a node.",
     18            "properties": [
     19                { "name": "startTime", "type": "number", "description": "Start time for the call." },
     20                { "name": "totalTime", "type": "number", "description": "Total execution time for the call." }
    1321            ]
    1422        },
     
    1826            "description": "CPU Profile node. Holds callsite information, execution statistics and child nodes.",
    1927            "properties": [
    20                 { "name": "functionName", "type": "string", "description": "Function name." },
    21                 { "name": "url", "type": "string", "description": "URL." },
    22                 { "name": "lineNumber", "type": "integer", "description": "Line number." },
    23                 { "name": "totalTime", "type": "number", "description": "Total execution time." },
    24                 { "name": "selfTime", "type": "number", "description": "Self time." },
    25                 { "name": "numberOfCalls", "type": "integer", "description": "Number of calls." },
    26                 { "name": "callUID", "type": "number", "description": "Call UID." },
    27                 { "name": "children", "type": "array", "items": { "$ref": "CPUProfileNode" }, "description": "Child nodes." },
    28                 { "name": "id", "optional": true, "type": "integer", "description": "Unique id of the node." }
     28                { "name": "id", "type": "integer", "description": "Unique identifier for this call site." },
     29                { "name": "calls", "type": "array", "items": { "$ref": "CPUProfileNodeCall" }, "description": "Calls making up this node." },
     30                { "name": "functionName", "type": "string", "optional": true, "description": "Function name." },
     31                { "name": "url", "type": "string", "optional": true, "description": "URL." },
     32                { "name": "lineNumber", "type": "integer", "optional": true, "description": "Line number." },
     33                { "name": "columnNumber", "type": "integer", "optional": true, "description": "Column number." },
     34                { "name": "children", "type": "array", "items": { "$ref": "CPUProfileNode" }, "optional": true, "description": "Child nodes." }
    2935            ]
    3036        },
     
    3440            "description": "Profile.",
    3541            "properties": [
    36                 { "name": "head", "$ref": "CPUProfileNode", "optional": true },
    37                 { "name": "idleTime", "type": "number", "optional": true },
    38                 { "name": "samples", "optional": true, "type": "array", "items": { "type": "integer" }, "description": "Ids of samples top nodes." }
     42                { "name": "rootNodes", "type": "array", "items": { "$ref": "CPUProfileNode" }, "description": "Top level nodes in the stack." },
     43                { "name": "idleTime", "type": "number", "optional": true }
    3944            ]
    4045        },
Note: See TracChangeset for help on using the changeset viewer.