Commit 886b4fd7 authored by Kevin Modzelewski's avatar Kevin Modzelewski

Disable the object cache for reproducibility

It changes the memory allocation pattern based on the number / names? of the
cache files, making it very hard to get deterministic output from malloc.
parent 2b13b66e
...@@ -33,7 +33,8 @@ If the program ends with a message such as "10 refs remaining!", try to bisect d ...@@ -33,7 +33,8 @@ If the program ends with a message such as "10 refs remaining!", try to bisect d
If the assertion `assert(var->reftype != RefType::UNKNOWN)` fails in Rewriter::commitReturning(), this means that someone forgot to call `setType` on a refcounted RewriterVar. Unfortunately, we don't have any tracking of where RewriterVars get created, so we will use GDB to help us. If the assertion `assert(var->reftype != RefType::UNKNOWN)` fails in Rewriter::commitReturning(), this means that someone forgot to call `setType` on a refcounted RewriterVar. Unfortunately, we don't have any tracking of where RewriterVars get created, so we will use GDB to help us.
- Type `run` a few (~3) times to make sure that the program enters steady-state behavior (on-disk caches get filled). - First, turn off ENABLE_JIT_OBJECT_CACHE in options.cpp (maybe we should add a command line flag for this).
-- You may need to type `run` a few (~3) times to make sure that the program enters steady-state behavior (on-disk caches get filled), though with the object cache off this shouldn't be necessary.
- When the assertion hits, go up to the `commitReturning()` stack frame that contains the assertion. - When the assertion hits, go up to the `commitReturning()` stack frame that contains the assertion.
- Type `watch -l *(char**)&var->reftype`. This adds a breakpoint that will get hit whenever the reftype field gets modified. The `-l` flag tells gdb to evaluate the expression once and then watch the resulting address (rather than symbolically reevaluating it each time). The `*(char**)&` part is a workaround since otherwise GDB will fail to reset the breakpoint when we do the next step. - Type `watch -l *(char**)&var->reftype`. This adds a breakpoint that will get hit whenever the reftype field gets modified. The `-l` flag tells gdb to evaluate the expression once and then watch the resulting address (rather than symbolically reevaluating it each time). The `*(char**)&` part is a workaround since otherwise GDB will fail to reset the breakpoint when we do the next step.
- Type `run` to restart the program. You should see the breakpoint get hit. We are only interested in the last time the breakpoint gets hit, so we need to do the following: - Type `run` to restart the program. You should see the breakpoint get hit. We are only interested in the last time the breakpoint gets hit, so we need to do the following:
......
...@@ -1557,7 +1557,7 @@ bool Rewriter::finishAssembly(int continue_offset) { ...@@ -1557,7 +1557,7 @@ bool Rewriter::finishAssembly(int continue_offset) {
void Rewriter::commitReturning(RewriterVar* var) { void Rewriter::commitReturning(RewriterVar* var) {
STAT_TIMER(t0, "us_timer_rewriter", 10); STAT_TIMER(t0, "us_timer_rewriter", 10);
assert(var->reftype != RefType::UNKNOWN); ASSERT(var->reftype != RefType::UNKNOWN, "%p", var);
addAction([=]() { addAction([=]() {
if (LOG_IC_ASSEMBLY) assembler->comment("commitReturning"); if (LOG_IC_ASSEMBLY) assembler->comment("commitReturning");
......
...@@ -79,7 +79,7 @@ bool ENABLE_REOPT = 1 && _GLOBAL_ENABLE; ...@@ -79,7 +79,7 @@ bool ENABLE_REOPT = 1 && _GLOBAL_ENABLE;
bool ENABLE_PYSTON_PASSES = 0 && _GLOBAL_ENABLE; bool ENABLE_PYSTON_PASSES = 0 && _GLOBAL_ENABLE;
bool ENABLE_TYPE_FEEDBACK = 1 && _GLOBAL_ENABLE; bool ENABLE_TYPE_FEEDBACK = 1 && _GLOBAL_ENABLE;
bool ENABLE_RUNTIME_ICS = 1 && _GLOBAL_ENABLE; bool ENABLE_RUNTIME_ICS = 1 && _GLOBAL_ENABLE;
bool ENABLE_JIT_OBJECT_CACHE = 1 && _GLOBAL_ENABLE; bool ENABLE_JIT_OBJECT_CACHE = 0 && _GLOBAL_ENABLE;
bool LAZY_SCOPING_ANALYSIS = 1; bool LAZY_SCOPING_ANALYSIS = 1;
bool ENABLE_FRAME_INTROSPECTION = 1; bool ENABLE_FRAME_INTROSPECTION = 1;
......
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