| 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.
|
| *
|
|
|