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

Unified Diff: test/cctest/log-eq-of-logging-and-traversal.js

Issue 7864017: Eliminate the need for code delete events in CPU profiler. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Fixed test-log/EquivalenceOfLoggingAndTraversal Created 9 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: test/cctest/log-eq-of-logging-and-traversal.js
diff --git a/test/cctest/log-eq-of-logging-and-traversal.js b/test/cctest/log-eq-of-logging-and-traversal.js
index cd52da545a6d9ae24d69c61b52aa28349769cfbd..05643bfb8abb9afaf11be41ad0b2fd779e1f6012 100644
--- a/test/cctest/log-eq-of-logging-and-traversal.js
+++ b/test/cctest/log-eq-of-logging-and-traversal.js
@@ -43,8 +43,7 @@ function LogProcessor() {
processor: this.processCodeCreation },
'code-move': { parsers: [parseInt, parseInt],
processor: this.processCodeMove },
- 'code-delete': { parsers: [parseInt],
- processor: this.processCodeDelete },
+ 'code-delete': null,
'sfi-move': { parsers: [parseInt, parseInt],
processor: this.processFunctionMove },
'shared-library': null,
@@ -73,10 +72,6 @@ LogProcessor.prototype.processCodeMove = function(from, to) {
this.profile.moveCode(from, to);
};
-LogProcessor.prototype.processCodeDelete = function(start) {
- this.profile.deleteCode(start);
-};
-
LogProcessor.prototype.processFunctionMove = function(from, to) {
this.profile.moveFunc(from, to);
};
@@ -132,8 +127,8 @@ function RunTest() {
"Script", "String", "RegExp", "Date", "Error"];
function entitiesEqual(entityA, entityB) {
- if (entityA === null && entityB !== null) return true;
- if (entityA !== null && entityB === null) return false;
+ if ((entityA === null && entityB !== null) ||
+ (entityA !== null && entityB === null)) return true;
return entityA.size === entityB.size && entityNamesEqual(entityA, entityB);
}
@@ -145,6 +140,8 @@ function RunTest() {
// find the same entries. We skip builtins during log parsing, but compiled
// functions traversal may erroneously recognize them as functions, so we are
// expecting more functions in traversal vs. logging.
+ // Since we don't track code deletions, logging can also report more entries
+ // than traversal.
while (l_pos < l_len && t_pos < t_len) {
var entryA = logging_entries[l_pos];
var entryB = traversal_entries[t_pos];
@@ -166,11 +163,6 @@ function RunTest() {
if (!entities_equal) equal = false;
comparison.push([entities_equal, address, entityA, entityB]);
}
- if (l_pos < l_len) equal = false;
- while (l_pos < l_len) {
- var entryA = logging_entries[l_pos++];
- comparison.push([false, entryA[0], entryA[1], null]);
- }
return [equal, comparison];
}
« src/log.cc ('K') | « src/runtime.cc ('k') | test/cctest/test-cpu-profiler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698