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

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: tweak Created 6 years, 1 month 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
« no previous file with comments | « no previous file | Source/devtools/front_end/timeline/TracingModel.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 a0b46c4a71f11d2b2629c1a7dcedb37988138827..5fdfef6a45f0af60aac78570da1a65c68b201123 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);
}
« no previous file with comments | « no previous file | Source/devtools/front_end/timeline/TracingModel.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698