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

Side by Side Diff: tools/codemap.js

Issue 638633002: Tick processor: Print C++ entry points (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: rebased Created 6 years, 2 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « test/mjsunit/tools/tickprocessor-test.separate-ic ('k') | tools/logreader.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2009 the V8 project authors. All rights reserved. 1 // Copyright 2009 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after
251 CodeMap.prototype.getAllLibrariesEntries = function() { 251 CodeMap.prototype.getAllLibrariesEntries = function() {
252 return this.libraries_.exportValues(); 252 return this.libraries_.exportValues();
253 }; 253 };
254 254
255 255
256 /** 256 /**
257 * Creates a code entry object. 257 * Creates a code entry object.
258 * 258 *
259 * @param {number} size Code entry size in bytes. 259 * @param {number} size Code entry size in bytes.
260 * @param {string} opt_name Code entry name. 260 * @param {string} opt_name Code entry name.
261 * @param {string} opt_type Code entry type, e.g. SHARED_LIB, CPP.
261 * @constructor 262 * @constructor
262 */ 263 */
263 CodeMap.CodeEntry = function(size, opt_name) { 264 CodeMap.CodeEntry = function(size, opt_name, opt_type) {
264 this.size = size; 265 this.size = size;
265 this.name = opt_name || ''; 266 this.name = opt_name || '';
267 this.type = opt_type || '';
266 this.nameUpdated_ = false; 268 this.nameUpdated_ = false;
267 }; 269 };
268 270
269 271
270 CodeMap.CodeEntry.prototype.getName = function() { 272 CodeMap.CodeEntry.prototype.getName = function() {
271 return this.name; 273 return this.name;
272 }; 274 };
273 275
274 276
275 CodeMap.CodeEntry.prototype.toString = function() { 277 CodeMap.CodeEntry.prototype.toString = function() {
276 return this.name + ': ' + this.size.toString(16); 278 return this.name + ': ' + this.size.toString(16);
277 }; 279 };
278 280
279 281
280 CodeMap.NameGenerator = function() { 282 CodeMap.NameGenerator = function() {
281 this.knownNames_ = {}; 283 this.knownNames_ = {};
282 }; 284 };
283 285
284 286
285 CodeMap.NameGenerator.prototype.getName = function(name) { 287 CodeMap.NameGenerator.prototype.getName = function(name) {
286 if (!(name in this.knownNames_)) { 288 if (!(name in this.knownNames_)) {
287 this.knownNames_[name] = 0; 289 this.knownNames_[name] = 0;
288 return name; 290 return name;
289 } 291 }
290 var count = ++this.knownNames_[name]; 292 var count = ++this.knownNames_[name];
291 return name + ' {' + count + '}'; 293 return name + ' {' + count + '}';
292 }; 294 };
OLDNEW
« no previous file with comments | « test/mjsunit/tools/tickprocessor-test.separate-ic ('k') | tools/logreader.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698