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

Unified Diff: tools/profile.js

Issue 2753543006: [profiler] Web UI: add summary of opts/deopts. (Closed)
Patch Set: Address reviewer comments Created 3 years, 9 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
« no previous file with comments | « test/mjsunit/tools/tickprocessor-test-func-info.log ('k') | tools/profview/index.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/profile.js
diff --git a/tools/profile.js b/tools/profile.js
index c04bed31f1f228ff32bfb908a02a0776f3efd99c..de9c42c5b1100c67d840690bbe63a845db0a2866 100644
--- a/tools/profile.js
+++ b/tools/profile.js
@@ -135,7 +135,7 @@ Profile.prototype.addStaticCode = function(
* @param {number} size Code entry size.
*/
Profile.prototype.addCode = function(
- type, name, start, size) {
+ type, name, timestamp, start, size) {
var entry = new Profile.DynamicCodeEntry(size, type, name);
this.codeMap_.addCode(start, entry);
return entry;
@@ -153,7 +153,7 @@ Profile.prototype.addCode = function(
* @param {Profile.CodeState} state Optimization state.
*/
Profile.prototype.addFuncCode = function(
- type, name, start, size, funcAddr, state) {
+ type, name, timestamp, start, size, funcAddr, state) {
// As code and functions are in the same address space,
// it is safe to put them in a single code map.
var func = this.codeMap_.findDynamicEntryByStartAddress(funcAddr);
@@ -192,6 +192,10 @@ Profile.prototype.moveCode = function(from, to) {
}
};
+Profile.prototype.deoptCode = function(
+ timestamp, code, inliningId, scriptOffset, bailoutType,
+ sourcePositionText, deoptReasonText) {
+};
/**
* Reports about deletion of a dynamic code entry.
@@ -864,18 +868,23 @@ JsonProfile.prototype.addStaticCode = function(
};
JsonProfile.prototype.addCode = function(
- kind, name, start, size) {
+ kind, name, timestamp, start, size) {
var entry = new CodeMap.CodeEntry(size, name, 'CODE');
this.codeMap_.addCode(start, entry);
entry.codeId = this.codeEntries_.length;
- this.codeEntries_.push({name : entry.name, type : entry.type, kind : kind});
+ this.codeEntries_.push({
+ name : entry.name,
+ timestamp: timestamp,
+ type : entry.type,
+ kind : kind
+ });
return entry;
};
JsonProfile.prototype.addFuncCode = function(
- kind, name, start, size, funcAddr, state) {
+ kind, name, timestamp, start, size, funcAddr, state) {
// As code and functions are in the same address space,
// it is safe to put them in a single code map.
var func = this.codeMap_.findDynamicEntryByStartAddress(funcAddr);
@@ -921,7 +930,8 @@ JsonProfile.prototype.addFuncCode = function(
name : entry.name,
type : entry.type,
kind : kind,
- func : func.funcId
+ func : func.funcId,
+ tm : timestamp
});
}
return entry;
@@ -935,6 +945,28 @@ JsonProfile.prototype.moveCode = function(from, to) {
}
};
+JsonProfile.prototype.deoptCode = function(
+ timestamp, code, inliningId, scriptOffset, bailoutType,
+ sourcePositionText, deoptReasonText) {
+ let entry = this.codeMap_.findDynamicEntryByStartAddress(code);
+ if (entry) {
+ let codeId = entry.codeId;
+ if (!this.codeEntries_[codeId].deopt) {
+ // Only add the deopt if there was no deopt before.
+ // The subsequent deoptimizations should be lazy deopts for
+ // other on-stack activations.
+ this.codeEntries_[codeId].deopt = {
+ tm : timestamp,
+ inliningId : inliningId,
+ scriptOffset : scriptOffset,
+ posText : sourcePositionText,
+ reason : deoptReasonText,
+ bailoutType : bailoutType
+ };
+ }
+ }
+};
+
JsonProfile.prototype.deleteCode = function(start) {
try {
this.codeMap_.deleteCode(start);
« no previous file with comments | « test/mjsunit/tools/tickprocessor-test-func-info.log ('k') | tools/profview/index.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698