Reviewers: loislo, Yang,
Description:
Fix test-log/EquivalenceOfLoggingAndTraversal
The test has been marked as intermittently failing since 2011 and since that
"code-creation" event signature has changed a bit. I updated the parser in
the
test but that revealed another issue: "code-creation" events with
type 'Script'
didn't match functions with type 'LazyCompile' retrieved during the heap
traversal because the later had name " :1:1" which didn't match the script's
name.
BUG=v8:2857
Please review this at https://codereview.chromium.org/22824043/
SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge
Affected files:
M test/cctest/cctest.status
M test/cctest/log-eq-of-logging-and-traversal.js
Index: test/cctest/cctest.status
diff --git a/test/cctest/cctest.status b/test/cctest/cctest.status
index
71d77174751b92df615d385351d886eae6b4423f..6cd868c7b9017634d4bb3da57501477713fc7005
100644
--- a/test/cctest/cctest.status
+++ b/test/cctest/cctest.status
@@ -42,9 +42,6 @@ test-serialize/DependentTestThatAlwaysFails: FAIL
# This test always fails. It tests that LiveEdit causes abort when turned
off.
test-debug/LiveEditDisabled: FAIL
-# Bug(2857)
-test-log/EquivalenceOfLoggingAndTraversal: SKIP
-
# We do not yet shrink weak maps after they have been emptied by the GC
test-weakmaps/Shrinking: FAIL
test-weaksets/WeakSet_Shrinking: FAIL
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
05643bfb8abb9afaf11be41ad0b2fd779e1f6012..522a3726ea7143859240c52f1c47700246e61e4a
100644
--- a/test/cctest/log-eq-of-logging-and-traversal.js
+++ b/test/cctest/log-eq-of-logging-and-traversal.js
@@ -39,7 +39,7 @@ function parseState(s) {
function LogProcessor() {
LogReader.call(this, {
'code-creation': {
- parsers: [null, parseInt, parseInt, null, 'var-args'],
+ parsers: [null, parseInt, parseInt, parseInt, null, 'var-args'],
processor: this.processCodeCreation },
'code-move': { parsers: [parseInt, parseInt],
processor: this.processCodeMove },
@@ -55,8 +55,12 @@ function LogProcessor() {
LogProcessor.prototype.__proto__ = LogReader.prototype;
LogProcessor.prototype.processCodeCreation = function(
- type, start, size, name, maybe_func) {
+ type, kind, start, size, name, maybe_func) {
if (type != "LazyCompile" && type != "Script" && type != "Function")
return;
+ // Scripts will compile into anonymous functions starting at 1:1. Adjust
the
+ // name here so that it matches corrsponding function's name during the
heap
+ // traversal.
+ if (type == "Script") name = " :1:1";
// Discard types to avoid discrepancies in "LazyCompile" vs. "Function".
type = "";
if (maybe_func.length) {
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.