Skip to content

Instantly share code, notes, and snippets.

../Opt/js -e 'var libdir="./"; var MODE="compare";' nbody.js
Warming up sequential runs
.
Measuring sequential runs
Measuring parallel runs
Checking correctness
NBODY SEQUENTIAL MEASUREMENT 0: 8393
NBODY SEQUENTIAL MEASUREMENT 1: 8568
NBODY SEQUENTIAL MEASUREMENT 2: 8579
NBODY SEQUENTIAL AVERAGE: 8513.333333333334
% /Users/shu/moz/iontrail/js/src/Debug/js -f /Users/shu/moz/iontrail/js/src/jit-test/lib/prolog.js --no-jm -e "const platform='darwin'; const libdir='/Users/shu/moz/iontrail/js/src/jit-test/lib/'; const scriptdir='/Users/shu/moz/iontrail/js/src/jit-test/tests/parallelarray/'" -f /Users/shu/moz/iontrail/js/src/jit-test/tests/parallelarray/bailout-executed.js
[Parallel:M] BEGIN ParallelDo (/Users/shu/moz/iontrail/js/src/jit-test/tests/parallelarray/bailout-executed.js:17 -> self-hosted:1302)
[Parallel:M] Compiling all reachable functions
[Parallel:M] COMPILE 103357128:self-hosted:1312
[Parallel:M] Safe
[Parallel:M] END compiled
[Parallel:M] COMPILE 1033379c0:/Users/shu/moz/iontrail/js/src/jit-test/tests/parallelarray/bailout-executed.js:3
[Parallel:M] StoreFixedSlot: write to ParNew prop does not require guard (/Users/shu/moz/iontrail/js/src/jit-test/tests/parallelarray/bailout-executed.js:4)
[Parallel:M] StoreFixedSlot: write to ParNew prop does not require guard (/Users/shu/moz/iontrail/js
diff --git a/js/src/ion/Ion.cpp b/js/src/ion/Ion.cpp
index 8766100..b6c667c 100644
--- a/js/src/ion/Ion.cpp
+++ b/js/src/ion/Ion.cpp
@@ -1428,7 +1428,8 @@ Compile(JSContext *cx, HandleScript script, HandleFunction fun, jsbytecode *osrP
return Method_Compiled;
}
- if (executionMode == SequentialExecution) {
+ switch (executionMode) {
(lldb) process launch -- -e 'var libdir="./"; var MODE="compare";' nbody.js
Process 3226 launched: '/Users/shu/moz/iontrail/js/src/Debug/shell/js' (x86_64)
Warming up sequential runs
.
Measuring sequential runs
Measuring parallel runs
Assertion failure: hasParallelIonScript(), at ../jsscript.h:621
Process 3226 stopped
* thread #1: tid = 0x1c03, 0x0000000100967a95 js`JSScript::parallelIonScript() const + 133 at jsscript.h:621, stop reason = EXC_BAD_ACCESS (code=1, address=0x0)
frame #0: 0x0000000100967a95 js`JSScript::parallelIonScript() const + 133 at jsscript.h:621
@syg
syg / gist:5165904
Last active December 14, 2015 23:29
diff --git a/js/src/ion/x86/Assembler-x86.h b/js/src/ion/x86/Assembler-x86.h
index be1ca9f..986a5d6 100644
--- a/js/src/ion/x86/Assembler-x86.h
+++ b/js/src/ion/x86/Assembler-x86.h
@@ -257,6 +257,10 @@ class Assembler : public AssemblerX86Shared
push(Imm32(word.value));
return masm.currentOffset();
}
+ CodeOffsetLabel moveWithPatch(const ImmWord &word, const Register &dest) {
+ movl(Imm32(word.value), dest);
diff --git a/js/src/vm/ForkJoin.cpp b/js/src/vm/ForkJoin.cpp
index 2f9a1a2..e80620a 100644
--- a/js/src/vm/ForkJoin.cpp
+++ b/js/src/vm/ForkJoin.cpp
@@ -1127,6 +1127,21 @@ js::ParallelDo::invalidateBailedOutScripts()
return true;
}
+struct AutoSetEagerBaseline
+{
#!/bin/sh
pattern='src\/(Debug|Opt|yarr|build|jsapi-tests|gdb|ctypes).*\/'
listfile=/tmp/files
find public -type f -print > $listfile
find src -name "*.h" -print | grep -v -P $pattern >> $listfile
find src -name "*.cpp" -print | grep -v -P $pattern >> $listfile
ctags -e --fields=+iaS --language-force=C++ $(cat $listfile)
<pre>
<?php
// How many movies to ask RT at once.
define("PAGE_LIMIT", 50);
// The minimum critic score to be considered fresh.
define("FRESH_THRESHOLD", -1);
// The maximum number of days in theaters to be considered young.
var g = newGlobal();
var dbg = new Debugger;
g.eval("function f(d) { g(d); }");
g.eval("function g(d) { h(d); }");
g.eval("function h(d) { while (d) { } return d; }");
timeout(1, function () {
dbg.addDebuggee(g);
var frame = dbg.getNewestFrame();
shu@pikashu ~/moz/inbound/js/src/jit-test
% cat lib/jitopts.js
function withJitOptions(opts, fn) {
var oldOpts = getJitCompilerOptions();
for (var k in opts)
setJitCompilerOption(k, opts[k]);
fn();
for (var k in oldOpts)
setJitCompilerOption(k, oldOpts[k]);
}