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