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

Side by Side Diff: Source/devtools/front_end/timeline/TimelineFlameChart.js

Issue 631573002: [Devtools] Replace "Stacks" with "Causes" (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Minor cleanup 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2014 Google Inc. All rights reserved. 2 * Copyright (C) 2014 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 24 matching lines...) Expand all
35 * @param {!WebInspector.TimelineFrameModelBase} frameModel 35 * @param {!WebInspector.TimelineFrameModelBase} frameModel
36 */ 36 */
37 WebInspector.TimelineFlameChartDataProvider = function(model, frameModel) 37 WebInspector.TimelineFlameChartDataProvider = function(model, frameModel)
38 { 38 {
39 WebInspector.FlameChartDataProvider.call(this); 39 WebInspector.FlameChartDataProvider.call(this);
40 this.reset(); 40 this.reset();
41 this._model = model; 41 this._model = model;
42 this._frameModel = frameModel; 42 this._frameModel = frameModel;
43 this._font = "12px " + WebInspector.fontFamily(); 43 this._font = "12px " + WebInspector.fontFamily();
44 this._linkifier = new WebInspector.Linkifier(); 44 this._linkifier = new WebInspector.Linkifier();
45 this._captureStacksSetting = WebInspector.settings.createSetting("timelineCa ptureStacks", true); 45 this._captureCausesSetting = WebInspector.settings.createSetting("timelineCa ptureCauses", true);
46 this._filters = []; 46 this._filters = [];
47 this.addFilter(WebInspector.TracingTimelineUIUtils.hiddenEventsFilter()); 47 this.addFilter(WebInspector.TracingTimelineUIUtils.hiddenEventsFilter());
48 this.addFilter(new WebInspector.TracingTimelineModel.ExclusiveEventNameFilte r([WebInspector.TracingTimelineModel.RecordType.Program])); 48 this.addFilter(new WebInspector.TracingTimelineModel.ExclusiveEventNameFilte r([WebInspector.TracingTimelineModel.RecordType.Program]));
49 } 49 }
50 50
51 WebInspector.TimelineFlameChartDataProvider.InstantEventVisibleDurationMs = 0.01 ; 51 WebInspector.TimelineFlameChartDataProvider.InstantEventVisibleDurationMs = 0.01 ;
52 WebInspector.TimelineFlameChartDataProvider.JSFrameCoalesceThresholdMs = 1.1; 52 WebInspector.TimelineFlameChartDataProvider.JSFrameCoalesceThresholdMs = 1.1;
53 53
54 /** 54 /**
55 * @return {!WebInspector.FlameChart.ColorGenerator} 55 * @return {!WebInspector.FlameChart.ColorGenerator}
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
191 191
192 /** 192 /**
193 * @param {string} threadTitle 193 * @param {string} threadTitle
194 * @param {!Array.<!WebInspector.TracingModel.Event>} syncEvents 194 * @param {!Array.<!WebInspector.TracingModel.Event>} syncEvents
195 * @param {!Array.<!Array.<!WebInspector.TracingModel.Event>>} asyncEvents 195 * @param {!Array.<!Array.<!WebInspector.TracingModel.Event>>} asyncEvents
196 */ 196 */
197 _appendThreadTimelineData: function(threadTitle, syncEvents, asyncEvents) 197 _appendThreadTimelineData: function(threadTitle, syncEvents, asyncEvents)
198 { 198 {
199 var levelCount = this._appendAsyncEvents(threadTitle, asyncEvents); 199 var levelCount = this._appendAsyncEvents(threadTitle, asyncEvents);
200 if (Runtime.experiments.isEnabled("timelineJSCPUProfile")) { 200 if (Runtime.experiments.isEnabled("timelineJSCPUProfile")) {
201 if (this._captureStacksSetting.get()) { 201 if (this._captureCausesSetting.get()) {
202 var jsFrameEvents = this._generateJSFrameEvents(syncEvents); 202 var jsFrameEvents = this._generateJSFrameEvents(syncEvents);
203 syncEvents = jsFrameEvents.mergeOrdered(syncEvents, WebInspector .TracingModel.Event.orderedCompareStartTime); 203 syncEvents = jsFrameEvents.mergeOrdered(syncEvents, WebInspector .TracingModel.Event.orderedCompareStartTime);
204 } 204 }
205 } 205 }
206 levelCount += this._appendSyncEvents(levelCount ? null : threadTitle, sy ncEvents); 206 levelCount += this._appendSyncEvents(levelCount ? null : threadTitle, sy ncEvents);
207 if (levelCount) 207 if (levelCount)
208 ++this._currentLevel; 208 ++this._currentLevel;
209 }, 209 },
210 210
211 /** 211 /**
(...skipping 660 matching lines...) Expand 10 before | Expand all | Expand 10 after
872 /** 872 /**
873 * @constructor 873 * @constructor
874 * @param {!WebInspector.TimelineSelection} selection 874 * @param {!WebInspector.TimelineSelection} selection
875 * @param {number} entryIndex 875 * @param {number} entryIndex
876 */ 876 */
877 WebInspector.TimelineFlameChart.Selection = function(selection, entryIndex) 877 WebInspector.TimelineFlameChart.Selection = function(selection, entryIndex)
878 { 878 {
879 this.timelineSelection = selection; 879 this.timelineSelection = selection;
880 this.entryIndex = entryIndex; 880 this.entryIndex = entryIndex;
881 } 881 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698