Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3226)

Unified Diff: Source/devtools/front_end/timeline/TimelineJSProfile.js

Issue 622843002: DevTools: Support timeline JS sampling for all threads. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebaseline Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: Source/devtools/front_end/timeline/TimelineJSProfile.js
diff --git a/Source/devtools/front_end/timeline/TimelineJSProfile.js b/Source/devtools/front_end/timeline/TimelineJSProfile.js
index 42eda0d6aab7d918680535d829c11e448b57a536..bedb2082f09fa85bfe3e1bcbe305fd3861f07c3d 100644
--- a/Source/devtools/front_end/timeline/TimelineJSProfile.js
+++ b/Source/devtools/front_end/timeline/TimelineJSProfile.js
@@ -6,11 +6,11 @@
WebInspector.TimelineJSProfileProcessor = { };
/**
- * @param {!WebInspector.TracingTimelineModel} timelineModel
* @param {!ProfilerAgent.CPUProfile} jsProfile
+ * @param {!WebInspector.TracingModel.Thread} thread
* @return {!Array.<!WebInspector.TracingModel.Event>}
*/
-WebInspector.TimelineJSProfileProcessor.generateTracingEventsFromCpuProfile = function(timelineModel, jsProfile)
+WebInspector.TimelineJSProfileProcessor.generateTracingEventsFromCpuProfile = function(jsProfile, thread)
{
if (!jsProfile.samples)
return [];
@@ -21,7 +21,6 @@ WebInspector.TimelineJSProfileProcessor.generateTracingEventsFromCpuProfile = fu
var samples = jsProfileModel.samples;
var timestamps = jsProfileModel.timestamps;
var jsEvents = [];
- var mainThread = timelineModel.mainThreadEvents()[0].thread;
for (var i = 0; i < samples.length; ++i) {
var node = jsProfileModel.nodeByIndex(i);
if (node === programNode || node === gcNode || node === idleNode)
@@ -34,7 +33,7 @@ WebInspector.TimelineJSProfileProcessor.generateTracingEventsFromCpuProfile = fu
stackTrace[j++] = /** @type {!ConsoleAgent.CallFrame} */ (node);
}
var jsEvent = new WebInspector.TracingModel.Event(WebInspector.TracingModel.DevToolsMetadataEventCategory, WebInspector.TracingTimelineModel.RecordType.JSSample,
- WebInspector.TracingModel.Phase.Instant, timestamps[i], mainThread);
+ WebInspector.TracingModel.Phase.Instant, timestamps[i], thread);
jsEvent.stackTrace = stackTrace;
jsEvents.push(jsEvent);
}

Powered by Google App Engine
This is Rietveld 408576698