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

Unified Diff: tools/profile.js

Issue 546089: Fix issue 553: function frame is skipped in profile when compare stub is called. (Closed)
Patch Set: Introduced dedicated log event types, added stuff for DevTools Created 10 years, 11 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 | « tools/logreader.js ('k') | tools/tickprocessor.js » ('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 d41f5cd13b001f6733db94d358817acda54945a9..682aa21b4837b8410eb68dce35afa75cc156d096 100644
--- a/tools/profile.js
+++ b/tools/profile.js
@@ -43,6 +43,11 @@ devtools.profiler.Profile = function() {
this.bottomUpTree_ = new devtools.profiler.CallTree();
};
+/**
+ * Version of profiler log.
+ */
+devtools.profiler.Profile.VERSION = 2;
+
/**
* Returns whether a function with the specified name must be skipped.
@@ -134,6 +139,21 @@ devtools.profiler.Profile.prototype.addCode = function(
/**
+ * Creates an alias entry for a code entry.
+ *
+ * @param {number} aliasAddr Alias address.
+ * @param {number} addr Code entry address.
+ */
+devtools.profiler.Profile.prototype.addCodeAlias = function(
+ aliasAddr, addr) {
+ var entry = this.codeMap_.findEntry(addr);
+ if (entry) {
+ this.codeMap_.addCode(aliasAddr, entry);
+ }
+};
+
+
+/**
* Reports about moving of a dynamic code entry.
*
* @param {number} from Current code entry address.
@@ -163,6 +183,31 @@ devtools.profiler.Profile.prototype.deleteCode = function(start) {
/**
+ * Reports about moving of a dynamic code entry.
+ *
+ * @param {number} from Current code entry address.
+ * @param {number} to New code entry address.
+ */
+devtools.profiler.Profile.prototype.safeMoveDynamicCode = function(from, to) {
+ if (this.codeMap_.findDynamicEntryByStartAddress(from)) {
+ this.codeMap_.moveCode(from, to);
+ }
+};
+
+
+/**
+ * Reports about deletion of a dynamic code entry.
+ *
+ * @param {number} start Starting address.
+ */
+devtools.profiler.Profile.prototype.safeDeleteDynamicCode = function(start) {
+ if (this.codeMap_.findDynamicEntryByStartAddress(start)) {
+ this.codeMap_.deleteCode(start);
+ }
+};
+
+
+/**
* Retrieves a code entry by an address.
*
* @param {number} addr Entry address.
@@ -362,6 +407,13 @@ devtools.profiler.Profile.DynamicCodeEntry.prototype.getRawName = function() {
};
+devtools.profiler.Profile.DynamicCodeEntry.prototype.isJSFunction = function() {
+ return this.type == "Function" ||
+ this.type == "LazyCompile" ||
+ this.type == "Script";
+};
+
+
/**
* Constructs a call graph.
*
« no previous file with comments | « tools/logreader.js ('k') | tools/tickprocessor.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698