зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1339406 - Part 7: Remove tests for tracemonkey options from jstests. r=arai
--HG-- extra : rebase_source : 12c9adfdee60d882b9509975a3910d764fa87276
This commit is contained in:
Родитель
b3c35c8228
Коммит
a5b658cd0e
|
@ -33,15 +33,6 @@ function test()
|
|||
}
|
||||
f(1);
|
||||
|
||||
|
||||
if (typeof this.tracemonkey != 'undefined')
|
||||
{
|
||||
for (var p in this.tracemonkey)
|
||||
{
|
||||
print(p + ':' + this.tracemonkey[p]);
|
||||
}
|
||||
}
|
||||
|
||||
reportCompare(expect, actual, summary);
|
||||
|
||||
exitFunc ('test');
|
||||
|
|
|
@ -10,64 +10,20 @@ var summary = 'trace-capability math mini-testsuite';
|
|||
printBugNumber(BUGNUMBER);
|
||||
printStatus (summary);
|
||||
|
||||
|
||||
/**
|
||||
* A number of the tests in this file depend on the setting of
|
||||
* HOTLOOP. Define some constants up front, so they're easy to grep
|
||||
* for.
|
||||
*/
|
||||
// The HOTLOOP constant we depend on; only readable from our stats
|
||||
// object in debug builds.
|
||||
const haveTracemonkey = !!(this.tracemonkey)
|
||||
const HOTLOOP = haveTracemonkey ? tracemonkey.HOTLOOP : 2;
|
||||
// The loop count at which we trace
|
||||
const RECORDLOOP = 8;
|
||||
// The loop count at which we run the trace
|
||||
const RUNLOOP = RECORDLOOP + 1;
|
||||
|
||||
var testName = null;
|
||||
if ("arguments" in this && arguments.length > 0)
|
||||
testName = arguments[0];
|
||||
var fails = [], passes=[];
|
||||
|
||||
function jitstatHandler(f)
|
||||
{
|
||||
if (!haveTracemonkey)
|
||||
return;
|
||||
|
||||
// XXXbz this is a nasty hack, but I can't figure out a way to
|
||||
// just use jitstats.tbl here
|
||||
f("recorderStarted");
|
||||
f("recorderAborted");
|
||||
f("traceCompleted");
|
||||
f("sideExitIntoInterpreter");
|
||||
f("typeMapMismatchAtEntry");
|
||||
f("returnToDifferentLoopHeader");
|
||||
f("traceTriggered");
|
||||
f("globalShapeMismatchAtEntry");
|
||||
f("treesTrashed");
|
||||
f("slotPromoted");
|
||||
f("unstableLoopVariable");
|
||||
f("noCompatInnerTrees");
|
||||
f("breakLoopExits");
|
||||
f("returnLoopExits");
|
||||
}
|
||||
|
||||
function test(f)
|
||||
{
|
||||
if (!testName || testName == f.name) {
|
||||
// Collect our jit stats
|
||||
var localJITstats = {};
|
||||
jitstatHandler(function(prop, local, global) {
|
||||
localJITstats[prop] = tracemonkey[prop];
|
||||
});
|
||||
check(f.name, f(), f.expected, localJITstats, f.jitstats);
|
||||
}
|
||||
}
|
||||
|
||||
function map_test(t, cases)
|
||||
{
|
||||
for (var i = 0; i < cases.length; i++) {
|
||||
function c() { return t(cases[i].input); }
|
||||
c.expected = cases[i].expected;
|
||||
c.name = t.name + "(" + uneval(cases[i].input) + ")";
|
||||
test(c);
|
||||
check(f.name, f(), f.expected);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -103,37 +59,16 @@ function close_enough(expected, actual)
|
|||
return true;
|
||||
}
|
||||
|
||||
function check(desc, actual, expected, oldJITstats, expectedJITstats)
|
||||
function check(desc, actual, expected, expectedJITstats)
|
||||
{
|
||||
var pass = false;
|
||||
if (close_enough(expected, actual)) {
|
||||
pass = true;
|
||||
jitstatHandler(function(prop) {
|
||||
if (expectedJITstats && prop in expectedJITstats &&
|
||||
expectedJITstats[prop] !=
|
||||
tracemonkey[prop] - oldJITstats[prop]) {
|
||||
pass = false;
|
||||
}
|
||||
});
|
||||
if (pass) {
|
||||
reportCompare(expected, actual, desc);
|
||||
passes.push(desc);
|
||||
return print(desc, ": passed");
|
||||
}
|
||||
reportCompare(expected, actual, desc);
|
||||
passes.push(desc);
|
||||
return print(desc, ": passed");
|
||||
}
|
||||
|
||||
if (expected instanceof RegExp) {
|
||||
pass = reportMatch(expected, actual + '', desc);
|
||||
if (pass) {
|
||||
jitstatHandler(function(prop) {
|
||||
if (expectedJITstats && prop in expectedJITstats &&
|
||||
expectedJITstats[prop] !=
|
||||
tracemonkey[prop] - oldJITstats[prop]) {
|
||||
pass = false;
|
||||
}
|
||||
});
|
||||
}
|
||||
if (pass) {
|
||||
if (reportMatch(expected, actual + '', desc)) {
|
||||
passes.push(desc);
|
||||
return print(desc, ": passed");
|
||||
}
|
||||
|
@ -142,33 +77,11 @@ function check(desc, actual, expected, oldJITstats, expectedJITstats)
|
|||
reportCompare(expected, actual, desc);
|
||||
|
||||
fails.push(desc);
|
||||
var expectedStats = "";
|
||||
if (expectedJITstats) {
|
||||
jitstatHandler(function(prop) {
|
||||
if (prop in expectedJITstats) {
|
||||
if (expectedStats)
|
||||
expectedStats += " ";
|
||||
expectedStats +=
|
||||
prop + ": " + expectedJITstats[prop];
|
||||
}
|
||||
});
|
||||
}
|
||||
var actualStats = "";
|
||||
if (expectedJITstats) {
|
||||
jitstatHandler(function(prop) {
|
||||
if (prop in expectedJITstats) {
|
||||
if (actualStats)
|
||||
actualStats += " ";
|
||||
actualStats += prop + ": " + (tracemonkey[prop]-oldJITstats[prop]);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
print(desc, ": FAILED: expected", typeof(expected),
|
||||
"(", uneval(expected), ")",
|
||||
(expectedStats ? " [" + expectedStats + "] " : ""),
|
||||
"!= actual",
|
||||
typeof(actual), "(", uneval(actual), ")",
|
||||
(actualStats ? " [" + actualStats + "] " : ""));
|
||||
typeof(actual), "(", uneval(actual), ")");
|
||||
}
|
||||
|
||||
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
||||
|
@ -177,7 +90,6 @@ function check(desc, actual, expected, oldJITstats, expectedJITstats)
|
|||
// Expect a loop containing such a call to be traced.
|
||||
// FUNCNAME and ARGS are both strings.
|
||||
// ARGS has the form of an argument list: a comma-separated list of expressions.
|
||||
// Certain Tracemonkey limitations require us to pass FUNCNAME as a string.
|
||||
// Passing ARGS as a string allows us to assign better test names:
|
||||
// expressions like Math.PI/4 haven't been evaluated to big hairy numbers.
|
||||
function testmath(funcname, args, expected) {
|
||||
|
@ -222,16 +134,6 @@ function testmath(funcname, args, expected) {
|
|||
testfunc.name = funcname + "(" + args + ")";
|
||||
testfunc.expected = expected;
|
||||
|
||||
// Disable jitstats check. This never worked right. The actual part of the
|
||||
// loop we cared about was never traced. We traced the filler parts early
|
||||
// and then took a mismatch side exit on every subequent array read with
|
||||
// a different type (gal, discovered when fixing bug 479110).
|
||||
// testfunc.jitstats = {
|
||||
// recorderStarted: 1,
|
||||
// recorderAborted: 0,
|
||||
// traceTriggered: 1
|
||||
// };
|
||||
|
||||
test(testfunc);
|
||||
}
|
||||
|
||||
|
|
|
@ -36,28 +36,7 @@ function test()
|
|||
expect = 10;
|
||||
actual = f();
|
||||
|
||||
var recorderStarted;
|
||||
var recorderAborted;
|
||||
var traceCompleted;
|
||||
var skip = true;
|
||||
|
||||
if (this.tracemonkey && !this.tracemonkey.adaptive)
|
||||
{
|
||||
recorderStarted = this.tracemonkey.recorderStarted;
|
||||
recorderAborted = this.tracemonkey.recorderAborted;
|
||||
traceCompleted = this.tracemonkey.traceCompleted;
|
||||
skip = false;
|
||||
}
|
||||
|
||||
|
||||
reportCompare(expect, actual, summary + ': return value 10');
|
||||
|
||||
if (!skip)
|
||||
{
|
||||
expect = 'recorderStarted=1, recorderAborted=0, traceCompleted=1';
|
||||
actual = 'recorderStarted=' + recorderStarted + ', recorderAborted=' + recorderAborted + ', traceCompleted=' + traceCompleted;
|
||||
reportCompare(expect, actual, summary + ': trace');
|
||||
}
|
||||
|
||||
exitFunc ('test');
|
||||
}
|
||||
|
|
|
@ -1,71 +0,0 @@
|
|||
/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
var BUGNUMBER = 462459;
|
||||
var summary = 'TM: trace Array()';
|
||||
var actual = '';
|
||||
var expect = '';
|
||||
|
||||
printBugNumber(BUGNUMBER);
|
||||
printStatus (summary);
|
||||
|
||||
|
||||
if (!this.tracemonkey || this.tracemonkey.adaptive)
|
||||
{
|
||||
expect = actual = 'Test skipped due to lack of tracemonkey jitstats';
|
||||
reportCompare(expect, actual, summary);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
expect = 'recorder started, recorder not aborted, trace completed';
|
||||
actual = '';
|
||||
|
||||
var recorderStartedStart = this.tracemonkey.recorderStarted;
|
||||
var recorderAbortedStart = this.tracemonkey.recorderAborted;
|
||||
var traceCompletedStart = this.tracemonkey.traceCompleted;
|
||||
|
||||
|
||||
for (var i = 0; i < RUNLOOP; i++)
|
||||
{
|
||||
Array();
|
||||
}
|
||||
|
||||
|
||||
var recorderStartedEnd = this.tracemonkey.recorderStarted;
|
||||
var recorderAbortedEnd = this.tracemonkey.recorderAborted;
|
||||
var traceCompletedEnd = this.tracemonkey.traceCompleted;
|
||||
|
||||
if (recorderStartedEnd > recorderStartedStart)
|
||||
{
|
||||
actual = 'recorder started, ';
|
||||
}
|
||||
else
|
||||
{
|
||||
actual = 'recorder not started, ';
|
||||
}
|
||||
|
||||
if (recorderAbortedEnd > recorderAbortedStart)
|
||||
{
|
||||
actual += 'recorder aborted, ';
|
||||
}
|
||||
else
|
||||
{
|
||||
actual += 'recorder not aborted, ';
|
||||
}
|
||||
|
||||
if (traceCompletedEnd > traceCompletedStart)
|
||||
{
|
||||
actual += 'trace completed';
|
||||
}
|
||||
else
|
||||
{
|
||||
actual += 'trace not completed';
|
||||
}
|
||||
|
||||
reportCompare(expect, actual, summary);
|
||||
}
|
||||
|
|
@ -1,70 +0,0 @@
|
|||
/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
var BUGNUMBER = 462459;
|
||||
var summary = 'TM: trace Array(1)';
|
||||
var actual = '';
|
||||
var expect = '';
|
||||
|
||||
printBugNumber(BUGNUMBER);
|
||||
printStatus (summary);
|
||||
|
||||
|
||||
if (!this.tracemonkey || this.tracemonkey.adaptive)
|
||||
{
|
||||
expect = actual = 'Test skipped due to lack of tracemonkey jitstats';
|
||||
reportCompare(expect, actual, summary);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
expect = 'recorder started, recorder not aborted, trace completed';
|
||||
actual = '';
|
||||
|
||||
var recorderStartedStart = this.tracemonkey.recorderStarted;
|
||||
var recorderAbortedStart = this.tracemonkey.recorderAborted;
|
||||
var traceCompletedStart = this.tracemonkey.traceCompleted;
|
||||
|
||||
for (var i = 0; i < RUNLOOP; i++)
|
||||
{
|
||||
Array(1);
|
||||
}
|
||||
|
||||
|
||||
var recorderStartedEnd = this.tracemonkey.recorderStarted;
|
||||
var recorderAbortedEnd = this.tracemonkey.recorderAborted;
|
||||
var traceCompletedEnd = this.tracemonkey.traceCompleted;
|
||||
|
||||
if (recorderStartedEnd > recorderStartedStart)
|
||||
{
|
||||
actual = 'recorder started, ';
|
||||
}
|
||||
else
|
||||
{
|
||||
actual = 'recorder not started, ';
|
||||
}
|
||||
|
||||
if (recorderAbortedEnd > recorderAbortedStart)
|
||||
{
|
||||
actual += 'recorder aborted, ';
|
||||
}
|
||||
else
|
||||
{
|
||||
actual += 'recorder not aborted, ';
|
||||
}
|
||||
|
||||
if (traceCompletedEnd > traceCompletedStart)
|
||||
{
|
||||
actual += 'trace completed';
|
||||
}
|
||||
else
|
||||
{
|
||||
actual += 'trace not completed';
|
||||
}
|
||||
|
||||
reportCompare(expect, actual, summary);
|
||||
}
|
||||
|
|
@ -1,71 +0,0 @@
|
|||
/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
var BUGNUMBER = 462459;
|
||||
var summary = 'TM: trace Array(1, 2)';
|
||||
var actual = '';
|
||||
var expect = '';
|
||||
|
||||
printBugNumber(BUGNUMBER);
|
||||
printStatus (summary);
|
||||
|
||||
|
||||
if (!this.tracemonkey || this.tracemonkey.adaptive)
|
||||
{
|
||||
expect = actual = 'Test skipped due to lack of tracemonkey jitstats';
|
||||
reportCompare(expect, actual, summary);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
expect = 'recorder started, recorder not aborted, trace completed';
|
||||
actual = '';
|
||||
|
||||
var recorderStartedStart = this.tracemonkey.recorderStarted;
|
||||
var recorderAbortedStart = this.tracemonkey.recorderAborted;
|
||||
var traceCompletedStart = this.tracemonkey.traceCompleted;
|
||||
|
||||
|
||||
for (var i = 0; i < RUNLOOP; i++)
|
||||
{
|
||||
Array(1, 2);
|
||||
}
|
||||
|
||||
|
||||
var recorderStartedEnd = this.tracemonkey.recorderStarted;
|
||||
var recorderAbortedEnd = this.tracemonkey.recorderAborted;
|
||||
var traceCompletedEnd = this.tracemonkey.traceCompleted;
|
||||
|
||||
if (recorderStartedEnd > recorderStartedStart)
|
||||
{
|
||||
actual = 'recorder started, ';
|
||||
}
|
||||
else
|
||||
{
|
||||
actual = 'recorder not started, ';
|
||||
}
|
||||
|
||||
if (recorderAbortedEnd > recorderAbortedStart)
|
||||
{
|
||||
actual += 'recorder aborted, ';
|
||||
}
|
||||
else
|
||||
{
|
||||
actual += 'recorder not aborted, ';
|
||||
}
|
||||
|
||||
if (traceCompletedEnd > traceCompletedStart)
|
||||
{
|
||||
actual += 'trace completed';
|
||||
}
|
||||
else
|
||||
{
|
||||
actual += 'trace not completed';
|
||||
}
|
||||
|
||||
reportCompare(expect, actual, summary);
|
||||
}
|
||||
|
|
@ -1,71 +0,0 @@
|
|||
/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
var BUGNUMBER = 462459;
|
||||
var summary = 'TM: trace Array(1, 2, 3)';
|
||||
var actual = '';
|
||||
var expect = '';
|
||||
|
||||
printBugNumber(BUGNUMBER);
|
||||
printStatus (summary);
|
||||
|
||||
|
||||
if (!this.tracemonkey || this.tracemonkey.adaptive)
|
||||
{
|
||||
expect = actual = 'Test skipped due to lack of tracemonkey jitstats';
|
||||
reportCompare(expect, actual, summary);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
expect = 'recorder started, recorder not aborted, trace completed';
|
||||
actual = '';
|
||||
|
||||
var recorderStartedStart = this.tracemonkey.recorderStarted;
|
||||
var recorderAbortedStart = this.tracemonkey.recorderAborted;
|
||||
var traceCompletedStart = this.tracemonkey.traceCompleted;
|
||||
|
||||
|
||||
for (var i = 0; i < RUNLOOP; i++)
|
||||
{
|
||||
Array(1, 2, 3);
|
||||
}
|
||||
|
||||
|
||||
var recorderStartedEnd = this.tracemonkey.recorderStarted;
|
||||
var recorderAbortedEnd = this.tracemonkey.recorderAborted;
|
||||
var traceCompletedEnd = this.tracemonkey.traceCompleted;
|
||||
|
||||
if (recorderStartedEnd > recorderStartedStart)
|
||||
{
|
||||
actual = 'recorder started, ';
|
||||
}
|
||||
else
|
||||
{
|
||||
actual = 'recorder not started, ';
|
||||
}
|
||||
|
||||
if (recorderAbortedEnd > recorderAbortedStart)
|
||||
{
|
||||
actual += 'recorder aborted, ';
|
||||
}
|
||||
else
|
||||
{
|
||||
actual += 'recorder not aborted, ';
|
||||
}
|
||||
|
||||
if (traceCompletedEnd > traceCompletedStart)
|
||||
{
|
||||
actual += 'trace completed';
|
||||
}
|
||||
else
|
||||
{
|
||||
actual += 'trace not completed';
|
||||
}
|
||||
|
||||
reportCompare(expect, actual, summary);
|
||||
}
|
||||
|
|
@ -1,71 +0,0 @@
|
|||
/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
var BUGNUMBER = 462459;
|
||||
var summary = 'TM: trace new Array()';
|
||||
var actual = '';
|
||||
var expect = '';
|
||||
|
||||
printBugNumber(BUGNUMBER);
|
||||
printStatus (summary);
|
||||
|
||||
|
||||
if (!this.tracemonkey || this.tracemonkey.adaptive)
|
||||
{
|
||||
expect = actual = 'Test skipped due to lack of tracemonkey jitstats';
|
||||
reportCompare(expect, actual, summary);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
expect = 'recorder started, recorder not aborted, trace completed';
|
||||
actual = '';
|
||||
|
||||
var recorderStartedStart = this.tracemonkey.recorderStarted;
|
||||
var recorderAbortedStart = this.tracemonkey.recorderAborted;
|
||||
var traceCompletedStart = this.tracemonkey.traceCompleted;
|
||||
|
||||
|
||||
for (var i = 0; i < RUNLOOP; i++)
|
||||
{
|
||||
new Array();
|
||||
}
|
||||
|
||||
|
||||
var recorderStartedEnd = this.tracemonkey.recorderStarted;
|
||||
var recorderAbortedEnd = this.tracemonkey.recorderAborted;
|
||||
var traceCompletedEnd = this.tracemonkey.traceCompleted;
|
||||
|
||||
if (recorderStartedEnd > recorderStartedStart)
|
||||
{
|
||||
actual = 'recorder started, ';
|
||||
}
|
||||
else
|
||||
{
|
||||
actual = 'recorder not started, ';
|
||||
}
|
||||
|
||||
if (recorderAbortedEnd > recorderAbortedStart)
|
||||
{
|
||||
actual += 'recorder aborted, ';
|
||||
}
|
||||
else
|
||||
{
|
||||
actual += 'recorder not aborted, ';
|
||||
}
|
||||
|
||||
if (traceCompletedEnd > traceCompletedStart)
|
||||
{
|
||||
actual += 'trace completed';
|
||||
}
|
||||
else
|
||||
{
|
||||
actual += 'trace not completed';
|
||||
}
|
||||
|
||||
reportCompare(expect, actual, summary);
|
||||
}
|
||||
|
|
@ -1,71 +0,0 @@
|
|||
/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
var BUGNUMBER = 462459;
|
||||
var summary = 'TM: trace new Array(1)';
|
||||
var actual = '';
|
||||
var expect = '';
|
||||
|
||||
printBugNumber(BUGNUMBER);
|
||||
printStatus (summary);
|
||||
|
||||
|
||||
if (!this.tracemonkey || this.tracemonkey.adaptive)
|
||||
{
|
||||
expect = actual = 'Test skipped due to lack of tracemonkey jitstats';
|
||||
reportCompare(expect, actual, summary);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
expect = 'recorder started, recorder not aborted, trace completed';
|
||||
actual = '';
|
||||
|
||||
var recorderStartedStart = this.tracemonkey.recorderStarted;
|
||||
var recorderAbortedStart = this.tracemonkey.recorderAborted;
|
||||
var traceCompletedStart = this.tracemonkey.traceCompleted;
|
||||
|
||||
|
||||
for (var i = 0; i < RUNLOOP; i++)
|
||||
{
|
||||
new Array(1);
|
||||
}
|
||||
|
||||
|
||||
var recorderStartedEnd = this.tracemonkey.recorderStarted;
|
||||
var recorderAbortedEnd = this.tracemonkey.recorderAborted;
|
||||
var traceCompletedEnd = this.tracemonkey.traceCompleted;
|
||||
|
||||
if (recorderStartedEnd > recorderStartedStart)
|
||||
{
|
||||
actual = 'recorder started, ';
|
||||
}
|
||||
else
|
||||
{
|
||||
actual = 'recorder not started, ';
|
||||
}
|
||||
|
||||
if (recorderAbortedEnd > recorderAbortedStart)
|
||||
{
|
||||
actual += 'recorder aborted, ';
|
||||
}
|
||||
else
|
||||
{
|
||||
actual += 'recorder not aborted, ';
|
||||
}
|
||||
|
||||
if (traceCompletedEnd > traceCompletedStart)
|
||||
{
|
||||
actual += 'trace completed';
|
||||
}
|
||||
else
|
||||
{
|
||||
actual += 'trace not completed';
|
||||
}
|
||||
|
||||
reportCompare(expect, actual, summary);
|
||||
}
|
||||
|
|
@ -1,71 +0,0 @@
|
|||
/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
var BUGNUMBER = 462459;
|
||||
var summary = 'TM: trace new Array(1, 2)';
|
||||
var actual = '';
|
||||
var expect = '';
|
||||
|
||||
printBugNumber(BUGNUMBER);
|
||||
printStatus (summary);
|
||||
|
||||
|
||||
if (!this.tracemonkey || this.tracemonkey.adaptive)
|
||||
{
|
||||
expect = actual = 'Test skipped due to lack of tracemonkey jitstats';
|
||||
reportCompare(expect, actual, summary);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
expect = 'recorder started, recorder not aborted, trace completed';
|
||||
actual = '';
|
||||
|
||||
var recorderStartedStart = this.tracemonkey.recorderStarted;
|
||||
var recorderAbortedStart = this.tracemonkey.recorderAborted;
|
||||
var traceCompletedStart = this.tracemonkey.traceCompleted;
|
||||
|
||||
|
||||
for (var i = 0; i < RUNLOOP; i++)
|
||||
{
|
||||
new Array(1, 2);
|
||||
}
|
||||
|
||||
|
||||
var recorderStartedEnd = this.tracemonkey.recorderStarted;
|
||||
var recorderAbortedEnd = this.tracemonkey.recorderAborted;
|
||||
var traceCompletedEnd = this.tracemonkey.traceCompleted;
|
||||
|
||||
if (recorderStartedEnd > recorderStartedStart)
|
||||
{
|
||||
actual = 'recorder started, ';
|
||||
}
|
||||
else
|
||||
{
|
||||
actual = 'recorder not started, ';
|
||||
}
|
||||
|
||||
if (recorderAbortedEnd > recorderAbortedStart)
|
||||
{
|
||||
actual += 'recorder aborted, ';
|
||||
}
|
||||
else
|
||||
{
|
||||
actual += 'recorder not aborted, ';
|
||||
}
|
||||
|
||||
if (traceCompletedEnd > traceCompletedStart)
|
||||
{
|
||||
actual += 'trace completed';
|
||||
}
|
||||
else
|
||||
{
|
||||
actual += 'trace not completed';
|
||||
}
|
||||
|
||||
reportCompare(expect, actual, summary);
|
||||
}
|
||||
|
|
@ -1,71 +0,0 @@
|
|||
/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
var BUGNUMBER = 462459;
|
||||
var summary = 'TM: trace new Array(1, 2, 3)';
|
||||
var actual = '';
|
||||
var expect = '';
|
||||
|
||||
printBugNumber(BUGNUMBER);
|
||||
printStatus (summary);
|
||||
|
||||
|
||||
if (!this.tracemonkey || this.tracemonkey.adaptive)
|
||||
{
|
||||
expect = actual = 'Test skipped due to lack of tracemonkey jitstats';
|
||||
reportCompare(expect, actual, summary);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
expect = 'recorder started, recorder not aborted, trace completed';
|
||||
actual = '';
|
||||
|
||||
var recorderStartedStart = this.tracemonkey.recorderStarted;
|
||||
var recorderAbortedStart = this.tracemonkey.recorderAborted;
|
||||
var traceCompletedStart = this.tracemonkey.traceCompleted;
|
||||
|
||||
|
||||
for (var i = 0; i < RUNLOOP; i++)
|
||||
{
|
||||
new Array(1, 2, 3);
|
||||
}
|
||||
|
||||
|
||||
var recorderStartedEnd = this.tracemonkey.recorderStarted;
|
||||
var recorderAbortedEnd = this.tracemonkey.recorderAborted;
|
||||
var traceCompletedEnd = this.tracemonkey.traceCompleted;
|
||||
|
||||
if (recorderStartedEnd > recorderStartedStart)
|
||||
{
|
||||
actual = 'recorder started, ';
|
||||
}
|
||||
else
|
||||
{
|
||||
actual = 'recorder not started, ';
|
||||
}
|
||||
|
||||
if (recorderAbortedEnd > recorderAbortedStart)
|
||||
{
|
||||
actual += 'recorder aborted, ';
|
||||
}
|
||||
else
|
||||
{
|
||||
actual += 'recorder not aborted, ';
|
||||
}
|
||||
|
||||
if (traceCompletedEnd > traceCompletedStart)
|
||||
{
|
||||
actual += 'trace completed';
|
||||
}
|
||||
else
|
||||
{
|
||||
actual += 'trace not completed';
|
||||
}
|
||||
|
||||
reportCompare(expect, actual, summary);
|
||||
}
|
||||
|
|
@ -1,71 +0,0 @@
|
|||
/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
var BUGNUMBER = 462459;
|
||||
var summary = 'TM: trace []';
|
||||
var actual = '';
|
||||
var expect = '';
|
||||
|
||||
printBugNumber(BUGNUMBER);
|
||||
printStatus (summary);
|
||||
|
||||
|
||||
if (!this.tracemonkey || this.tracemonkey.adaptive)
|
||||
{
|
||||
expect = actual = 'Test skipped due to lack of tracemonkey jitstats';
|
||||
reportCompare(expect, actual, summary);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
expect = 'recorder started, recorder not aborted, trace completed';
|
||||
actual = '';
|
||||
|
||||
var recorderStartedStart = this.tracemonkey.recorderStarted;
|
||||
var recorderAbortedStart = this.tracemonkey.recorderAborted;
|
||||
var traceCompletedStart = this.tracemonkey.traceCompleted;
|
||||
|
||||
|
||||
for (var i = 0; i < RUNLOOP; i++)
|
||||
{
|
||||
[];
|
||||
}
|
||||
|
||||
|
||||
var recorderStartedEnd = this.tracemonkey.recorderStarted;
|
||||
var recorderAbortedEnd = this.tracemonkey.recorderAborted;
|
||||
var traceCompletedEnd = this.tracemonkey.traceCompleted;
|
||||
|
||||
if (recorderStartedEnd > recorderStartedStart)
|
||||
{
|
||||
actual = 'recorder started, ';
|
||||
}
|
||||
else
|
||||
{
|
||||
actual = 'recorder not started, ';
|
||||
}
|
||||
|
||||
if (recorderAbortedEnd > recorderAbortedStart)
|
||||
{
|
||||
actual += 'recorder aborted, ';
|
||||
}
|
||||
else
|
||||
{
|
||||
actual += 'recorder not aborted, ';
|
||||
}
|
||||
|
||||
if (traceCompletedEnd > traceCompletedStart)
|
||||
{
|
||||
actual += 'trace completed';
|
||||
}
|
||||
else
|
||||
{
|
||||
actual += 'trace not completed';
|
||||
}
|
||||
|
||||
reportCompare(expect, actual, summary);
|
||||
}
|
||||
|
|
@ -1,71 +0,0 @@
|
|||
/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
var BUGNUMBER = 462459;
|
||||
var summary = 'TM: trace [1]';
|
||||
var actual = '';
|
||||
var expect = '';
|
||||
|
||||
printBugNumber(BUGNUMBER);
|
||||
printStatus (summary);
|
||||
|
||||
|
||||
if (!this.tracemonkey || this.tracemonkey.adaptive)
|
||||
{
|
||||
expect = actual = 'Test skipped due to lack of tracemonkey jitstats';
|
||||
reportCompare(expect, actual, summary);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
expect = 'recorder started, recorder not aborted, trace completed';
|
||||
actual = '';
|
||||
|
||||
var recorderStartedStart = this.tracemonkey.recorderStarted;
|
||||
var recorderAbortedStart = this.tracemonkey.recorderAborted;
|
||||
var traceCompletedStart = this.tracemonkey.traceCompleted;
|
||||
|
||||
|
||||
for (var i = 0; i < RUNLOOP; i++)
|
||||
{
|
||||
[1];
|
||||
}
|
||||
|
||||
|
||||
var recorderStartedEnd = this.tracemonkey.recorderStarted;
|
||||
var recorderAbortedEnd = this.tracemonkey.recorderAborted;
|
||||
var traceCompletedEnd = this.tracemonkey.traceCompleted;
|
||||
|
||||
if (recorderStartedEnd > recorderStartedStart)
|
||||
{
|
||||
actual = 'recorder started, ';
|
||||
}
|
||||
else
|
||||
{
|
||||
actual = 'recorder not started, ';
|
||||
}
|
||||
|
||||
if (recorderAbortedEnd > recorderAbortedStart)
|
||||
{
|
||||
actual += 'recorder aborted, ';
|
||||
}
|
||||
else
|
||||
{
|
||||
actual += 'recorder not aborted, ';
|
||||
}
|
||||
|
||||
if (traceCompletedEnd > traceCompletedStart)
|
||||
{
|
||||
actual += 'trace completed';
|
||||
}
|
||||
else
|
||||
{
|
||||
actual += 'trace not completed';
|
||||
}
|
||||
|
||||
reportCompare(expect, actual, summary);
|
||||
}
|
||||
|
|
@ -1,71 +0,0 @@
|
|||
/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
var BUGNUMBER = 462459;
|
||||
var summary = 'TM: trace [1, 2]';
|
||||
var actual = '';
|
||||
var expect = '';
|
||||
|
||||
printBugNumber(BUGNUMBER);
|
||||
printStatus (summary);
|
||||
|
||||
|
||||
if (!this.tracemonkey || this.tracemonkey.adaptive)
|
||||
{
|
||||
expect = actual = 'Test skipped due to lack of tracemonkey jitstats';
|
||||
reportCompare(expect, actual, summary);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
expect = 'recorder started, recorder not aborted, trace completed';
|
||||
actual = '';
|
||||
|
||||
var recorderStartedStart = this.tracemonkey.recorderStarted;
|
||||
var recorderAbortedStart = this.tracemonkey.recorderAborted;
|
||||
var traceCompletedStart = this.tracemonkey.traceCompleted;
|
||||
|
||||
|
||||
for (var i = 0; i < RUNLOOP; i++)
|
||||
{
|
||||
[1, 2];
|
||||
}
|
||||
|
||||
|
||||
var recorderStartedEnd = this.tracemonkey.recorderStarted;
|
||||
var recorderAbortedEnd = this.tracemonkey.recorderAborted;
|
||||
var traceCompletedEnd = this.tracemonkey.traceCompleted;
|
||||
|
||||
if (recorderStartedEnd > recorderStartedStart)
|
||||
{
|
||||
actual = 'recorder started, ';
|
||||
}
|
||||
else
|
||||
{
|
||||
actual = 'recorder not started, ';
|
||||
}
|
||||
|
||||
if (recorderAbortedEnd > recorderAbortedStart)
|
||||
{
|
||||
actual += 'recorder aborted, ';
|
||||
}
|
||||
else
|
||||
{
|
||||
actual += 'recorder not aborted, ';
|
||||
}
|
||||
|
||||
if (traceCompletedEnd > traceCompletedStart)
|
||||
{
|
||||
actual += 'trace completed';
|
||||
}
|
||||
else
|
||||
{
|
||||
actual += 'trace not completed';
|
||||
}
|
||||
|
||||
reportCompare(expect, actual, summary);
|
||||
}
|
||||
|
|
@ -1,71 +0,0 @@
|
|||
/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
var BUGNUMBER = 462459;
|
||||
var summary = 'TM: trace [1, 2, 3]';
|
||||
var actual = '';
|
||||
var expect = '';
|
||||
|
||||
printBugNumber(BUGNUMBER);
|
||||
printStatus (summary);
|
||||
|
||||
|
||||
if (!this.tracemonkey || this.tracemonkey.adaptive)
|
||||
{
|
||||
expect = actual = 'Test skipped due to lack of tracemonkey jitstats';
|
||||
reportCompare(expect, actual, summary);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
expect = 'recorder started, recorder not aborted, trace completed';
|
||||
actual = '';
|
||||
|
||||
var recorderStartedStart = this.tracemonkey.recorderStarted;
|
||||
var recorderAbortedStart = this.tracemonkey.recorderAborted;
|
||||
var traceCompletedStart = this.tracemonkey.traceCompleted;
|
||||
|
||||
|
||||
for (var i = 0; i < RUNLOOP; i++)
|
||||
{
|
||||
[1, 2, 3];
|
||||
}
|
||||
|
||||
|
||||
var recorderStartedEnd = this.tracemonkey.recorderStarted;
|
||||
var recorderAbortedEnd = this.tracemonkey.recorderAborted;
|
||||
var traceCompletedEnd = this.tracemonkey.traceCompleted;
|
||||
|
||||
if (recorderStartedEnd > recorderStartedStart)
|
||||
{
|
||||
actual = 'recorder started, ';
|
||||
}
|
||||
else
|
||||
{
|
||||
actual = 'recorder not started, ';
|
||||
}
|
||||
|
||||
if (recorderAbortedEnd > recorderAbortedStart)
|
||||
{
|
||||
actual += 'recorder aborted, ';
|
||||
}
|
||||
else
|
||||
{
|
||||
actual += 'recorder not aborted, ';
|
||||
}
|
||||
|
||||
if (traceCompletedEnd > traceCompletedStart)
|
||||
{
|
||||
actual += 'trace completed';
|
||||
}
|
||||
else
|
||||
{
|
||||
actual += 'trace not completed';
|
||||
}
|
||||
|
||||
reportCompare(expect, actual, summary);
|
||||
}
|
||||
|
|
@ -1,56 +0,0 @@
|
|||
/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
var BUGNUMBER = 471635;
|
||||
var summary = 'TM: trace js shell print()';
|
||||
var actual = '';
|
||||
var expect = '';
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
test();
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
function test()
|
||||
{
|
||||
enterFunc ('test');
|
||||
printBugNumber(BUGNUMBER);
|
||||
printStatus (summary);
|
||||
|
||||
|
||||
(function(){
|
||||
for (var i = 1; i < 20; ++i) {
|
||||
print("#");
|
||||
}
|
||||
})();
|
||||
|
||||
var recorderStarted;
|
||||
var recorderAborted;
|
||||
var traceCompleted;
|
||||
var skip = true;
|
||||
|
||||
if (this.tracemonkey && !this.tracemonkey.adaptive)
|
||||
{
|
||||
recorderStarted = this.tracemonkey.recorderStarted;
|
||||
recorderAborted = this.tracemonkey.recorderAborted;
|
||||
traceCompleted = this.tracemonkey.traceCompleted;
|
||||
skip = false;
|
||||
}
|
||||
|
||||
|
||||
if (!skip)
|
||||
{
|
||||
expect = 'recorderStarted=1, recorderAborted=0, traceCompleted=1';
|
||||
actual = 'recorderStarted=' + recorderStarted + ', recorderAborted=' + recorderAborted + ', traceCompleted=' + traceCompleted;
|
||||
}
|
||||
else
|
||||
{
|
||||
expect = actual = 'Test skipped due to lack of tracemonkey jitstats object.';
|
||||
}
|
||||
|
||||
reportCompare(expect, actual, summary);
|
||||
|
||||
exitFunc ('test');
|
||||
}
|
|
@ -1,4 +0,0 @@
|
|||
// The loop count at which we trace
|
||||
const RECORDLOOP = this.tracemonkey ? tracemonkey.HOTLOOP : 8;
|
||||
// The loop count at which we run the trace
|
||||
const RUNLOOP = RECORDLOOP + 1;
|
Загрузка…
Ссылка в новой задаче