<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[198867] trunk/Source</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/198867">198867</a></dd>
<dt>Author</dt> <dd>joepeck@webkit.org</dd>
<dt>Date</dt> <dd>2016-03-30 17:40:11 -0700 (Wed, 30 Mar 2016)</dd>
</dl>

<h3>Log Message</h3>
<pre>Remove unused ScriptProfiler.Samples.totalTime
https://bugs.webkit.org/show_bug.cgi?id=156002

Reviewed by Saam Barati.

Source/JavaScriptCore:

* inspector/agents/InspectorScriptProfilerAgent.cpp:
(Inspector::buildSamples):
(Inspector::InspectorScriptProfilerAgent::trackingComplete):
* inspector/protocol/ScriptProfiler.json:
Remove totalTime.

* runtime/SamplingProfiler.cpp:
(JSC::SamplingProfiler::SamplingProfiler): Deleted.
* runtime/SamplingProfiler.h:
(JSC::SamplingProfiler::totalTime): Deleted.
Remove now unused m_totalTime.

Source/WebInspectorUI:

* UserInterface/Controllers/TimelineManager.js:
(WebInspector.TimelineManager.prototype.scriptProfilerTrackingCompleted):
* UserInterface/Models/CallingContextTree.js:
(WebInspector.CallingContextTree.prototype.get totalExecutionTime): Deleted.
(WebInspector.CallingContextTree.prototype.reset): Deleted.
(WebInspector.CallingContextTree.prototype.increaseExecutionTime): Deleted.
Remove unused totalExecutionTime.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceJavaScriptCoreChangeLog">trunk/Source/JavaScriptCore/ChangeLog</a></li>
<li><a href="#trunkSourceJavaScriptCoreinspectoragentsInspectorScriptProfilerAgentcpp">trunk/Source/JavaScriptCore/inspector/agents/InspectorScriptProfilerAgent.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreinspectorprotocolScriptProfilerjson">trunk/Source/JavaScriptCore/inspector/protocol/ScriptProfiler.json</a></li>
<li><a href="#trunkSourceJavaScriptCoreruntimeSamplingProfilercpp">trunk/Source/JavaScriptCore/runtime/SamplingProfiler.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreruntimeSamplingProfilerh">trunk/Source/JavaScriptCore/runtime/SamplingProfiler.h</a></li>
<li><a href="#trunkSourceWebInspectorUIChangeLog">trunk/Source/WebInspectorUI/ChangeLog</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceControllersTimelineManagerjs">trunk/Source/WebInspectorUI/UserInterface/Controllers/TimelineManager.js</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceModelsCallingContextTreejs">trunk/Source/WebInspectorUI/UserInterface/Models/CallingContextTree.js</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceJavaScriptCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/ChangeLog (198866 => 198867)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/ChangeLog        2016-03-31 00:38:20 UTC (rev 198866)
+++ trunk/Source/JavaScriptCore/ChangeLog        2016-03-31 00:40:11 UTC (rev 198867)
</span><span class="lines">@@ -1,3 +1,22 @@
</span><ins>+2016-03-30  Joseph Pecoraro  &lt;pecoraro@apple.com&gt;
+
+        Remove unused ScriptProfiler.Samples.totalTime
+        https://bugs.webkit.org/show_bug.cgi?id=156002
+
+        Reviewed by Saam Barati.
+
+        * inspector/agents/InspectorScriptProfilerAgent.cpp:
+        (Inspector::buildSamples):
+        (Inspector::InspectorScriptProfilerAgent::trackingComplete):
+        * inspector/protocol/ScriptProfiler.json:
+        Remove totalTime.
+
+        * runtime/SamplingProfiler.cpp:
+        (JSC::SamplingProfiler::SamplingProfiler): Deleted.
+        * runtime/SamplingProfiler.h:
+        (JSC::SamplingProfiler::totalTime): Deleted.
+        Remove now unused m_totalTime.
+
</ins><span class="cx"> 2016-03-30  Michael Saboff  &lt;msaboff@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         [ES6] Quantified unicode regular expressions do not work for counts greater than 1
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreinspectoragentsInspectorScriptProfilerAgentcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/inspector/agents/InspectorScriptProfilerAgent.cpp (198866 => 198867)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/inspector/agents/InspectorScriptProfilerAgent.cpp        2016-03-31 00:38:20 UTC (rev 198866)
+++ trunk/Source/JavaScriptCore/inspector/agents/InspectorScriptProfilerAgent.cpp        2016-03-31 00:40:11 UTC (rev 198867)
</span><span class="lines">@@ -157,7 +157,7 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(SAMPLING_PROFILER)
</span><del>-static Ref&lt;Protocol::ScriptProfiler::Samples&gt; buildSamples(VM&amp; vm, Vector&lt;SamplingProfiler::StackTrace&gt;&amp;&amp; samplingProfilerStackTraces, double totalTime)
</del><ins>+static Ref&lt;Protocol::ScriptProfiler::Samples&gt; buildSamples(VM&amp; vm, Vector&lt;SamplingProfiler::StackTrace&gt;&amp;&amp; samplingProfilerStackTraces)
</ins><span class="cx"> {
</span><span class="cx">     Ref&lt;Protocol::Array&lt;Protocol::ScriptProfiler::StackTrace&gt;&gt; stackTraces = Protocol::Array&lt;Protocol::ScriptProfiler::StackTrace&gt;::create();
</span><span class="cx">     for (SamplingProfiler::StackTrace&amp; stackTrace : samplingProfilerStackTraces) {
</span><span class="lines">@@ -190,7 +190,6 @@
</span><span class="cx"> 
</span><span class="cx">     return Protocol::ScriptProfiler::Samples::create()
</span><span class="cx">         .setStackTraces(WTFMove(stackTraces))
</span><del>-        .setTotalTime(totalTime)
</del><span class="cx">         .release();
</span><span class="cx"> }
</span><span class="cx"> #endif // ENABLE(SAMPLING_PROFILER)
</span><span class="lines">@@ -205,7 +204,7 @@
</span><span class="cx">         LockHolder locker(samplingProfiler-&gt;getLock());
</span><span class="cx">         samplingProfiler-&gt;stop(locker);
</span><span class="cx">         Vector&lt;SamplingProfiler::StackTrace&gt; stackTraces = samplingProfiler-&gt;releaseStackTraces(locker);
</span><del>-        Ref&lt;Protocol::ScriptProfiler::Samples&gt; samples = buildSamples(m_environment.scriptDebugServer().vm(), WTFMove(stackTraces), samplingProfiler-&gt;totalTime(locker));
</del><ins>+        Ref&lt;Protocol::ScriptProfiler::Samples&gt; samples = buildSamples(m_environment.scriptDebugServer().vm(), WTFMove(stackTraces));
</ins><span class="cx"> 
</span><span class="cx">         locker.unlockEarly();
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreinspectorprotocolScriptProfilerjson"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/inspector/protocol/ScriptProfiler.json (198866 => 198867)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/inspector/protocol/ScriptProfiler.json        2016-03-31 00:38:20 UTC (rev 198866)
+++ trunk/Source/JavaScriptCore/inspector/protocol/ScriptProfiler.json        2016-03-31 00:40:11 UTC (rev 198867)
</span><span class="lines">@@ -48,7 +48,6 @@
</span><span class="cx">             &quot;id&quot;: &quot;Samples&quot;,
</span><span class="cx">             &quot;type&quot;: &quot;object&quot;,
</span><span class="cx">             &quot;properties&quot;: [
</span><del>-                { &quot;name&quot;: &quot;totalTime&quot;, &quot;type&quot;: &quot;number&quot;, &quot;description&quot;: &quot;Total execution time of the profiler's data. (Note: not total elapsed time.)&quot; },
</del><span class="cx">                 { &quot;name&quot;: &quot;stackTraces&quot;, &quot;type&quot;: &quot;array&quot;, &quot;items&quot;: { &quot;$ref&quot;: &quot;StackTrace&quot; } }
</span><span class="cx">             ]
</span><span class="cx">         }
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreruntimeSamplingProfilercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/runtime/SamplingProfiler.cpp (198866 => 198867)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/runtime/SamplingProfiler.cpp        2016-03-31 00:38:20 UTC (rev 198866)
+++ trunk/Source/JavaScriptCore/runtime/SamplingProfiler.cpp        2016-03-31 00:40:11 UTC (rev 198867)
</span><span class="lines">@@ -186,7 +186,6 @@
</span><span class="cx">     : m_vm(vm)
</span><span class="cx">     , m_stopwatch(WTFMove(stopwatch))
</span><span class="cx">     , m_timingInterval(std::chrono::microseconds(1000))
</span><del>-    , m_totalTime(0)
</del><span class="cx">     , m_timerQueue(WorkQueue::create(&quot;jsc.sampling-profiler.queue&quot;, WorkQueue::Type::Serial, WorkQueue::QOS::UserInteractive))
</span><span class="cx">     , m_jscExecutionThread(nullptr)
</span><span class="cx">     , m_isActive(false)
</span><span class="lines">@@ -278,8 +277,6 @@
</span><span class="cx"> 
</span><span class="cx">                     if (didRunOutOfVectorSpace)
</span><span class="cx">                         m_currentFrames.grow(m_currentFrames.size() * 1.25);
</span><del>-
-                    m_totalTime += nowTime - m_lastTime;
</del><span class="cx">                 }
</span><span class="cx">             }
</span><span class="cx">         }
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreruntimeSamplingProfilerh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/runtime/SamplingProfiler.h (198866 => 198867)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/runtime/SamplingProfiler.h        2016-03-31 00:38:20 UTC (rev 198866)
+++ trunk/Source/JavaScriptCore/runtime/SamplingProfiler.h        2016-03-31 00:40:11 UTC (rev 198867)
</span><span class="lines">@@ -136,7 +136,6 @@
</span><span class="cx">     JS_EXPORT_PRIVATE void noticeCurrentThreadAsJSCExecutionThread();
</span><span class="cx">     void noticeCurrentThreadAsJSCExecutionThread(const LockHolder&amp;);
</span><span class="cx">     void processUnverifiedStackTraces(); // You should call this only after acquiring the lock.
</span><del>-    double totalTime(const LockHolder&amp;) { return m_totalTime; }
</del><span class="cx">     void setStopWatch(const LockHolder&amp;, Ref&lt;Stopwatch&gt;&amp;&amp; stopwatch) { m_stopwatch = WTFMove(stopwatch); }
</span><span class="cx"> 
</span><span class="cx"> private:
</span><span class="lines">@@ -151,7 +150,6 @@
</span><span class="cx">     Vector&lt;UnprocessedStackTrace&gt; m_unprocessedStackTraces;
</span><span class="cx">     std::chrono::microseconds m_timingInterval;
</span><span class="cx">     double m_lastTime;
</span><del>-    double m_totalTime;
</del><span class="cx">     Ref&lt;WorkQueue&gt; m_timerQueue;
</span><span class="cx">     std::function&lt;void ()&gt; m_handler;
</span><span class="cx">     Lock m_lock;
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/ChangeLog (198866 => 198867)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/ChangeLog        2016-03-31 00:38:20 UTC (rev 198866)
+++ trunk/Source/WebInspectorUI/ChangeLog        2016-03-31 00:40:11 UTC (rev 198867)
</span><span class="lines">@@ -1,5 +1,20 @@
</span><span class="cx"> 2016-03-30  Joseph Pecoraro  &lt;pecoraro@apple.com&gt;
</span><span class="cx"> 
</span><ins>+        Remove unused ScriptProfiler.Samples.totalTime
+        https://bugs.webkit.org/show_bug.cgi?id=156002
+
+        Reviewed by Saam Barati.
+
+        * UserInterface/Controllers/TimelineManager.js:
+        (WebInspector.TimelineManager.prototype.scriptProfilerTrackingCompleted):
+        * UserInterface/Models/CallingContextTree.js:
+        (WebInspector.CallingContextTree.prototype.get totalExecutionTime): Deleted.
+        (WebInspector.CallingContextTree.prototype.reset): Deleted.
+        (WebInspector.CallingContextTree.prototype.increaseExecutionTime): Deleted.
+        Remove unused totalExecutionTime.
+
+2016-03-30  Joseph Pecoraro  &lt;pecoraro@apple.com&gt;
+
</ins><span class="cx">         Web Inspector: Calculate more accurate time per-sample instead of assuming 1ms
</span><span class="cx">         https://bugs.webkit.org/show_bug.cgi?id=155961
</span><span class="cx">         &lt;rdar://problem/25404505&gt;
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceControllersTimelineManagerjs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/Controllers/TimelineManager.js (198866 => 198867)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Controllers/TimelineManager.js        2016-03-31 00:38:20 UTC (rev 198866)
+++ trunk/Source/WebInspectorUI/UserInterface/Controllers/TimelineManager.js        2016-03-31 00:40:11 UTC (rev 198867)
</span><span class="lines">@@ -773,7 +773,7 @@
</span><span class="cx">         console.assert(!this._webTimelineScriptRecordsExpectingScriptProfilerEvents || this._scriptProfilerRecords.length &gt;= this._webTimelineScriptRecordsExpectingScriptProfilerEvents.length);
</span><span class="cx"> 
</span><span class="cx">         if (samples) {
</span><del>-            let {totalTime: totalExecutionTime, stackTraces} = samples;
</del><ins>+            let {stackTraces} = samples;
</ins><span class="cx">             let topDownCallingContextTree = this.activeRecording.topDownCallingContextTree;
</span><span class="cx">             let bottomUpCallingContextTree = this.activeRecording.bottomUpCallingContextTree;
</span><span class="cx"> 
</span><span class="lines">@@ -809,9 +809,6 @@
</span><span class="cx">             if (timestampIndex &lt; timestampCount)
</span><span class="cx">                 sampleDurations.fill(defaultDuration, sampleDurationIndex);
</span><span class="cx"> 
</span><del>-            topDownCallingContextTree.increaseExecutionTime(totalExecutionTime);
-            bottomUpCallingContextTree.increaseExecutionTime(totalExecutionTime);
-
</del><span class="cx">             for (let i = 0; i &lt; stackTraces.length; i++) {
</span><span class="cx">                 topDownCallingContextTree.updateTreeWithStackTrace(stackTraces[i], sampleDurations[i]);
</span><span class="cx">                 bottomUpCallingContextTree.updateTreeWithStackTrace(stackTraces[i], sampleDurations[i]);
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceModelsCallingContextTreejs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/Models/CallingContextTree.js (198866 => 198867)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Models/CallingContextTree.js        2016-03-31 00:38:20 UTC (rev 198866)
+++ trunk/Source/WebInspectorUI/UserInterface/Models/CallingContextTree.js        2016-03-31 00:40:11 UTC (rev 198867)
</span><span class="lines">@@ -37,13 +37,11 @@
</span><span class="cx">     // Public
</span><span class="cx"> 
</span><span class="cx">     get type() { return this._type; }
</span><del>-    get totalExecutionTime() { return this._totalExecutionTime; }
</del><span class="cx">     get totalNumberOfSamples() { return this._totalNumberOfSamples; }
</span><span class="cx"> 
</span><span class="cx">     reset()
</span><span class="cx">     {
</span><span class="cx">         this._root = new WebInspector.CCTNode(-1, -1, -1, &quot;&lt;root&gt;&quot;, null);
</span><del>-        this._totalExecutionTime = 0;
</del><span class="cx">         this._totalNumberOfSamples = 0;
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="lines">@@ -52,11 +50,6 @@
</span><span class="cx">         return this._root.filteredTimestampsAndDuration(startTime, endTime).duration;
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    increaseExecutionTime(executionTime)
-    {
-        this._totalExecutionTime += executionTime;
-    }
-
</del><span class="cx">     updateTreeWithStackTrace({timestamp, stackFrames}, duration)
</span><span class="cx">     {
</span><span class="cx">         this._totalNumberOfSamples++;
</span></span></pre>
</div>
</div>

</body>
</html>