Commit 2b5d4c61 authored by yurys@chromium.org's avatar yurys@chromium.org

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
R=yangguo@chromium.org

Review URL: https://codereview.chromium.org/22824043

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16331 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 3a7cf7eb
...@@ -42,9 +42,6 @@ test-serialize/DependentTestThatAlwaysFails: FAIL ...@@ -42,9 +42,6 @@ test-serialize/DependentTestThatAlwaysFails: FAIL
# This test always fails. It tests that LiveEdit causes abort when turned off. # This test always fails. It tests that LiveEdit causes abort when turned off.
test-debug/LiveEditDisabled: FAIL 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 # We do not yet shrink weak maps after they have been emptied by the GC
test-weakmaps/Shrinking: FAIL test-weakmaps/Shrinking: FAIL
test-weaksets/WeakSet_Shrinking: FAIL test-weaksets/WeakSet_Shrinking: FAIL
......
...@@ -39,7 +39,7 @@ function parseState(s) { ...@@ -39,7 +39,7 @@ function parseState(s) {
function LogProcessor() { function LogProcessor() {
LogReader.call(this, { LogReader.call(this, {
'code-creation': { 'code-creation': {
parsers: [null, parseInt, parseInt, null, 'var-args'], parsers: [null, parseInt, parseInt, parseInt, null, 'var-args'],
processor: this.processCodeCreation }, processor: this.processCodeCreation },
'code-move': { parsers: [parseInt, parseInt], 'code-move': { parsers: [parseInt, parseInt],
processor: this.processCodeMove }, processor: this.processCodeMove },
...@@ -55,8 +55,12 @@ function LogProcessor() { ...@@ -55,8 +55,12 @@ function LogProcessor() {
LogProcessor.prototype.__proto__ = LogReader.prototype; LogProcessor.prototype.__proto__ = LogReader.prototype;
LogProcessor.prototype.processCodeCreation = function( 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; 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". // Discard types to avoid discrepancies in "LazyCompile" vs. "Function".
type = ""; type = "";
if (maybe_func.length) { if (maybe_func.length) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment