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

Unified Diff: tools/profile.js

Issue 7310025: Remove support for logging into a memory buffer. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 9 years, 5 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
Index: tools/profile.js
diff --git a/tools/profile.js b/tools/profile.js
index c9c9437e930d02b6a5cf4b8be64e1ca268e4a47a..15019be80b358ef3ec9005f69214b3141d5b3f77 100644
--- a/tools/profile.js
+++ b/tools/profile.js
@@ -162,8 +162,16 @@ Profile.prototype.addFuncCode = function(
// Function object has been overwritten with a new one.
func.name = name;
}
- var entry = new Profile.DynamicFuncCodeEntry(size, type, func, state);
- this.codeMap_.addCode(start, entry);
+ var entry = this.codeMap_.findDynamicEntryByStartAddress(start);
+ if (entry) {
+ if (entry.size === size && entry.func === func) {
+ // Entry state has changed.
+ entry.state = state;
+ }
+ } else {
+ entry = new Profile.DynamicFuncCodeEntry(size, type, func, state);
+ this.codeMap_.addCode(start, entry);
+ }
return entry;
};
@@ -408,6 +416,11 @@ Profile.DynamicCodeEntry.prototype.isJSFunction = function() {
};
+Profile.DynamicCodeEntry.prototype.toString = function() {
+ return this.getName() + ': ' + this.size.toString(16);
+};
+
+
/**
* Creates a dynamic code entry.
*
@@ -448,6 +461,11 @@ Profile.DynamicFuncCodeEntry.prototype.isJSFunction = function() {
};
+Profile.DynamicFuncCodeEntry.prototype.toString = function() {
+ return this.getName() + ': ' + this.size.toString(16);
+};
+
+
/**
* Creates a shared function object entry.
*
@@ -473,6 +491,7 @@ Profile.FunctionEntry.prototype.getName = function() {
return name;
};
+Profile.FunctionEntry.prototype.toString = CodeMap.CodeEntry.prototype.toString;
/**
* Constructs a call graph.

Powered by Google App Engine
This is Rietveld 408576698