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

Side by Side Diff: Source/devtools/front_end/TimelinePresentationModel.js

Issue 121223003: DevTools: Move usedHeapSize from TimelineEvent into counters. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 12 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
« no previous file with comments | « Source/devtools/front_end/TimelineMemoryOverview.js ('k') | Source/devtools/protocol.json » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google Inc. All rights reserved.
3 * Copyright (C) 2012 Intel Inc. All rights reserved. 3 * Copyright (C) 2012 Intel Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are 6 * modification, are permitted provided that the following conditions are
7 * met: 7 * met:
8 * 8 *
9 * * Redistributions of source code must retain the above copyright 9 * * Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 1031 matching lines...) Expand 10 before | Expand all | Expand 10 after
1042 * @return {number} 1042 * @return {number}
1043 */ 1043 */
1044 get usedHeapSizeDelta() 1044 get usedHeapSizeDelta()
1045 { 1045 {
1046 return this._record.usedHeapSizeDelta || 0; 1046 return this._record.usedHeapSizeDelta || 0;
1047 }, 1047 },
1048 1048
1049 /** 1049 /**
1050 * @return {number} 1050 * @return {number}
1051 */ 1051 */
1052 get usedHeapSize() 1052 get jsHeapSizeUsed()
1053 { 1053 {
1054 return this._record.usedHeapSize; 1054 return this._record.counters ? this._record.counters.jsHeapSizeUsed : 0;
1055 }, 1055 },
1056 1056
1057 /** 1057 /**
1058 * @return {?Array.<!ConsoleAgent.CallFrame>} 1058 * @return {?Array.<!ConsoleAgent.CallFrame>}
1059 */ 1059 */
1060 get stackTrace() 1060 get stackTrace()
1061 { 1061 {
1062 if (this._record.stackTrace && this._record.stackTrace.length) 1062 if (this._record.stackTrace && this._record.stackTrace.length)
1063 return this._record.stackTrace; 1063 return this._record.stackTrace;
1064 return null; 1064 return null;
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after
1274 contentHelper.appendElementRow(WebInspector.UIString("Detail s"), this.detailsNode().childNodes[1].cloneNode()); 1274 contentHelper.appendElementRow(WebInspector.UIString("Detail s"), this.detailsNode().childNodes[1].cloneNode());
1275 break; 1275 break;
1276 } 1276 }
1277 1277
1278 if (this._relatedNode) 1278 if (this._relatedNode)
1279 contentHelper.appendElementRow(relatedNodeLabel || WebInspector.UISt ring("Related node"), this._createNodeAnchor(this._relatedNode)); 1279 contentHelper.appendElementRow(relatedNodeLabel || WebInspector.UISt ring("Related node"), this._createNodeAnchor(this._relatedNode));
1280 1280
1281 if (this.scriptName && this.type !== recordTypes.FunctionCall) 1281 if (this.scriptName && this.type !== recordTypes.FunctionCall)
1282 contentHelper.appendElementRow(WebInspector.UIString("Function Call" ), this._linkifyLocation(this.scriptName, this.scriptLine, 0)); 1282 contentHelper.appendElementRow(WebInspector.UIString("Function Call" ), this._linkifyLocation(this.scriptName, this.scriptLine, 0));
1283 1283
1284 if (this.usedHeapSize) { 1284 if (this.jsHeapSizeUsed) {
1285 if (this.usedHeapSizeDelta) { 1285 if (this.usedHeapSizeDelta) {
1286 var sign = this.usedHeapSizeDelta > 0 ? "+" : "-"; 1286 var sign = this.usedHeapSizeDelta > 0 ? "+" : "-";
1287 contentHelper.appendTextRow(WebInspector.UIString("Used Heap Siz e"), 1287 contentHelper.appendTextRow(WebInspector.UIString("Used JS Heap Size"),
1288 WebInspector.UIString("%s (%s%s)", Number.bytesToString(this .usedHeapSize), sign, Number.bytesToString(Math.abs(this.usedHeapSizeDelta)))); 1288 WebInspector.UIString("%s (%s%s)", Number.bytesToString(this .jsHeapSizeUsed), sign, Number.bytesToString(Math.abs(this.usedHeapSizeDelta)))) ;
1289 } else if (this.category === WebInspector.TimelinePresentationModel. categories().scripting) 1289 } else if (this.category === WebInspector.TimelinePresentationModel. categories().scripting)
1290 contentHelper.appendTextRow(WebInspector.UIString("Used Heap Siz e"), Number.bytesToString(this.usedHeapSize)); 1290 contentHelper.appendTextRow(WebInspector.UIString("Used JS Heap Size"), Number.bytesToString(this.jsHeapSizeUsed));
1291 } 1291 }
1292 1292
1293 if (this.callSiteStackTrace) 1293 if (this.callSiteStackTrace)
1294 contentHelper.appendStackTrace(callSiteStackTraceLabel || WebInspect or.UIString("Call Site stack"), this.callSiteStackTrace, this._linkifyCallFrame. bind(this)); 1294 contentHelper.appendStackTrace(callSiteStackTraceLabel || WebInspect or.UIString("Call Site stack"), this.callSiteStackTrace, this._linkifyCallFrame. bind(this));
1295 1295
1296 if (this.stackTrace) 1296 if (this.stackTrace)
1297 contentHelper.appendStackTrace(callStackLabel || WebInspector.UIStri ng("Call Stack"), this.stackTrace, this._linkifyCallFrame.bind(this)); 1297 contentHelper.appendStackTrace(callStackLabel || WebInspector.UIStri ng("Call Stack"), this.stackTrace, this._linkifyCallFrame.bind(this));
1298 1298
1299 if (this._warnings) { 1299 if (this._warnings) {
1300 var ul = document.createElement("ul"); 1300 var ul = document.createElement("ul");
(...skipping 581 matching lines...) Expand 10 before | Expand all | Expand 10 after
1882 for (var i = 0; i < stackTrace.length; ++i) { 1882 for (var i = 0; i < stackTrace.length; ++i) {
1883 var stackFrame = stackTrace[i]; 1883 var stackFrame = stackTrace[i];
1884 var row = stackTraceElement.createChild("div"); 1884 var row = stackTraceElement.createChild("div");
1885 row.createTextChild(stackFrame.functionName || WebInspector.UIString ("(anonymous function)")); 1885 row.createTextChild(stackFrame.functionName || WebInspector.UIString ("(anonymous function)"));
1886 row.createTextChild(" @ "); 1886 row.createTextChild(" @ ");
1887 var urlElement = callFrameLinkifier(stackFrame); 1887 var urlElement = callFrameLinkifier(stackFrame);
1888 row.appendChild(urlElement); 1888 row.appendChild(urlElement);
1889 } 1889 }
1890 } 1890 }
1891 } 1891 }
OLDNEW
« no previous file with comments | « Source/devtools/front_end/TimelineMemoryOverview.js ('k') | Source/devtools/protocol.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698