Commit da01c314 authored by Simon Marlow's avatar Simon Marlow

evaluate_large: evaluate large objects to bd->dest rather than gen->to

This fixes aging of large objects in the new scheme.  Bug found by
perf/space_leaks/space_leak_001.  Yay perf regressions tests.
parent a0ca27ac
......@@ -239,10 +239,11 @@ copy(StgClosure **p, const StgInfoTable *info,
STATIC_INLINE void
evacuate_large(StgPtr p)
{
bdescr *bd = Bdescr(p);
bdescr *bd;
generation *gen, *new_gen;
gen_workspace *ws;
bd = Bdescr(p);
gen = bd->gen;
ACQUIRE_SPIN_LOCK(&gen->sync_large_objects);
......@@ -271,7 +272,7 @@ evacuate_large(StgPtr p)
/* link it on to the evacuated large object list of the destination gen
*/
new_gen = gen->to;
new_gen = bd->dest;
if (new_gen < gct->evac_gen) {
if (gct->eager_promotion) {
new_gen = gct->evac_gen;
......
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