blob: 5d577b39bda0ef3d36a58988a56685ebf68030c0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
|
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
const HAVE_TM = 'tracemonkey' in this;
const HOTLOOP = HAVE_TM ? tracemonkey.HOTLOOP : 8;
const RECORDLOOP = HOTLOOP;
const RUNLOOP = HOTLOOP + 1;
var checkStats;
if (HAVE_TM) {
checkStats = function(stats)
{
// Temporarily disabled while we work on heuristics.
return;
function jit(on)
{
if (on && !options().match(/tracejit/))
{
options('tracejit');
}
else if (!on && options().match(/tracejit/))
{
options('tracejit');
}
}
jit(false);
for (var name in stats) {
var expected = stats[name];
var actual = tracemonkey[name];
if (expected != actual) {
print('Trace stats check failed: got ' + actual + ', expected ' + expected + ' for ' + name);
}
}
jit(true);
};
} else {
checkStats = function() {};
}
var appendToActual = function(s) {
actual += s + ',';
}
if (!("gczeal" in this)) {
gczeal = function() { }
}
|