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

Unified Diff: tools/profile.js

Issue 24566004: Add an API for additional profile log records (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 7 years, 3 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
===================================================================
--- tools/profile.js (revision 16936)
+++ tools/profile.js (working copy)
@@ -36,6 +36,7 @@
this.codeMap_ = new CodeMap();
this.topDownTree_ = new CallTree();
this.bottomUpTree_ = new CallTree();
+ this.generatedCode = 0;
};
@@ -134,6 +135,7 @@
*/
Profile.prototype.addCode = function(
type, name, start, size) {
+ this.generatedCode += size;
var entry = new Profile.DynamicCodeEntry(size, type, name);
this.codeMap_.addCode(start, entry);
return entry;
@@ -154,6 +156,7 @@
type, name, 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.
+ this.generatedCode += size;
var func = this.codeMap_.findDynamicEntryByStartAddress(funcAddr);
if (!func) {
func = new Profile.FunctionEntry(name);

Powered by Google App Engine
This is Rietveld 408576698