Commit d9af88cb authored by Ömer Sinan Ağacan's avatar Ömer Sinan Ağacan Committed by Ben Gamari

NonMoving: Implement -xns to disable selector optimization

parent 2984afcd
......@@ -52,7 +52,9 @@ typedef struct _GC_FLAGS {
double oldGenFactor;
double pcFreeHeap;
bool useNonmoving;
bool useNonmoving; // default = false
bool nonmovingSelectorOpt; // Do selector optimization in the
// non-moving heap, default = false
uint32_t generations;
bool squeezeUpdFrames;
......
......@@ -157,6 +157,7 @@ void initRtsFlagsDefaults(void)
RtsFlags.GcFlags.pcFreeHeap = 3; /* 3% */
RtsFlags.GcFlags.oldGenFactor = 2;
RtsFlags.GcFlags.useNonmoving = false;
RtsFlags.GcFlags.nonmovingSelectorOpt = false;
RtsFlags.GcFlags.generations = 2;
RtsFlags.GcFlags.squeezeUpdFrames = true;
RtsFlags.GcFlags.compact = false;
......@@ -1542,6 +1543,10 @@ error = true;
OPTION_SAFE;
RtsFlags.GcFlags.useNonmoving = true;
unchecked_arg_start++;
if (rts_argv[arg][3] == 's') {
RtsFlags.GcFlags.nonmovingSelectorOpt = true;
unchecked_arg_start++;
}
break;
case 'c': /* Debugging tool: show current cost centre on
......
......@@ -1458,7 +1458,11 @@ mark_closure (MarkQueue *queue, const StgClosure *p0, StgClosure **origin)
}
case THUNK_SELECTOR:
nonmoving_eval_thunk_selector(queue, (StgSelector*)p, origin);
if (RtsFlags.GcFlags.nonmovingSelectorOpt) {
nonmoving_eval_thunk_selector(queue, (StgSelector*)p, origin);
} else {
PUSH_FIELD((StgSelector *) p, selectee);
}
break;
case AP_STACK: {
......
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